Load Balancing related content

Source: Internet
Author: User

Software load Balancer LVS typically have a Dr, tunnel, Nat mode, which is typically deployed with Dr, Nat mode.

1, in the DR Mode, need to modify the MAC address of the packet and through the situation of ARP broadcast to find Realserver, so the requirements of the LVS VIP and realserver IP must be within the same network segment

2, Nat mode only in the direction of the LVs ingress NAT, packet forwarding to the backend realserver, the packet backhaul must be sent back to the LVS inside the connection port, that is, the gateway address of the Realserver to the LVS server's internal connection port IP.

Ali adds the full NAT mode on the LVS basis, which is closer to the commercial hardware load balancing implementation mode, when the packet flows through the LVS server in the external business interface and the internal connection ports are NAT mode, do not need to modify any configuration realserver.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/76/5F/wKioL1ZRvGXj6RnXAABzLsBtVvg574.jpg "title=" Load Balancer fullnat.jpg "alt=" Wkiol1zrvgxj6rnxaabzlsbtvvg574.jpg "/>

In order to ensure high availability, load balancing needs to adopt cluster mode, usually the LVS cluster can be used in conjunction with keepalived to realize the primary and standby cluster, and the LVS cluster can also use OSPF multipath equivalent routing method to share the service from the routing level to form a multi-master cluster. When publishing a business VIP in OSPF, it is necessary to detect whether the backend Realserver business is alive, in such a way as HRI (healthy route injection).

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M00/76/5F/wKioL1ZRwVGC0IlmAAC8qTF1JF0453.jpg "title=" NAT mode + Keepalived.jpg "alt=" Wkiol1zrwvgc0ilmaac8qtf1jf0453.jpg "/>

The above diagram adopts lvs+keepalived to realize the main and standby cluster, keepalived adopts VRRP protocol, communicates through multicast address 224.0.0.18 in VRRP, and negotiates one of them as active and another as backup by configuration.

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/76/5F/wKioL1ZRxHrQ7iwHAAD945ZGdL4344.jpg "title=" Load balancer equivalent route. jpg "alt=" wkiol1zrxhrq7iwhaad945zgdl4344.jpg "/>

Running zebra on the LVS, establishing an OSPF peer neighbor relationship with the switch, using OSPF equivalent routing to form load sharing from the routing plane, thus forming a multi-active cluster, the LVS stand-alone detects the back-end realserver server survival State, Then inject the business VIP into the OSPF area.

In the hardware load balancer deployment, the formation of multi-master cluster also has a variety of modes, the following is a vendor hardware load balancer high-availability cluster deployment situation.

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M01/76/5F/wKioL1ZRxkKjZQHOAAEmZYvI8Og020.jpg "style=" float: none; "title=" 1.jpg "alt=" Wkiol1zrxkkjzqhoaaemzyvi8og020.jpg "/>

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/76/60/wKiom1ZRxerBfuqiAAEGmTXtzXk733.jpg "style=" float: none; "title=" 2.jpg "alt=" Wkiom1zrxerbfuqiaaegmtxtzxk733.jpg "/>

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M02/76/5F/wKioL1ZRxkSwgFz_AAES3elfkkQ439.jpg "style=" float: none; "title=" 3.jpg "alt=" Wkiol1zrxkswgfz_aaes3elfkkq439.jpg "/>

650) this.width=650; "src=" http://s2.51cto.com/wyfs02/M00/76/60/wKiom1ZRxevjRS28AAES4Yq6iGM550.jpg "style=" float: none; "title=" 4.jpg "alt=" Wkiom1zrxevjrs28aaes4yq6igm550.jpg "/>



This article from "Say Carefree not carefree" blog, please be sure to keep this source http://maorui2005.blog.51cto.com/863709/1771619

Load Balancing related content

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.