Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Several knowledge points about load balancing that you need to know

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

The following brings you several knowledge points about load balancing that you need to understand. I hope it can give you some help in practical application. There are many things involved in load balancing, there are not many theories, and there are many books on the Internet. Today, we will use the accumulated experience in the industry to do an answer.

Load balancing layering:

Layer 2 load balancer: by rewriting the destination MAC address of the message to the upstream CVM MAC address, the source IP and destination IP addresses remain unchanged, and the load balancer server and the real server share the same VIP, such as LVS DR working mode.

Layer-4 load balancer: forwards messages to upstream servers (different IP addresses + ports) according to port, such as LVS+NAT mode, HaProxy.

Layer-7 cloud load balancer: forwards messages to upper-layer servers (different IP addresses + ports) according to port number and application layer protocols such as HTTP hostname and URL, such as HaProxy and Nginx.

In a word, the load balancing of LVS and others is to forward the packets requested by the user, while the Nginx reverse proxy receives the request from the user and then reinitiates the request to request the node behind it.

How LVS-DR works:

Working in the data link layer, LVS and the upstream server share the same VIP, and the load balance is achieved by rewriting the destination MAC address of the message to the upstream server MAC address. The upstream server responds directly to the message to the client without going through the LVS load balancer to improve performance.

Because LVS and upstream servers must be in the same subnet, in order to solve the subnet problem without affecting performance, you can choose to hang HaProxy after LVS and solve cross-network and performance problems through layer 4-7 load balancer HaProxy cluster.

The port number cannot be modified (for example, source 80-- > destination 80). The port number should be consistent.

After reading the above knowledge points about load balancing, if there is anything else you need to know, you can find out what you are interested in in the industry information or find our professional and technical engineer to answer it. Technical engineers have more than ten years of experience in the industry.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report