In SAE scenarios, load balancing of application traffic and routing strategy configuration practice

Head picture.jpg

Author | Rakugo Alibaba Cloud Native Technical Team
This article is compiled from "Serverless Technology Open Course"

Traffic management from instance-oriented to application-oriented

1.PNG

In the serverless scenario, due to the elasticity and the volatile nature of the underlying computing instances, back-end application instances need to go online and offline frequently, and the traditional load balancing management method in the ECS scenario is no longer applicable.

SAE products provide users with application-oriented traffic management methods. They no longer need to care about flexible scenarios and instances of release scenarios going online and offline. They only need to care about the monitoring configuration and the health check probes of the application instances. SAE products.

Single application load balancing configuration

2.PNG

For a single application, SAE products support monitoring and exposing application services through public or private network SLB instances. Currently, only TCP protocol is supported. Taking into account the need for HTTPS transformation in traditional HTTP-type applications, SAE also supports the configuration of HTTPS monitoring so that the HTTP server can provide HTTPS services externally without modification.

The public network SLB is used for Internet client access, which will incur both specification fees and traffic costs; the private network SLB is used for client access in the VPC, which will incur specification fees.

In order for SAE products to accurately control the timing of instances going online and offline, users need to configure probes correctly during deployment to avoid business losses.

Multi-application routing policy configuration

3.PNG

In practice, large and medium-sized companies often split their business into different applications or services. For example, they split the highly related parts such as login services and billing services into applications separately, conduct independent research and development, operation and maintenance, and then externally Exposure through a unified gateway service is like using a single application to users.

SAE provides a gateway based on SLB instances, which forwards traffic to different application instances according to domain names and HTTP Paths, and functions against the industry’s Nginx gateways.

The gateway implemented by the public network SLB instance is used for Internet client access, which will incur both specification fees and traffic costs; the gateway implemented by the private network SLB instance is used for client access in the VPC, which will incur specification fees.

Self-built microservice gateway

4.PNG

For the common microservice gateways in microservice scenarios, SAE does not provide productization support, but users can still play freely and deploy self-built microservice gateways in SAE.

In practice, the microservice gateway can also be deployed as an application in SAE. The microservice gateway will forward business traffic to the instance that provides the microservice according to the user-defined configuration. As an application, the microservice gateway can also expose services to the public and private networks through SLB instances.

Conclusion

Regardless of the traditional single application scenario, the split multi-application scenario, and the now more popular microservice scenario, SAE products provide complete solutions in terms of traffic management and routing strategies, relying on reliable cloud products. Basic network facilities, and reduce the user's cost as much as possible. Users only need a very low learning cost to manage their own traffic in a white screen on the SAE console, or deploy self-built gateway applications.

Practical demonstration

Demo content (click to view reference documents):

Click the link to watch the demo process:https://developer.aliyun.com/lesson_2026_19007

The Serverless official account releases the latest information on Serverless technology, gathers the most complete content of Serverless technology, pays attention to the trend of Serverless, and pays more attention to the confusion and problems you encounter in your practice.

Guess you like

Origin blog.51cto.com/14902238/2562931