Report this

What is the reason for this report?

Nginx load balancing scenario with 2 locations

Posted on June 16, 2014

We’re planning to create an environment with load balancer(s) and app servers (running php apps). We have servers currently on Amsterdam and Helsinki.

So my question is that is it ok to create load balancer which transfers traffic to both Amsterdam and Helsinki (on least connections rule) or should the all servers exists on same location?

Or could some geolocation module on Nginx be advisable?

Also if these app servers are using MongoDb and/or MariaDb, where should db server(s) go?



This textbox defaults to using Markdown to format your answer.

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

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.

You could, but keep in mind that if you are using the proxy_pass function of nginx that all traffic will pass through your load balancer and if your load balancer is in Amsterdam traffic that gets passed to Helsinki it will be going from the client -> Amsterdam (LB) -> Helsinki, which may cause some delays.

Thanks, I would of course prefer to have everything @ Digital Ocean Ams2, but our biggest clients are operating in Finland. Though the pipeline is quite ok from Finland to Amsterdam, so I might consider still having everything in one place (AMS). Then I probably could utilize the private network between servers (e.g. app server and db server)

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.