650) this.width=650; "Src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20161201-1480601346539077335.jpg "alt=" 5.5.png "/>
The Load Balance as a service (LBaaS) is an advanced network service provided by Neutron.
LBaaS allows tenants to create and manage load balancer on their own networks.
Load balancer can be said to be a relatively basic component in a distributed system.
It receives the request from the front end and then forwards the request to a processing unit in the backend resource pool by a balanced policy to complete processing.
The load balancer allows for high-availability and scale-out of the system.
LBaaS has three main concepts: Pool Member,pool and Virtual IP
Pool Member
Pool Member is a layer 4 entity that has an IP address and is serviced externally through a listening port.
For example, Pool Member can be a web Server,ip for 172.16.100.9 and HTTP services via Port 80.
Pool
The pool is made up of a pool of Member. These Pool Member usually provide the same type of service.
For example, a Web server pool that contains: web1:172.16.100.9:80 web2:172.16.100.10:80
Virtual IP
Virtual IP, also known as a VIP, is the IP address defined on the load balancer.
Each pool member has its own IP, but the external service is through the VIP.
The load balancer is responsible for listening for external connections and distributing the connection to the pool member.
The external client knows only the VIP, does not know and does not need to care whether there is a pool or how many pool member.
OpenStack Neutron is currently implemented by default through the HAProxy software LBaaS.
HAProxy is a popular open source load balancer.
Neutron also supports some other third-party load balancer.
Shows how HAProxy implements the load balancer.
650) this.width=650; "Src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20161201-1480601347106021980.jpg "/>
The left figure is the data flow that the client sends the request to the Web server:
1. Client 10.10.10.4 access the server's extranet IP 10.10.10.7 through the browser.
2. Request to reach the router first, set the destination address as the server's intranet VIP 172.16.100.11
3. VIP settings on Load balancer, load balancer Select the pool member WEB1 after receiving the request,
Set the destination IP of the packet to WEB1 address 172.16.100.9.
4. Before forwarding the packet to WEB1, load balancer modifies the source IP of the packet to its own VIP address, 172.16.100.11,
The purpose is to ensure that WEB1 can send the response data back to load balancer.
5. WEB1 received the request packet.
The image on the right is the data flow that the Web server answers:
1. WEB1 sends the data packets to the load balancer.
2. After the load balancer receives the data sent by WEB1, the destination IP is modified to the Client's address 10.10.10.4. At the same time, the source IP of the packet is modified to the VIP address 172.16.100.11, which ensures that the Client can send the subsequent data to itself.
3. Load balancer sends data to the router.
4. The router restores the original address of the packet to the server's extranet IP 10.10.10.7 and sends it to the Client.
5. The Client receives the response data.
This is how the Load Balance as a service works.
We will begin to practice Neutron LBaaS in the next section.
650) this.width=650; "Src=" http://7xo6kd.com1.z0.glb.clouddn.com/ Upload-ueditor-image-20161201-1480601427961005999.png "alt=" two-dimensional code + fingerprint. png "/>
Understanding Neutorn LBaaS-5 minutes a day to play OpenStack (120)