[nzlug] Webserver - Automatic Failover

Jim Cheetham jim at gonzul.net
Wed Jun 27 21:27:10 NZST 2007


On 27/06/07, Liam Farr <liam at farr.net.nz> wrote:
>
> I had a similar solution suggested to me (by the linux engineer I normally
> use), combined with say a TTL value of 1-5 minutes. He said there were
> other
> (more complex) ways to do it but what you have suggested was the easiest.


The reduced TTL isn't totally necessary; but then again the overhead of
having it low is dependant on the number of users you're expecting.
Basically the trick works because the DNS protocol encourages automatic
retrying of other devices; so does SMTP for email, but no-one has done that
for HTTP - and it would be very difficult for the mess that is HTTPS.

I would be nice if the user didn't have to restart their browser, (as most
> users will be technically un-enlightened (windows), and probably wont
> initially try restarting).


Restarting the browser is actually pretty unusual behaviour anyway. Google
get around similar issues by sending a large chunk of javascript that will
tell you when it thinks the page is taking too long to load. Try that
combined with some ajaxy techniques, and the user's browser might be able to
detect when your server dies. But that's taking things far too seriously.

"Always up" can be achieved with $$$, and it's very difficult to avoid
single points of failure even then. Just how often do you expect your server
to go off the air anyway? What is the cost to your business if it does?
(Don't answer that in a public forum ... just think about it!)

-jim


More information about the NZLUG mailing list