All Products
Search
Document Center

Serverless App Engine:Use an existing listener to configure ALB instance-based gateway routing

Last Updated:Sep 03, 2024

In this example, your applications are deployed on Elastic Compute Service (ECS) instances or other Alibaba Cloud services, and port 80 of an Application Load Balancer (ALB) instance is available for external deployment. If you want to deploy applications on SAE and reuse port 80, you can use the solution that is described in this topic to implement hybrid deployment.

Note In this example, the port values are provided only for reference. You can specify port values based on your business scenario.

Solution

The main modules of ALB instances are listeners and server groups. If SAE application instances act as a server group of the ALB instance, the application can be mounted by the listener with port 80. If you add a listener with another port to the ALB ingress gateway, the related SAE applications can be created as a server group of the ALB instance. For more information, see Configure gateway routing for an application by using an ALB instance and Create and manage server groups.

  1. Bind a port that is not used by the ALB instance in the SAE console, for example, 1888, and associate the port with the required applications.
    dg_reuse_alb_ingress_existing_listener_for_sae_step1
  2. Create a forwarding rule on port 80 and associate the rule with the SAE server group.
    dg_reuse_alb_ingress_existing_listener_for_sae_step2

Naming rules for SAE server groups

For example, the application appId:ea401733-0180-**** is configured in an ALB ingress gateway. The ALB port is 7777, and the container port is 18081. The following figure shows the name format of a sample server group.dg_naming_rules_of_sae_server_groups
You can search for the corresponding server group in the ALB console by using the first six characters in the ID of an SAE application.