In the previous section, we have configured and tested LBaaS, and today we focus on how Neutron uses Haproxy to achieve a balanced balance.
Running IP netns on the control node, we found that Neutron created a new namespace qlbaas-xxx.
The namespace corresponds to the pool "Web servers" we created. Its naming format is qlbaas-< pool id>.
You can view its settings through IP a.
The VIP 172.16.100.11 is already configured on the namespace interface. The corresponding configuration of the interface can also be found in the Port list of the subnet.
For each pool,neutron, a haproxy process is initiated to provide load balancering functionality. To find the haproxy process through the PS command:
The Haproxy configuration file is saved in the/opt/stack/data/neutron/lbaas/< pool id>/conf. To view the configuration content of Web servers:
can see: 1. The HTTP address used by Frontend is vip:802. The HTTP addresses used by backend are 172.16.100.10:80 and 172.16.100.9:803. The Balance method is Roundrobin
The content is consistent with our previous configuration.
The above is the Neutron realization LBaaS of the reason.
In the next section we discuss how to access the VIP via floating IP.
LBaaS Implementation Mechanism-play OpenStack 5 minutes per day