3 ms·
Consider also using multiple DNS A records - the selection would be random thus balancing the load. For example, do "nslookup google.com"
by DenisM 19y ago
Consider also using multiple DNS A records - the selection would be random thus balancing the load.
For example, do "nslookup google.com"
- jamess 19y ago+1. Round robin DNS has worked well for me in the past,
- ra 19y agoRound robin DNS is fine if you don't have any sticky session requirements. There simply is no way to guarantee that a user will remain on one host for the duration of a session, if you use round-robin DNS (or even semi-deterministic DNS like F5 or GSS). Your best efforts will be thwarted by load-balanced browsing proxies that 'optimise' the user experience by querying primary and secondary DNS, then distributing your HTTP requests across multiple servers. HTH
- cstejerean 19y agoNot requiring sticky sessions is one of it goals when wrting apps. It's not always easy (or even possible) but I love the freedom it buys me.
- crescendo 19y agoDon't you forfeit too much control this way? For example, the load on your servers would be determined by the caching behaviors of all the various DNS servers and clients out there. I think this scheme should only be used as a front line that leads to another layer of load balancers.
- DenisM 19y agoThe idea is that there is enough chaos in the Internet to produce practically random result with sufficiently large number of users. Random is pretty good, unless you must proactively shift load to least-loaded systems (in which case you have to be super careful to avoid oscillations) . One drawback is that you can't take system out of rotation as quickly, but this can be somewhat mitigated by setting very low TTL (60 seconds).
- jbyers 19y agoMultiple A records are OK, but used alone - i.e. not in combination with another load balancing strategy - they can be troublesome. A few years ago, we ran a fair volume of traffic (hundreds of req/s) across three A records for a site. The distribution of requests was simply not uniform, and when a box failed -- even with low TTLs -- many, many clients just plodded away for hours or days with the old IP. If you do go the multiple A record route, do so in combination with one of the load balancers you asked about, and ideally with IP failover. But probably this is a lot more complexity than you want.