Connecting user to the droplet that has lowest latency

May 15, 2015 2.6k views
Ubuntu Getting Started Load 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!

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.

Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!