Round robin DNS
Joe
5 Replies
@jkinsell:
I'd like to implement a round robin DNS to distribute load between a two virtual web server instances. Is this as simple as adding an additional A record for the second instance in my DNS?
Yes, but: If you have sessions, make sure a client can hit each of your Web servers and still have access to their session (potentially created on the other). Depending on the resolver, a client could flush cache and switch servers at any point.
Bonus points for using your monitoring system to update DNS automatically via the API.
What you could do is have servers issue temporary redirects to other servers if the load was too high. A redirect is very light on the resources compared to loading a full blown dynamic site.
If each server has some way of knowing the load of each other server (perhaps each server updates their load in a database keeping the few records in a MEMORY table), they could issue redirects for requests to the server with the lowest load. Although at that point, you might as well just set up a dedicated load balancer.