Details on Nginx load balancing and reverse agent configuration and optimization

  • 2020-05-12 07:00:36
  • OfStack

Nginx load balancing and reverse agent configuration and optimization

DNS polling method:

Introduction:

DNS polling refers to the fact that one domain name can be bound to multiple ip servers, and dns polling can be used to access several ip servers to achieve the purpose of load balancing. linux command dig domain can be used to check the situation.

Disadvantages:

1, the reliability is low. If one server goes down, so dns in polling to this server will not have a response, even with this ip, then a telecommunications service provider dns exists cache, in 1 set time also can access to the server. In spite of the 1 set extent solved the problem of load balancing, but has the problem of reliability is not high.

2. Uneven allocation of dns: dns adopts a simple server polling algorithm, which cannot distinguish the performance of the server, reflect the current state of the server, allocate more user requests to the server with good performance, and even allocate some user requests to one machine.

Therefore, dns polling is suitable for server clusters with low reliability requirements, such as image servers and server clusters with purely static web pages.

Software 4 layer load balancing

The representative of software layer 4 load balancing is LVS (linux Virtual Server), LVS is an open source software, can realize simple load balance. Under linux LVS using IP load balancing technology and based on the content request distribution techniques. Scheduling has the very good throughput, will request a balanced division performed on a different server. And scheduler for automatic block, not with the server. And 1 set of server into a high availability server. The entire structure is transparent to customer service, don't need to modify the server and client application.

Thank you for reading, I hope to help you, thank you for your support of this site!


Related articles: