Question

Can I have 2 droplets in different regions that share exactly the same data?

So basically I have a few containers in my droplet (postgreseql and redis most importantly). I was thinking that if my app gets many users maybe a single droplet can have issues because too many requests at the same time might be an issue. Or even if the droplet has downtime due to the datacenter issues. Also, by having 2 droplet in different regions the users experience faster performance.

Can I have 2 droplets that have exactly the same data? and basically lets say I have 2 droplets, one in USA and 1 droplet in Amsterdam. Eurpean users would use the ams droplet and the american users would use the USA one and if either of them would have downtime then all users would be redirected to one of the droplets.

I have never run into any problems using droplet but I also never deployed an app and I am not sure how much load a single droplet can handle, like can 1 single droplet handle 1 million users?


Submit an answer


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!

Sign In or Sign Up to Answer

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.

What you’re looking for is a Load Balancer. The simplest LB to implement is a round-robin load balancer. You can DIY. But it lacks a lot of features DigitalOcean LB offers. In case you’re interested in that, this will help, https://vpsfix.com/community/server-administration/setup-round-robin-load-balancer-using-dns/

Eurpean users would use the ams droplet and the american users would use the USA one

This is Geographic Load Balancing. I don’t think DO LB support this yet. Mods will correct me if I’m wrong. This will also be a most difficult to implement.

Another note about load balancers, they are a little bit hard to implement for sites with dynamic content. If your site need a database, you need to keep them in sync somehow. That can be a challenge sometimes.

KFSys
Site Moderator
Site Moderator badge
January 8, 2024

Heya @bee575eae7d04977a721d68f4f4877,

Yes, you can have a droplet that has the exact same data but it will be difficult for you keep the data consisent.

What you should use is load balancers to distribute load and achieve the end result you are aiming at.

Check the following product:

https://docs.digitalocean.com/products/networking/load-balancers/

DigitalOcean Load Balancers are a fully-managed, highly available network load balancing service. Load balancers distribute traffic to groups of Droplets, which decouples the overall health of a backend service from the health of a single server to ensure that your services stay online.

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.

Become a contributor

Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow — whether you're running one virtual machine or ten thousand.

Learn more
DigitalOcean Cloud Control Panel