Forum Moderators: phranque
Where it matters for me I do some at the DNS level and most at the application level. I actually don't have any intermediate "transparent" load-balancer in hardware or software for my sites.
A guy who used to be in charge of the hundreds of Web-facing hosts of a very well and internationally known news organisation described load balancers as poor PCs in the way of good servers. Most of his back-end stuff was Suns that didn't need even so much as a firewall in order to be safe, and much of his balancing was done at the DNS level as I understand it.
Keep it simple, remembering that the load balancer is an extra, complicated mechanism that can break or behave unexpectedly.
Rgds
Damon
DNS is likely to be only part of the answer, but, for example, not every user requires a session.
If you consistently serve DNS based on geo-based client IP then session handling and cacheing would be no more more or less an issue than it ever otherwise would be, since you would always serve the same info to any given user in all usual cases. Or/and you can get round the problem by globally distributing session state on demand, eg locked to a cookie set in the user's browser in case the user's browser changes IP address.
For my main application I use simple round-robin DNS load-balancing as the first stage, with decent cache times (TTL ~ 24hr), and then the moment that the user tries to do anything that needs a session (which I minimise) I push them to a named local mirror, for example. Plain old browsing and searching does NOT need a session for my main site/app---the only things that DO require a session currently are overriding language choice for i18n and selecting a "lite" version of the pages for faster loading.
Rgds
Damon
if i want to have serveral sites around the world, e.g. Japan, Korea, China, UK & US
i want the client use their nearest mirror if possible, while do some kind of load balacing, e.g.
people in asia should use Japan, Korea, China (but also UK & US if needed)
people in america should use US, UK
what kind of load balacing is recommended in this case?
thanks.
A futher note:
For my setup I assume that everyone has reasonably good connectivity to the US and UK, but then I assume connectivity roughly divides along address-registry lines, eg ARIN, RIPE, APNIC and AfriNIC.
However, AsiaPac is much more fragmented than North America or Europe, and I can't figure out how to handle South America at all!
Rgds
Damon