is load balancer increase latency? putting Mysql on Different Droplet will increase load?

October 4, 2019 129 views
MySQL Load Balancing

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?

1 Answer

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 :)

Have another answer? Share your knowledge.