Tham khao cau hinh:

https://blog.vietnamlab.vn/2016/12/30/load-balancing-cho-web-service/

Mục tiêu của Load balancer:

  • Zero downtime
  • Bảo trì bất cứ server nào cũng dễ dàng. 
  • Tăng cường server khi cao điểm. 

Example: a wordpress + MariaDB + Nginx instalation => To create a load balancer for this.

+ 1st : separate the web server and database server

+ 2nd: deploy a second droplet, install MySQL/MariaDB, port over your database(s) and then work out connecting to it instead of the installation on your current server.

+ 3rd: Once you’ve successfully connected, you can remove MySQL/MariaDB from the main server and keep the connection alive on the secondary server. If you can get to this step, the rest will start to fall in to place and become far easier.

 

Source & follow: https://www.digitalocean.com/community/questions/load-balancer-wordpress

Ví dụ cụ thể về cách triển khai: https://gsviec.com/blog/cau-hinh-load-balancing-cho-wordpress