0

I am planning to setup my web application in 2 different geographical locations with 2 application server replica in each zone. To load balance the application servers I am thinking of using DNSMadeEasy which uses Round Robin and provides DNS Failover. For the application servers I will use nginx with php-fpm. My application will also use SSL and I have no sticky sessions.

Can anybody tell me whether there are any glitches in the configuration. I am completely new to load balancing and I have reached to the above configuration from whatever research I have done online.

1

Load balancing using DNS is cheap, simple and effective.

Failover using DNS is still cheap but not so simple and not so effective. Failover is achieved by having your DNS provider perform a health check on your service on a regular basis and change your DNS records to point at the other server if the health check fails.

This health check is likely to be every 60 seconds.

DNS records have a cache expiry time known as a TTL. Setting a low TTL such as 60 seconds on your DNS records allows your DNS provider to move all your traffic across to the other server at most 60 seconds after it was detected to be down. But this relies on every client following the rules, and not all of them do.

Some DNS resolvers (out of your control) ignore TTLs altogether or TTLs lower than some threshold such as one hour and provide their own TTL for these records to their clients. Some browsers cache DNS lookups unless a hard-refresh is performed.

DNS-based failover as describe above will likely work for most (90%) of your users within one minute on average. Some users will not see any downtime, some users will see two minutes of downtime (the time of the health check plus the time of the DNS TTL expiry) and some users will see downtime until your primary box comes back up. Most users will see about a minute of downtime.

Low TTLs cause lots of extra traffic to your provider's DNS servers so there will likely be extra cost involved in this.

Whether this is an acceptable improvement depends on many factors outside the scope of the answer.

A reliable load balancer device in a single data centre can provide a better experience for your users up to the point where your biggest source of downtime is the data centre or the load balancer itself.

  • That clears some my doubts regarding DNS caching. I was wondering how DNSMadeEasy could overcome this caching thing. With a closer look at their documentation, I got to know their fail-over does work only for the new requests. For the clients who are already connected, the DNS caching effect will be there and they will see a downtime. Thanks for the info. – user182789 Aug 1 '13 at 11:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.