DR:
Arp_ignore = 1
Arp_announce = 2
Arrays: Variable Arrays
Array_name= ("" "" "")
DECLARE-A A variable is explicitly declared to be an array
Persistent connection of LVS:
Regardless of the algorithm used, the LVS persistent connection can be distributed from the same client request to the same RS for a certain amount of time.
Persistent connection template (memory buffer):
The mappings between each client and the RS assigned to it:
Ipvsadm-l-C Displays the current number of persistent connections
ipvsadm-a| E ...-p timeout: Specify the length of the connection, default 300 seconds
In SSL-based: A persistent connection is required:
PPC: The request from the same client to the same cluster service is always directed to the previously selected RS; 1-1
IPVSADM-E-T 192.168.10.11:80-s rr-p 600 Specifies the length of the persistent connection
PCC: Requests from the same client for all ports are always directed to the previously selected RS; 1-all
Ipvsadm-c
Ipvsadm-a-T 192.168.1.10:0-s-rr-p 600
Ipvsadm-a-T 192.168.1.10:0-R 192.168.1.12-g-W 2 (0 for all ports requests are Cluster service)
Ipvsadm-a-T 192.168.1.10:0-R 192.168.1.11-g-W 3
All ports are defined as cluster services and are forwarded to RS
PNMPP: Persistent firewall tag Connection 1-n
Preriuting
80:10
23:10
Mark two unrelated ports as a number and define the tag as a Cluster service (integer labeled 0 to 99, as long as the firewall has not been used before)
Iptables-f-T Mangle
Iptables-a prerouting-i eth0-t mangle-p tcp-d 172.16.100.6--dport 80-j MARK--set-mark 1
Iptables-a prerouting-i eth0-t mangle-p tcp-d 172.16.100.6--dport 443-j MARK--set-mark 1
Ipvsadm-a-F 1-s rr-p 3600
Ipvsadm-a-F 1-r 172.16.100.7-g-W 2
Ipvsadm-a-F 1-r 172.16.100.8-g-W 1
This article from "Operation and maintenance Growth Road" blog, declined reprint!
Six--lvs persistent connections in the Linux cluster series