i am using golang for my application i have more than 10K+ concurrent request on droplet so i want to add load balancer but for that i have to create 2 droplet and both need to access same mysql DB so have to put mysql on 3rd droplet
is load balancer increase latency? putting Mysql on Different Droplet will increase load?
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!
The load balance should not appreciably increase latency but moving the mysql database to an external host might. Another method to consider in this scenario would be to run mysql on each of the two droplets and utilize mysql replication between them - then your application could always execute the queries “locally.”
This is highly dependent on your workload, of course. If there are 10k+ concurrent writes we might reconsider my suggestion but I am assuming these are mostly reads.
Additionally, you could look at introducing some kind of caching layer which would help with any increased latency from having an external DB.
Hope this helps and let us know if you have further questions :)
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.