Blog

System load balancing

I. General introduction:
Purpose:
− Synthesize individual strengths into one
− Enhance fault tolerance
Technically:  the system will include subsystems:

1. Web server
− This is a public system, serving the purpose of marketing, promoting the company’s activities and products to everyone.
− This system, technically, allows all Internet users to search for information and exchange information with your website. Therefore, it is necessary to ensure access speed and stability.

2. Database Server
− A common database system for the Web server to access to get data and display content on the website.
− This is the system that contains all information for both Public and internal company operations.
− Therefore, the DB system must be strong enough, stable and data secure.

3. Proxy server (Load Balancing)
− This is a system that forwards information and controls information, creating security for web servers and database servers.
− The Load Balancing (LB) function for web servers will be installed on this Proxy server.

III. Equipment and other requirements:

− 3 PUBLIC IPs:

• WAN IP 1: Will be assigned to LB1
• WAN IP 2: Assigned to LB2
• WAN IP 3: Used for Virtual IP (Users will access Webservers through this address)

− 4 Servers are required:

• 2 Servers act as load balancing controllers:

+ Each Server needs 2 Interfaces.

+ Because it is the main traffic transfer point, the throughput requirement for network traffic is high. This throughput capability is based on CPU and RAM.

• 2 Servers act as Websites
+ Store website information here.

+ On the 2 Servers, we can set up appropriately to act as database servers.

+ To ensure the synchronization between the 2 databases on these 2 servers is always the same, we can set up a database replication solution

IV. How it works:

− We will have 2 Servers taking on the role of LoadBalancer and Firewall.

− Load Balancer:

• 1 Server plays the role of active. (here is LB1)
• The remaining Server plays the role of standby. (LB2)
• When the outside accesses the website via the address: IP WAN3. will be redirected along the path (black arrow) to server LB1 (Active). LB1 will automatically perform load balancing to 2 Web Servers
• When Server LB1 is no longer able to serve, server LB2 will be automatically transferred to Active to continue holding load balancing to 2 Web Servers, ensuring continuous access to the website for internet users (red arrow path)
• When Server LB1 is up again, the role will be automatically transferred back to LB1.
• This way we can ensure high availability and load balancing for the website.
− Firewall:

• Web Servers will be placed in the DMZ protected by the LoadBalancer (Thanks to the Firewall installed on the Load Balancer)

− Model 1:

– This model is suitable for the following cases:
. Large database data and high security requirements
. Web Server executes Read and Write continuously to the Database.
– With the above model:
. Web Server and Database run independently on each physical Server.
. Can deploy appropriate hardware configuration for Web Server and Database Server.
. Ensure Secure. In case Hacker attacks and takes control of the Web Server => Still have to connect to the Database Server
– Replicate between 2 Database Servers will not affect much the performance of the Web Server (Because it runs independently).
– Increase the load capacity of the Web Server (Because it does not have to share resources with the database)
– Data retrieval is only within the LAN and does not affect the 2 Load Balancers.
– Model 2:

– In this model, we place the Database and Web on each Server at the same time.
– This model is applied in cases where the database data is small or medium. But requires fast and always available web access (number of Web Servers up to 4)
– With the above model, the number of requests from the Internet will be distributed to 4 Servers.
– The database on each Server will be synchronized with each other. (Up to 4)
– At this time, because the Load Balancer must bear the load of up to 4 Servers => Requires strong configuration for 2 LoadBalancer machines

  • 22/05/2020
  • 16376 views
avatar_author

Author admin

  1. Đăng ký dùng thử
  2. Zalo chat
  3. Gọi miễn phí