Pergunta

For an API webservice, I'll use Linux servers with postgres databases, and plan to deploy several instances around the world for redundancy and load balancing.

I'd like users to be redirected to the closest server, and had the idea to do that by DNS. US users would go to a US datacenter, etc ...

The idea is to redirect them as soon as possible: contacting a first server which will then redirect them everytime is not adequate.

How can I load balance my users to the closest datacenter? Any other option than doing that by DNS? If not, any advice for a cloud DNS provider with geolocation load balancing?

Foi útil?

Solução

DNS based approach is the best since this is transparent to both your users & your applications.

One thing to keep in mind reg. DNS based approach is that you need to make sure your data is replicated. Eg: if a user travels & now from the new region he falls in a new datacenter & finds that his data is missing. This is no good. So make sure you have strong data replication across all your datacenters. Here's an example of DNS Routing provider

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top