In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to achieve a virtual server through the IP tunnel in the Linux server cluster system, which has a certain reference value. Interested friends can refer to it. I hope you will gain a lot after reading this article.
Linux server cluster system is a solution adopted by many contemporary companies. Linux server cluster is connected by multiple machines to deal with complex problems. Homogeneous or heterogeneous computers can be connected together to complete specific tasks. This forms a cluster. LVS is the abbreviation of Linux virtual server, which means Linux virtual machine service.
In the VS/NAT cluster system, the request and response data packets need to go through the load scheduler. When the number of real servers is between 10 and 20, the load scheduler will become a new bottleneck of the whole cluster system. Most Internet services have such characteristics: the request message is short and the response message often contains a large amount of data. If the request and response can be handled separately, that is, the request is only responsible for scheduling the request in the load scheduler and the response is returned directly to the customer, it will greatly improve the throughput of the whole cluster system.
IP tunneling (IP tunneling) is a technology that encapsulates one IP message in another IP message, which enables data packets destined for one IP address to be encapsulated and forwarded to another IP address. IP tunneling technology is also known as IP encapsulation technology (IP encapsulation). IP tunnels are mainly used for mobile hosts and virtual private networks (Virtual Private Network), where tunnels are statically established. There is an IP address at one end of the tunnel and an IP address at the other end.
We use IP tunnel technology to encapsulate and forward the request message to the back-end server, and the response message can be returned directly to the customer from the back-end server. But here, there is a group of back-end servers instead of one, so it is impossible to establish an one-to-one tunnel statically, but to dynamically select a server to encapsulate and forward the request message to the selected server. In this way, we can use the principle of IP tunneling to form virtual network services on a single IP address from a group of servers. The architecture of VS/TUN is shown in figure 4, where each server configures the VIP address on its own IP tunnel device.
Figure the architecture of 4:VS/TUN
The workflow of VS/TUN is shown in figure 5: its connection scheduling and management is the same as in VS/NAT, except that its packet forwarding method is different. According to the load of each server, the scheduler dynamically selects a server, encapsulates the request message in another IP message, and then forwards the encapsulated IP message to the selected server. After receiving the message, the server first unencapsulates the message with the original destination address of VIP. The server finds that the VIP address is configured on the local IP tunnel device, so it processes the request, and then returns the response message directly to the customer according to the routing table.
Figure the workflow of 5:VS/TUN
It should be pointed out here that according to the default TCP/IP stack processing, the destination address of the request message is VIP, and the source address of the response message must also be VIP, so the response message does not need to be modified and can be returned directly to the customer. The customer thinks that he gets the normal service, but will not know which server handles it.
Figure 6: semi-connected TCP finite state machine
Thank you for reading this article carefully. I hope the article "how to realize virtual server through IP tunnel in Linux server cluster system" shared by the editor will be helpful to everyone. At the same time, I also hope you will support us and pay attention to the industry information channel. More related knowledge is waiting for you to learn!
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.