Connecting user to the droplet that has lowest latency

Posted May 15, 2015 3.1k views
UbuntuGetting StartedLoad Balancing

Hi, I’m new to DigitalOcean and web servers in general, and I’m using DO to host my web app. I’m wondering if there’s an easy way I can make it so users will connect to the droplet that has the lowest latency for them. I.e. if someone is in LA they should probably connect to the droplet in SF, not in NY. I need latency times as low as possible (connecting to a websocket that connects to SQL).

Just looking for the simplest solution. Thanks!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Anycast is the best but very difficult to set up. GeoDNS is unreliable but the best you can get.

  • Thanks, I’ll look into them. If there are no easy solutions, one thing I was thinking of is just, when the page is loaded, query both droplets and use the one that has the lowest latency. This is a little messier though.

  • You can do that, assuming that the extra time required to do that doesn’t outweigh the benefits.