All Products
Search
Document Center

Server Load Balancer:Use CLB access logs to locate unhealthy backend servers

Last Updated:May 12, 2026

When a Classic Load Balancer (CLB) Layer 7 listener returns errors, access logs let you identify which backend server is causing the problem. CLB integrates with Simple Log Service (SLS) to store, query, and visualize these logs.

Note

Only HTTP and HTTPS listeners support access logs. Layer 4 listeners do not.

Prerequisites

Before you begin, ensure that you have:

Step 1: Configure access logs

  1. Log on to the CLB console.

  2. Log on to the CLB console.

  3. In the left-side navigation pane, choose Logs > Access Log.

  4. In the top navigation bar, select the region where your CLB instance is deployed.

  5. If this is your first time using access logs, grant the required permissions. Click Authorize, then on the RAM Quick Authorization page click Agree to Authorization again.

    Note

    Authorization is one-time only. If you use a Resource Access Management (RAM) user, the account owner must authorize the RAM user separately. See Authorize a RAM user to use the access log feature of CLB.

  6. On the Access Log (Layer 7) page, find your CLB instance and click Configure in the Actions column.

  7. In the Log Settings panel, set the Project and Logstore parameters, then click OK.

    Parameter

    Description

    Project

    An SLS project isolates and manages resources. Select an existing project from the drop-down list, or enter a name to create one. The project name must be unique, and its region must match the region of the CLB instance.

    Logstore

    An SLS Logstore collects, stores, and queries logs. Select an existing Logstore from the drop-down list, or enter a name to create one.

Step 2: View access log data

  1. Log on to the CLB console.

  2. In the left-side navigation pane, choose Logs > Access Log.

  3. In the top navigation bar, select the region where your CLB instance is deployed.

  4. Find your CLB instance and click View Logs in the Actions column to open the SLS console.

  5. Log entries are generated each time a client accesses CLB. You can view the log data in Simple Log Service.

  6. Enter an SQL statement to query log data. For example, you can run the following SQL statement to query the top 20 most active clients. You can analyze the request sources and make informed business decisions.

    * | select http_user_agent, count(*) as pv group by http_user_agent order by pv desc limit 20

Step 3: Locate unhealthy backend servers

Use the SLS dashboard to get a visual summary of backend server response times.

  1. On the project page, hover over the image.png icon in the left-side navigation pane and click Dashboards.

  2. Click the access log dashboard name, for example slb_layer7_access_center_en.

  3. In the top upstream_response_time section, sort the avg upstream_response_time(s) column in descending order.

  4. If a backend server's average response time exceeds 1 second, log on to that server to investigate the root cause.

Related topics