release in order) authentication {(certified) Auth_type PASS (Authentication method: Password Authentication) Auth_pass 1111 (Enter a password; The maximum number of characters and digits is eight)} virtual_ipaddress { 192.168.200.16 #虚拟路由IP地址,以辅助地址方式设置 192.168.200.18/24 dev eth2 label eth2:1 #以别名的方式设置 }track_interface { #配置要监控的网络接口,一旦接口出现故障,则转为FAULT状态; eth0 eth1} nopreempt #定义工作模式为非抢占模式;preempt_delay 300 #抢占式模式下
Tags: managed pat LOB Ubuntu OSS SDN img proc I/OThe Cisco Application Policy Infrastructure Controller Enterprise Module (APIC-EM) is a software-defined network (SDN) controller that coordinates and manages the local area network (LAN) and wide area network (WAN) comprised of Cisco infrastructure. Apic-em hosts a large number of embedded services, including (but not limited to) network PNP, path tracking, PKI certificate infrastructure, and network assets. You can view all of these apps from th
scheduler allocates requests based on the actual connection of the backend real servers①.LC: Minimum Link (Least Connections)The scheduler dynamically dispatches network requests to the server with the fewest number of links established through the "least connection" scheduling algorithm. If the real server of the cluster system has similar system performance, the "Minimum connection" scheduling algorithm can be used to balance the load well.②.WLC: W
hash scheduling algorithm.In the actual application, the source address hash schedule and the target address hash schedule can be used together in the firewall cluster, they can guarantee the unique entrance of the whole system. 9, shortest expected delay (shortest expected delay scheduling) abbreviation SED based on the WLC algorithm, illustrateABC three machines weigh 123 respectively, and the number of connections is 123,name if you use the
LVS scheduling algorithm (scheduling method) A total of 10 kindsone, static method: Only according to the algorithm itself scheduling1. RR (Round Robin): Polling2. WRR (werghted Round Robin): Weighted polling3, SH (source Hashing): Source Address Hash4, DH (DH): Target Address HashIi. Dynamic Method: Based on the algorithm and the current load status of Rs1, LC (Least Connection): Minimum connectionAlgorithm: overhead=active*256+inactiveOverhead: Minimum loadActive: Active ConnectionInactive: In
of connections is +1Its connection aborted or timed out, its number of connections-1. When the server weight is 0 o'clock, it indicates that the server is unavailable and is not scheduledSimple algorithm: active*256+inactive (whichever is small)(2) WLC (Weighted least-connection scheduing): Weighted minimum connection. The weighted minimum connection scheduling algorithm is the minimum connection scheduling algorithm, and each server uses correspondi
of the peer heartbeat interfaceBcast eth1 // Nic that broadcasts heartbeat informationAuto_failback on // Default settingsNode node1.a.com // Configure the director master node, which is consistent with uname-n.Node node2.a.com // Configure the director backup node3. configure the director script# Vim/etc/init. d/ipvs#! /Bin/bash## LVS script for VS/DR#./Etc/rc. d/init. d/functionsVIP = 172.16.4.1RIP1 = 192.168.0.50RIP2 = 192.168.0.60PORT = 80Case "$1" inStart)Echo "start LVS"/Sbin/ifconfig eth
algorithm.
There are two load balancing algorithms:Weighted round robin (WRR) and Weighted least connections (WLC ),WRR uses the Weighted Round robin algorithm to allocate connections. WLC assigns the next connection to a server with fewer active connections through a certain weight value.
2) SLB ConfigurationThe configuration is divided into two parts,The first part is to use the slb serverfarm serverfarm
Public IP address.
203. x. x. B is the IP address of the domain name for Loadbance.
203. x. x. c is the first RealServer.
203. x. x. d is the second RealServer.
# Cat/etc/sysconfig/ha/lvs. cf
Serial_no = 45
Primary = 203. x. x.
Service = lvs
Rsh_command = ssh
Backup_active = 0
Backup = 0.0.0.0
Heartbeat = 1
Heartbeat_port = 539
Keepalive = 10
Deadtime = 20
Network = direct (change the Tunl mode to tunnel)
Nat_nmask = 255.255.255.255.255
Reserva
-- udp-serviceservice-address indicates that the virtual server provides udp services.[Vip: port] or [real-server-ip: port]-F -- fwmark-servicefwmark indicates the service type marked by iptables.-S -- the scheduling algorithm used by schedulerscheduler, which has the following options:Rr | wrr | lc | wlc | lblc | lblcr | dh | sh | sed | nq,The default scheduling algorithm is: wlc.-P -- persistent [timeout
connection, weighted minimum connectionOverhead= (active*256+inactive)/weight, small calculation results will be selected for next hop RS ServerDisadvantage: When the overhead is the same, the top-down poll response, the weight is small if the above the list will respond(3) Sed:shortest expection delay, shortest expected delayOverhead= (active+1) *256/weightCons: Troubleshoot WLC issues, but cannot ensure that hosts with small weights must respond(4)
network segment, and for private network IP, VIP for external service ip,director, Real server Set VIP LVS Scheduling algorithm: Round call scheduling (Round Robin) (abbreviated RR), weighted round call (Weighted Round Robin) (WRR), least link (least connection) (LC), weighted least link (Weighted least Connections) (WLC) and so on (other algorithms, reference http://www.aminglinux.com/bbs/thread-7407-1-1.html) 2. Lvs/nat Configuration Three servers
the check
Keepalived's LVS configuration The LVS section is configured with "Virtual_server" as the starting mark, which consists of two parts, namely the Real_server segment and the Health detection section. Here is a sample configuration of the common options for the Virtual_server segment: Virtual_server 192.168.12.200 80 { Delay_loop 6 Lb_algo RR Lb_kind DR Persistence_timeout 50 Persistence_granularity Protocol TCP Ha_suspend VirtualHost Sorry_server Virtual_server: Set the star
theLetter3, each internal RS node gateway address, must be configured as the scheduler lb private LAN within the physical network card address。。。Omitted####################### #IPVS调度器实现了如下十种负载调度算法: LVs scheduling algorithm10 Kinds of scheduling algorithmsFixed scheduling algorithm: Rr,wrr,dh,shDynamic scheduling algorithm: Wlc,lc,lblc,lblcr,sed,nq.Three most commonly used RR WRR WLC10 scheduling algorithms are shown in the following table:RR: Pollin
also use the vrrp feature of keepalived.-- 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 the UDP Service [VIP: Port] or [real-server-IP: Port]. -F -- fwmark-service fwmark indicates the service type marked by iptables. -S -- scheduler SchedulingAlgorith
-d Delete Virtual Service--clear-c Clear the whole table--restore-r Restore rules from stdin--save-s Save rules to stdout--add-server-a add real server with options--EDIT-SERVER-E edit Real Server with options--delete-server-d Delete Real Server--list-l|-l List the table--zero-z Zero counters in a service or all services--set TCP tcpfin UDP set connection timeout values--start-daemon Start Connection Sync daemon--stop-daemon Stop Connection Sync daemon--help-h Display this Help messageOptions:--
order of distribution, such as a weight of 2, gives the server 2 access requests, and then sends the access request to the step-down server.
Source Address hash (source Hashing) : Sh. A hash table is recorded with the source address of the access and the address of the server being distributed, and LVS sends the request to the corresponding server when the source address is accessed after the connection is disconnected, because it affects the equalization effect very rarely.
Destination
, Configuration keepalivedVi/etc/keepalived/keepalived.confInputDelete all content and enter the following in Lvs-master:! Configuration File for Keepalivedglobal_defs {notification_email {[email protected]} Notification_email_from [Email protected] smtp_server smtp.163.com # smtp_connect_timeout router_id lvs_devel}# vip1vrrp_instance VI_1 { State MASTER #备份服务器上将MASTER改为BACKUP interface eth0 lvs_sync_daemon_inteface eth0 virtual_router_id On the Priority 100 # Backup service, change 100
: WLC,LC,LBLC,LBLCR
Algorithm
Description
Rr
Polling algorithm, which assigns the request to a different RS node, that is, an equally distributed distribution in the RS node. This algorithm is simple, but only suitable for the RS node processing performance is similar to the situation
Wrr
Weighted rotation dispatch, which assigns tasks according to the weights of different Rs. RS with higher wei
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.