1, Haproxy is a popular cluster scheduling tool, similar cluster scheduling tool has many, such as Nginx,lvs compared to, LVS performance is best, but build relatively complex, Nginx upstream module support cluster function, but the cluster node health Check function is not strong, Performance is not haproxy good.
2, Haproxy: Easy to build, access control can be carried out, support health check
LVS: Best performance, complex construction
Nginx: With upstream module, the performance is slightly worse
3. HTTP request:
Two ways: Get mode and post mode
Return status: Normal status code: 2XX, 3xx
Exception status code: 4XX, 5xx
4. RR: Polling Schedule
LC: Minimum number of connections
SH: Source-based access scheduling
5. Haproxy configuration file: haproxy.cfg
Consists of Globa (full segment), defaults (default segment), and listen (application component settings)
Listen Webcluster 0.0.0.0:80
Option Httpchk get/index.html
Balance Roundrobin (RR algorithm)
Server Inst2 192.168.1.10:80 check Inter fall 3
6, haproxy default log file is: syslog
You can customize where logs are stored and rank
Build a Web cluster using Haproxy