Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Using Amazon Route53 DNS, is it possible to build a highly available setup pointing to multiple web servers not on Amazon? I don't need to worry about session stickyness.

Let's assume I have two web servers:

 web1 - 50.23.45.100
 web2 - 50.23.45.101

If I create two A records for mydomain.com. pointing to 50.23.45.100 and 50.23.45.101 with a TTL of 1 minute each, will this work?

How are requests sent when both web servers are up? Evenly? Only to web1?

When web2 goes down, can I have an automated script which deletes the A record for 50.23.45.101? Then when web2 comes back up, simple re-create the A record?

Thanks.

share|improve this question
1  
Keep in mind that because Amazon charge per DNS request, a longer TTL might save you enough money to be able to get an HA load balancer setup instead. The number of queries you would have to save would be in the hundreds of millions. –  Ladadadada Jan 11 '13 at 7:35

1 Answer 1

So, this is simple round robin technique.

In normal scenario, all your requests will be send in round robin fashion. When both web servers are up, one client will get the first IP and the next client will get the second IP.

There are few DNS providers which provides the service of weighted load Balancing in DNS, but mostly are paid services.

The setup you are looking for, is fisible, but then there will be a downtime of around one minute, when any of your server goes down. Are you ready for this?

If yes, then it's possible and you can do that. Although I will recommend putting the TTL to be less than that, somewhere around 30 secs (in ideal scenarios, it should be 0 sec), so that your downtime can be decreased.

Though for better setup, what I will suggest that you can run a small instance and run some caching server on top of that, something like Varnish or nginx, which will increase the performance of your website drastically and on top of that, will provide you the facility of Load Balancing with zero downtime.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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