All Products
Search
Document Center

Serverless App Engine:Configure an ALB instance as an ingress gateway to implement routing

Last Updated:Oct 13, 2023

Application Load Balancer (ALB) is intended for Layer 7 load balancing over HTTP, HTTPS, and QUIC and provides advanced routing features. You can use ALB instances as cloud-native ingress gateways of Alibaba Cloud. This topic describes how to configure an ALB instance as an ingress gateway. To ensure optimal service performance, we recommend that you configure a gateway route for a Serverless App Engine (SAE) application.

Background information

When you manage microservices and serverless cloud-native applications, you may need to configure complex routing rules, ensure compatibility with application layer protocols such as HTTP, HTTPS, and QUIC, ensure service access security, and implement traffic observability. In this case, traditional Layer 4 Server Load Balancer (SLB) ingress gateways no longer meet the preceding requirements.

The ALB Ingress controller of Serverless App Engine (SAE) provides fully managed, maintenance-free traffic routing capabilities based on ALB instances. The gateway routing feature of SAE is compatible with NGINX Ingress semantics. SAE provides the following capabilities to configure and manage complex business routes: automatic certificate discovery, traffic ingress observability, compatibility with application layer protocols such as QUIC, and processing of large-scale Layer 7 traffic. These capabilities help you manage cloud-native application traffic with ease.

Details of the feature

ALB

ALB is a load balancing service that runs at the application layer, and supports protocols such as HTTP, HTTPS, and QUIC. ALB provides high elasticity and can process a large amount of traffic at Layer 7.

The gateway routing feature of SAE is compatible with NGINX Ingresses, and provides improved traffic routing capabilities based on Application Load Balancer (ALB) instances. ALB Ingress-based gateway routing supports complex routing, automatic certificate discovery, and the HTTP, HTTPS, and QUIC protocols. ALB Ingresses meet the requirements of cloud-native applications for ultra-high elasticity and balancing of heavy traffic loads at Layer 7.

dg_alb_introduction

Scenarios

ALB supports high-elasticity Internet scenarios, low-latency scenarios in the video and audio industry, and cloud-native-oriented application scenarios.

dg_alb_supported_scenarios

Use ALB instances on SAE

You can configure routing rules for applications that are hosted on SAE. You can use an SLB instance to forward request traffic to one or more applications. The gateway routing feature is suitable for the following scenarios:

  • A single application or multiple applications need to forward traffic by using the same domain name in different paths.

  • A single application or multiple applications need to forward traffic to different domain names that are resolved to the same IP address.

Preparation

Create an ALB instance.

To use the gateway routing feature of SAE, you need to associate a routing rule with an ALB instance. If you configure a gateway route in the SAE console, the gateway is mapped as a listener that starts with ingress in the SLB console. You can use an ALB instance that belongs to the SLB family. For information about how to configure an ALB instance, see Create an ALB instance.

Configure a routing rule

When you create a routing rule, you must configure a gateway ingress to bind the created ALB instance. sc_create_ingress_rule_on_sae_console_step1

Then, configure a custom forwarding policy and a default forwarding policy for the bound ALB instance, configure parameters such as Domain Name, Path, and Port, and select the backend applications on which you want to receive traffic. sc_create_ingress_rule_on_sae_console_step2

Note

In this example, the port values are provided only for reference. You can specify port values based on your business scenario. For more information, see Configure gateway routing for an application by using an ALB instance.

Verify the result

After you create a routing rule, you can view the routing rule on the Gateway Routing page of the corresponding namespace. Then, you can access the related backend services or applications by using a URL in the <Domain name>:<Port number>/Path format.

The following figure shows a routing rule that is used to forward requests from www.example.com/path to the backend application spring-boot-provider by using the port 8080, and forward all requests for which no custom forwarding policy is configured to the backend application spring-boot-consumer. sc_view_ingress_forwarding_rules_alb

References

Overview