For web services that require registration and login, HTTP load balancing is recommended, such as www.taobao.com and www.yhd.com, two online shopping malls in China. The client and load balancer can communicate through a direct connection or VPN peering connection.
- HTTP is used to forward web messages.
- The sticky session feature is enabled. A cookie ensures that requests of a single user are sent to the same server for processing, preventing login exception and timeout.
- Requests can be evenly distributed. Requests of different users are forwarded to different servers to balance the load.
- Service faults can be quickly detected and isolated.
- Select a protocol.
- Select an algorithm.
- Enable the sticky session feature.
- Configure a health check.
- Select either TCP or HTTP as the health check protocol. If you select HTTP, you must ensure that a server health check page is available and response code 200 is returned when you visit the page.