-Z--zeroVirtual Service Table counter clear 0 (empty current number of connections, etc.)--set TCP Tcpfin UDPSetting the connection timeout value--start-daemonStart the synchronization daemon. He can be followed by master or backup to indicate that the LVS router are master or backup. Keepalived's VRRP function can also be used in this function.--stop-daemonStop the synchronization daemon-H--helpDisplay Help informationOther options::-T--tcp-service service-addressDescription of the service prov
of the hash list to find the corresponding server, if the server is available and not overloaded, send the request to the server, otherwise return empty. 4.SH: Source Address hash (source hash) Origin address hash "scheduling algorithm according to the requested source IP address, as a hash key (HashKey) from the static distribution of the hash list to find the corresponding server, if the server is available and not overloaded, send the request to the server, otherwise return empty2. Dynamic A
: Scheduling method, least connection, equivalent to the WLC algorithm in the WLC, making scheduling decisions based on the number of request connections hosted by the backend serverKeepAlive 5: The time between the activation of Nginx and the backend upstream server using persistent connection, the general backend is the cache server should be set to a long connection, but after the HTTP server is not reco
the virtual server is TCP [Vip:port] or [Real-server-ip:port]- u --udp-service service-address Description of the service provided by the virtual server is UDP [Vip:port] or [Real-server-ip:port]The- f --fwmark-service fwmark description is a service type that has been iptables marked.- s --scheduler Scheduler uses a scheduling algorithm that has such several options RR|WRR|LC|WLC|LBLC|LBLCR|DH|SH|SED|NQ,The default scheduling algorithm is:
-address service-address is host[:p ort] (define a UCP-based virtual service)--fwmark-service-f fwmark Fwmark is an integer greater than zero (defines the tag code for the firewall)--scheduler-s Scheduler One of the rr|wrr|lc|wlc|lblc|lblcr|dh|sh|sed|nq,the default scheduler is WLC. (Define scheduling algorithm)2. Delete the Cluster serviceipvsadm-d-t|u|f service-address-D,--delete-service (delete Cluster s
.ipvsadm-save >/path/to/somefile3.ipvsadm-restore 4.lvs Scheduling algorithm:1. Fixed schedulingI. RR: round-callII. WRR: Weighted round callIii. Sh:source Hash, source address hash (within a certain time, the same source address sent to the same host) session affinity, session sharingIV. DH: For the same request, send to the same server (cache server)2. Dynamic scheduling (default to WLC)I. LC (least-connection) Minimum connection1) Active*256+inacti
Linux kernel earlier than 2.4.23 needs to be re-compiled and patched to use LVS, after LVS directly made into the kernel using grep-i-C5ipvs/boot/config-'uname-R', you can view the operating system of ipvsadm in the user space/ipvs working in the kernel space...
Implementation of LVS in linuxLinux kernel earlier than 2.4.23 needs to re-compile and patch the kernel to use LVS, and then the LVS directly runs in the kernelUse grep-I-C 5 ipvs/boot/config-'uname-R' to viewIpvsadm works in the user sp
) this.width=650; "src=" http://s4.51cto.com/wyfs02/M00/79/AF/wKioL1aYX5mSWLPJAAFPBeEBYsY000.jpg "title=" dr.jpg "alt=" Wkiol1ayx5mswlpjaafpbeebysy000.jpg "/>2, to the user's request to dispatch to the back-end of the RS, is required by the scheduling algorithm to achieve, LVS commonly used the following scheduling algorithms:Fixed scheduling algorithm: Rr,wrr,dh,shDynamic Scheduling algorithm: WLC,LC,LBLC,LBLCR(1) RR round call scheduling (Round Robi
client;4, port mapping is not supported;5, the Support IP tunneling OS can be used for realserver;2.2.4.FULLNATFullnat: The Destination address and the original address translation are done on a NAT basis.The model diagram is as follows:650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/79/96/wKioL1aVu-Th-h8iAAJ--NlVGk4682.jpg "title=" LVS model " alt= "Wkiol1avu-th-h8iaaj--nlvgk4682.jpg"/>2.3.LVS Scheduling methodStatic (fixed method):RR, WRR, SH, dh RR: RoentgenWRR: weighted round ca
}vrrp_instanceinside_network{statemaster# Specify that for master, which is backup, if the value set for nopreempt does not work, the master preparation priority decides interfaceeth0# Set network adapter dont_track_primary #忽略vrrp的interface错误 for instance bindings (not set by default) track_interface{ #设置额外的监控, the network card inside the problem will switch eth0eth1 }mcast_src_ip #发送多播包的地址, if you do not set the default primaryip using a bound NIC garp_master_delay #在切换到master状态后, deferred gr
the RS server to bind VIP, suppress ARP, configuration complex.6, LAN environment generally use DR Mode, WAN environment can be used Tun mode, but currently in the WAN environment, request forwarding more by Haproxy/nginx/dns dispatch agent replaced. Therefore, the TUN model has been applied to domestic companies very little. Cross-room application either pull the fiber into the local area network, or DNS scheduling, the underlying data is synchronized.7, direct external access to the business,
-- Start-daemon: Start the synchronization daemon. It can be followed by a master or backup.Ming LVS router is a master or backup. You can also use the keepalivedVrrp function.-- Stop-daemon: Stop synchronization daemon-H -- help: displays help information.
Other options:-T -- TCP-Service-Address indicates that the virtual server provides the TCP Service.[VIP: Port] or [real-server-IP: Port]-U -- UDP-Service-Address indicates that the virtual server provides UDP services.[VIP: Port] or [real-se
server record-D -- delete-server: delete a Real server record in a virtual server record.-L |-l -- list displays the kernel virtual server table-Z -- zero virtual service table counters are cleared (the current number of connections is cleared, etc)-- Set tcp tcpfin udp sets the connection timeout value-- Start-daemon: start the synchronization daemon. It can be followed by a master or backup to indicate that the LVS Router is a master or backup. You can also use the VRRP feature of keepalived.
server)
Config Dr GW
Tunneling
Non-arp Device/tie VIP
Server Network
Private
Lan/wan
LAN
Server number(Number of nodes)
Low 10-20
High 100
High 100
Real Server Gateway
Load Balance
OWN Router
OWN Router
Advantages
Address and Port conversions
WAN Environments Encrypt data
Highest performance
Disadvantages
Low efficiency
Tunnel support Require
LVS-NAT LVS-DR model of Load Balancing
LVS is short for Linux Virtual Server. It is a Virtual Server cluster system that can define one or more backend servers. Worker s in the INPUT kernel.
LVS Scheduling Methods: 10Static Method: only scheduling based on the algorithm itselfRr: Round RobinWrr: Weighted RR Weight Round RobinSh: source hashing supports session binding Based on ip address anti-balancingDh: destination hashing is not used much according to firewall settings
Dynamic Method: based o
example, the two realservers are both processing 500 connections at the beginning. Before the next request arrives, server1 only disconnects 10 connections, while server2 disconnects 490 servers. However, at this time, it is redirected to server1, server1.
The dynamic scheduling mode is used to calculate who should be scheduled for the next connection based on the RS's busy degree feedback (the dynamic feedback load balancing algorithm considers the server's real-time load and response, constan
master or backup to indicate that the LVS Router is a master or backup. The VRRP function of keepalived can also be used in this function.
-- Stop-daemon stop synchronization daemon-h -- help display help information other options:-t -- tcp-service-address indicates that the virtual server provides the tcp service [vip: port] or [real-server-ip: port]-u -- udp-service-address indicates that the virtual server provides the udp service [vip: port] or [real-server-ip: port]-f -- fwmark-service fw
reduced by one. When the system is implemented. We also introduce a value of 0 o'clock when the server is weighted. Indicates that the server is not available and is not scheduled.Simple algorithm: Active*256+inactive (who's small. Pick who)②WLC (Weighted least-connection scheduling): Weighted minimum connectionThe weighted minimum connection scheduling algorithm is a superset of minimum connection scheduling. Each server uses corresponding weights t
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.