Updated on 2024-05-17 GMT+08:00

LVS Load Balancing

LVS FULLNAT mode: DNAT is performed on packets to change VIP VPORT to RIP RPORT, and SNAT is performed to change CIP CPORT to LIP LPORT. The packet is forwarded to the RealServer for processing. NAT is performed in the opposite direction to send packets returned from the RealServer to LVS through LIP. No configuration is required for back-end network devices and the RealServer.

LVS (Linux virtual server) is a virtual linux cluster server. A user requests an LVS VIP. LVS forwards the request to a backend server based on the forwarding mode and algorithm. The backend server receives the request and returns it to the user. Figure 1 shows the LVS networking.

Figure 1 LVS networking
Table 1 IP information

Server Name

Private IP Address

Public IP Address

OS Type

LVS-MASTER

192.168.0.157

x.x.x.x

EulerOS 2.8

LVS-SLAVE

192.168.0.234

x.x.x.x

EulerOS 2.8

CDN-1

192.168.0.3

x.x.x.x

EulerOS 2.8

CDN-2

192.168.0.46

x.x.x.x

EulerOS 2.8

  • EIPs are not required in actual services. You can delete EIPs bound to each VM after the environment is deployed.
  • The IP addresses used in the configuration commands in the following sections are for reference only. Replace them with the actual IP addresses in your service environment.