News for hackers. Stuff that matters.
Re:Introducing Linodes in Frankfurt by chubot on Monday August 03, 2015 @01:07PM (#9997796)
Related question -- does anyone run a site which is hosted in multiple locations?

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?

Re:Introducing Linodes in Frankfurt by Spittie on Monday August 03, 2015 @01:23PM (#9997951)
The easiest way would be to use GeoDNS. You just have your DNS server send out a different IP according to the IP of the request.

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

Re:Introducing Linodes in Frankfurt by chubot on Monday August 03, 2015 @01:44PM (#9998164)
Great thanks! It looks like the questioner ended up using AWS Route 53, which supports this kind of thing. I'm not using AWS, and there are other options, but that is the kind of thing I am happy to offload to AWS.
Re:Introducing Linodes in Frankfurt by samtho on Monday August 03, 2015 @01:23PM (#9997947)
Round Robbin DNS[0] is a simple method for balancing HTTP requests, done entirely at the nameserver. Let's say you have 3 servers, located at 3 separate IP addresses. You create multiple A-Records, each pointing to a different IP address, and (in theory) the client will choose the fastest connection.

[0] https://en.wikipedia.org/wiki/Round-robin_DNS

Re:Introducing Linodes in Frankfurt by chubot on Monday August 03, 2015 @01:33PM (#9998056)
Would clients actually choose the fastest connection? That page says that the client will typically choose the first address, so you can use this for load distribution among servers, but it doesn't say anything about client latency.

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.