by chubot · 11y ago · 0 comments
Say you have a read-only site, and you have one copy in the Fremont CA data center, one in Frankfurt, and one in Asia. How do you direct users to the closest one network-wise?
(For static content, you can offload this problem to a CDN, but I'm wondering if you can do it just on Linode)
An old way to do it would be to have the users choose and set a cookie that redirects. But I wonder if you can do it transparently, like Google or Yahoo. Is there a DNS trick which implements this, or something else?
See http://www.caraytech.com/geodns/ and https://en.wikipedia.org/wiki/Geodns
I've found this nice answer on StackOverlow that show the differences between Anycast, GeoDNS and using an http redirect: http://stackoverflow.com/a/25678199
If I have 5K users in US, 2K in Europe, and 1K in Asia, I wouldn't want the traffic to evenly distributed. I would want users to go to the closest/fastest server.
The StackOverflow post above looks like a good start.