All Products
Search
Document Center

:Backend database failures lead to abnormal access to all sites in the same listener of SLB

更新時間:Feb 25, 2022

Question

A fault in the backend database causes the status of the health check of the SLB instance to be "abnormal", affecting the access of all the sites under the same listener. For example, the following two websites are running on the backend server of an HTTP Listener: When the backend database service of a dynamic website is unavailable, the static website is also inaccessible, and an HTTP 502 error is returned.

  • Static Website: www.example.com
  • Dynamic Websites: app.example.com

Cause

Both websites use the same listener, and the health check domain configured for the listener is the domain of a dynamic website. When the backend database service of a dynamic website fails, the dynamic website is affected on all backend servers and the health check remain in the "abnormal" state. There are no backend servers whose status is normal in the health check. Therefore, the SLB instance does not forward traffic to these servers. As a result, static websites in the listener are not accessible.

Answer

Alibaba Cloud reminds you that:

  • Before you perform operations that may cause risks, such as modifying instance configurations or data, we recommend that you check the disaster recovery and fault tolerance capabilities of the instances to ensure data security.
  • You can modify the configurations and data of instances including but not limited to Elastic Compute Service (ECS) and Relational Database Service (RDS) instances. Before the modification, we recommend that you create snapshots or enable RDS log backup.
  • If you have authorized or submitted sensitive information such as the logon account and password in the Alibaba Cloud Management Console, we recommend that you modify such information in a timely manner.

You can select either of the following two solutions for this issue based on the actual situation.

  • Method 1: change the health check domain name to the domain name of a static website.
  • Method 2: use different SLB instances for load balancing between dynamic and static websites.

Application scope

  • SLB