Linux using haproxy to build a web cluster
(2)
Case TWO:
First, experimental topological diagram
650) this.width=650; "style=" Float:none; "title=" Picture 1.png "src=" https://s3.51cto.com/wyfs02/M00/9A/7A/ Wkiol1lwh0fqqow1aadcp5iqmy4560.png "alt=" Wkiol1lwh0fqqow1aadcp5iqmy4560.png "/>
Second, Experimental Objectives: use keepalived+haproxy for dual standby and load balancing.
Third, Lab Environment:
650) this.width=650; "style=" Float:none; "title=" Picture 2.png "src=" https://s3.51cto.com/wyfs02/M00/9A/7A/ Wkiom1lwh0fhpncxaabivz6wln8278.png "alt=" Wkiom1lwh0fhpncxaabivz6wln8278.png "/>
each virtual machine firewall Iptables and NetworkManager Close
Four, Experimental Requirements:
Continue with the experiment of case one. K Eepalived ,
1.10:
Keepalived Configuration is the main
650) this.width=650; "style=" Float:none; "title=" Picture 3.png "src=" https://s3.51cto.com/wyfs02/M00/9A/7A/ Wkiol1lwh0is7driaaew7d2fcek616.png "alt=" Wkiol1lwh0is7driaaew7d2fcek616.png "/>
650) this.width=650; "style=" Float:none; "title=" Picture 4.png "src=" https://s4.51cto.com/wyfs02/M01/9A/7A/ Wkiom1lwh0jhi7-vaadrrhnftuc476.png "alt=" Wkiom1lwh0jhi7-vaadrrhnftuc476.png "/>
650) this.width=650; "style=" Float:none; "title=" Picture 5.png "src=" https://s3.51cto.com/wyfs02/M01/9A/7A/ Wkiol1lwh0nhk6ixaab5-vzl_-e916.png "alt=" Wkiol1lwh0nhk6ixaab5-vzl_-e916.png "/>
192.168.1.40 Server
The Haproxy configuration is the same as 1.10. the Ha service is started after configuration .
Keepalived configured as from, installed as with 1.10
650) this.width=650; "style=" Float:none; "title=" Picture 6.png "src=" https://s3.51cto.com/wyfs02/M01/9A/7A/ Wkiom1lwh0niyqrraaf3aygp15i447.png "alt=" Wkiom1lwh0niyqrraaf3aygp15i447.png "/>
650) this.width=650; "style=" Float:none; "title=" Picture 7.png "src=" https://s3.51cto.com/wyfs02/M02/9A/7A/ Wkiom1lwh0qralgzaabtjakdaqu714.png "alt=" Wkiom1lwh0qralgzaabtjakdaqu714.png "/>
Verify:
650) this.width=650; "style=" Float:none; "title=" Picture 8.png "src=" https://s2.51cto.com/wyfs02/M02/9A/7A/ Wkiol1lwh0qhxdezaacnllgascs844.png "alt=" Wkiol1lwh0qhxdezaacnllgascs844.png "/>
will hap/keep The primary server is down for testing:
650) this.width=650; "style=" Float:none; "title=" Picture 9.png "src=" https://s2.51cto.com/wyfs02/M00/9A/7A/ Wkiom1lwh0vxbzetaadcit0z1ci042.png "alt=" Wkiom1lwh0vxbzetaadcit0z1ci042.png "/>
This article is from the "Duyuheng" blog, make sure to keep this source http://duyuheng.blog.51cto.com/12879147/1943559
Linux using Haproxy to build a Web cluster (2)