Server Load Balancer (SLB) is a preferred service for traffic forwarding on Alibaba Cloud. SLB can be divided into two types: Classic Load Balancer (CLB) and Application Load Balancer (ALB). SLB offers high availability, scalability, cost efficiency, security, and concurrency. You can associate instances of applications in Enterprise Distributed Application Service (EDAS) with an SLB instance as backend servers. This way, the SLB instance functions as a traffic ingress to forward traffic to the associated instances of applications based on the specified forwarding policies.

Use SLB instances to access applications deployed on ECS clusters in EDAS

You can use EDAS to manage applications that use Java microservices frameworks such as Spring Cloud, Dubbo, and High-speed Service Framework (HSF) by deploying the applications on Alibaba Cloud Elastic Compute Service (ECS) clusters or hybrid cloud ECS clusters provided by EDAS. After an application is deployed in EDAS, the instances of the application work together to provide services. Therefore, a unified traffic ingress is required for the application, and a traffic distribution service is required to forward access traffic to the instances of the application based on forwarding policies.

An application in EDAS uses an SLB instance as the traffic ingress, and the SLB instance uses the instances of the application as backend servers. The SLB instance forwards traffic to the instances of the application based on forwarding policies. The following figure shows the association between instances of applications in EDAS and SLB instances.

BH

If an application is deployed on multiple instances, you can associate the instances with an SLB instance as backend servers. This ensures high availability of the application, reduces the load on each instance, and implements traffic distribution. The SLB instance allows you to configure algorithms for scheduling backend servers, such as round-robin and weighted round-robin algorithms. If you enable the session persistence feature, requests from a client can be forwarded to the same instance. This improves access performance.

EDAS supports ALB and CLB instances. If the routing rule is complex, we recommend that you use ALB instances.

  • ALB: As a cloud-native ingress gateway for Alibaba Cloud, ALB is intended for Layer 7 load balancing over HTTP, HTTPS, and QUIC and provides advanced routing features. For more information, see What is ALB?
  • CLB: After you add ECS instances that are deployed in the same region to a CLB instance, CLB uses virtual IP addresses (VIPs) to combine these ECS instances into a high-performance, highly available server pool. Then, CLB forwards inbound requests to the ECS instances based on forwarding rules. CLB monitors the health of the ECS instances and automatically removes unhealthy ECS instances from the server pool. This mechanism eliminates single points of failure (SPOFs) to enhance the availability of your applications. CLB also defends your applications against DDoS attacks. For more information, see What is CLB?

SLB solutions

EDAS provides multiple SLB solutions to forward traffic in different scenarios. The following table provides references to SLB solutions in different scenarios.

Scenario References
Associate an SLB instance with the instances of a single application Configure a dedicated SLB instance for an application
Configure URL-based traffic forwarding policies for instance groups of a single application Use URLs to forward traffic to instance groups of an application
Configure listening ports to forward traffic to multiple applications that share the same SLB instance Use a shared SLB instance and listening ports to forward traffic
Configure domain name-based or URL-based traffic forwarding policies for multiple applications that share the same SLB instance Use a shared SLB instance and dedicated domain names or URLs to forward traffic