All Products
Search
Document Center

Serverless App Engine:Bind a CLB instance to an application, and generate a public or private IP for it

Last Updated:Dec 08, 2025

An application on SAE is not accessible from the public network by default. It can be accessed within the VPC, but the private network IP may change, due to changes or restarts. To address these, bind a public or private CLB to the application. This is to enable access through a public or private IP and facilitating load balancing.

Procedure

  1. On the SAE Application List page, select a destination region and namespace at the top. Click the target Application ID.

  2. On the Basic information page, click the Application Information tab. Then, in the Application Access Settings section, configure the Public Endpoint or Private Endpoint:

    • Public Endpoint: Enable access through a public IP by binding a public CLB.

    • Private Endpoint: Enable other applications or clients within the VPC to access the application through a private IP by binding a private CLB.

    Note

    If you want to access the application through both public and private IPs at the same time:

    lMRxCikgMK

    Configuring the Public Endpoint and Private Endpoint is the same. This topic uses the Public Endpoint as an example. Click Add Internet CLB Access.

  3. Bind a CLB Instance to the Application: Create a New CLB Instance or Bind an Existing CLB Instance.

    Create a new CLB instance

    In the Add Public CLB Access dialog box, select Create CLB Instance from the CLB Instance drop-down list.

    SAE automatically performs CLB quota and account balance checks. After the configuration, SAE will purchase a new CLB instance and bind it to the application.

    RrxIxI8Tfm

    Bind an existing CLB instance

    In the Add Public CLB Access dialog box, select an existing CLB from the CLB Instance drop-down list.

    The CLB instance cannot be a shared-resource, container service exclusive, or other product-purchased or exclusive CLB instance to prevent listener configuration conflicts.
    If it is a public CLB instance, ensure that the CLB instance and the SAE application are in the same region. If it is a private CLB instance, ensure that the CLB instance and the SAE application are in the same VPC. Otherwise, the CLB instance cannot be selected from the list.

    image

  4. Please follow the instructions, configure at least one listener. To add multiple listeners, click Add Listener. For detailed descriptions of the listener types, see CLB Listeners. Click Confirm.

    Configuration Item

    Description

    Example Value

    HTTP

    • HTTP Port: Provides public access to the application. Range is [1,65535].

    • Container Port: Listening port defined by the program.

    • HTTP Port: 80

    • Container Port: 8080 (default port for web services)

    HTTPS

    • HTTPS Port: The CLB port that provides public access to the application. Range is [1,65535].

    • SSL Certificate: SSL certificate. Select an uploaded SSL certificate from the drop-down list.

    • Container Port: The process listening port defined by the program.

    TCP

    • CLB Port: The CLB port that provides public access to the application. Range is [1,65535].

    • Container Port: Listening port defined by the program.

    • CLB Port: 21

    • Container Port: 8080 (default port for web services)

    UDP

    • CLB Port: The CLB port that provides public access to the application. Range is [1,65535].

    • Container Port: The process listening port defined by the program.

    • CLB Port: 49152

    • Container Port: 8080 (default port for web services)

    If you see No available instances for the application. Please scale out and retry, this indicates that the application instances have been reduced to zero. Manually scale out before attempting to bind a CLB instance to the application.
    The listeners created on the SAE side will be automatically synchronized to the CLB side. View them in the Server Load Balancer console. It is recommended to manage their configurations only on the SAE side. Do not to change the configurations on the CLB side. For more information, see Avoid Configuration Conflicts between SAE and CLB.

    Avoid configuration conflicts between SAE and CLB

    The listeners created on the SAE side will be automatically synchronized to the CLB side. SAE will automatically maintain them in scenarios such as application restart, scale-out, or scale-in. Therefore, it is recommended to manage these listener configurations only on the SAE side. Do not to change the configurations on the CLB side. If you need to modify the configurations from SAE, such as listeners or virtual backend server groups. On the CLB side, please refer to the table below to check the legality of the operations. This is to avoid configuration failure or unknown errors.

    Perform additional configurations on the CLB side (such as creating new listeners for other resources). But for CLB instances purchased by SAE, the corresponding instance will be automatically released after deleting public/private CLB access or directly deleting the application. The configurations on the CLB side will also be lost.

    Type

    Modification Item

    Is the operation legal

    Instance

    Instance Name

    Yes

    Instance Tags

    Do not perform the following operations:

    • Change the tags created by SAE

    • Delete the tags created by SAE

    EIP Binding

    Yes

    Upgrade/Downgrade

    Yes

    Bandwidth

    Yes

    Listener

    Listener Name

    No

    Bandwidth

    Yes

    Scheduling Algorithm

    Yes

    vServer Group ID

    No

    Resource Access Management

    Yes

    Add x-forward-for request field

    Yes

    Gzip Compression

    Yes

    Session Persistence

    Yes

    Health Check

    Yes

    Timeout Period

    Yes

    Certificate Configuration

    No

    Forwarding Rule

    No

    vServer Group

    Name

    No

    Backend Server (weight, instance, port, etc.)

    No

  5. Wait for the CLB binding to complete. In the Public Endpoint section, view the IP address and port of the application.

    If an SAE application is handling client requests across multiple instances, CLB employs Polling by default for load balancing. To change the algorithm, see Add TCP Listener for details.

    image

    Copy the generated IP address and port into the browser and press Enter to verify their accessibility through the public network.

    When accessing, you may also need to add access path and other information in the URL. The complete URL format is <access protocol>://<IP address>:port/<access path>, for example, http://8.154.xx.xx:80/hello.

    If the IP address and port information do not appear, the CLB binding failed. Please check the change records and fix them. For more information, see View Change Records.

  1. (Optional) If you want clients to access the application through a custom domain name, you need to add a DNS record in the DNS console. This is to point your domain name to the public access IP address.

Related operations

Delete or edit CLB access

Warning

After deleting public/private CLB access or directly deleting the application, the CLB instance will be automatically released.

  • After deletion, the same CLB instance and access address cannot be retrieved. Please proceed with caution.

  • After deletion, visit the Server Load Balancer console to check and ensure that the CLB instance has been released. If the CLB instance is still in the billing state, and you confirm that you no longer need it, please manually release the CLB instance.

  1. On the Basic Information page, click the Application Information tab. Find the Application Access Settings section. Then click the edit or delete link for the Public Endpoint or Private Endpoint as needed.

    lMIcqP1UA9

  2. In the pop-up dialog box, follow the instructions and click Confirm.