Manage sudden spikes in traffic, minimize response time and maintain 99.99% availability of your web application with Server Load Balancer. Server Load Balancer monitors the health of servers and ensures high availability by automatically distributing application requests to servers with optimal performance in different availability zones.
Alibaba Cloud Server Load Balancer is built to cope with high volume traffic and each year in November is put to the test during Alibaba’s annual Global Shopping Festival. Alibaba relies on Server Load Balancer to provide uninterrupted service during the festival by switching requests between data centers and transferring transactions to the most available server. This includes transferring requests to servers located over 1,000 kilometers away, without missing a single transaction.
"Server Load Balancer ensures our system's stability, reliability and greatly improves user availability."
● Guarantees up to 99.9% availability.
● Distributes traffic automatically across instances in different availability zones.
● Quickly detects unhealthy instances and routes traffic to only healthy instances.
● Automatically scales up and down depending on the load.
● Seamlessly integrates with Auto Scaling to manage varying traffic levels without manual intervention.
● Protects from SYN flood and DDoS attacks.
● Creates an internal cloud load balancer to route traffic using private IP addresses within your VPC (Virtual Private Cloud). To learn more about VPC, click here
● Quickly creates a secure architecture using intranet (private) and Internet (public) facing load balancers.
● Offers Pay-As-You-Go model.
● Up to 60% cost-effective compared to other traditional models of load balancing.
Server Load Balancer is a ready-to-use service that seamlessly integrates with Elastic Compute Service (ECS) to manage varying traffic levels without manual intervention. First, you need to add the ECS instances to the Server Load Balancer instance. Server Load Balance then distributes incoming traffic across multiple ECS instances, detects unhealthy or unsafe instances and routes traffic to healthy and safe instances only.
Importantly, Server Load Balancer also ensures high availability of your applications by eliminating any single-point-of-failure, and protects from SYN flood and DDoS attacks.
Server Load Balancer can be integrated with a Virtual Private Cloud (VPC). You can create an internal cloud load balancer to route traffic using private IP addresses within your VPC. To learn more about VPC click here.
● Distributes incoming traffic to healthy ECS instances within and across availability zones.
● Supports cluster deployment, multi-zone deployment and guarantees multilayer disaster tolerance.
● Enables cluster deployment with session synchronization between machines to support hot upgrades, and makes machine faults and cluster maintenance transparent to users.
● Facilitates local disaster recovery by using multi-zone deployment model for some regions.
● Supports global load balancing and cross-region disaster recovery when used in combination with DNS.
● Supports health checks for ECS instances and allows user to specify the frequency. If an ECS instance does not qualify the health check, traffic will not be forwarded to that instance, thereby ensuring application availability.
● Ensures normal operations of ECS instances running at the backend with regular health checks.
● Supports multiple traffic scheduling algorithms to evenly distribute traffic.
● Supports Weighted Round Robin (WRR) and least connections scheduling algorithms. You can choose the traffic distribution algorithm that best suits your needs.
● Increases server load balancing capabilities and distributes traffic evenly by configuring ECS instance weights.
● Easily scalable ECS instance when using a Server Load Balancer with Auto Scaling.
Load Balancing through Layer 4 or Layer 7
● Supports session persistence for Layer 4 and Layer 7.
● Forwards access requests from a single user within a certain period to the same ECS instance to ensure session continuity.
● Offers flexible billing options such as Monthly/Yearly Subscription or Pay-As-You-Go.
● Allows you to select public or private network Server Load Balancer under a Classic Network or VPC network based on your business needs.
● Provides central certificate management system for HTTPS protocol.
● You can define particular IPs to access the application through different ports in the security groups of Server Load Balancer.
The user-friendly console provides various management methods that allows you to create, modify and manage your Server Load Balancer instances.
Using the simple Management Console you can conveniently create, configure, or perform operations on your Serve Load Balancer.
Use APIs, SDKs, and CLI for subsequent development to create, configure, and manage Server Load Balancer instances.
The Server Load Balancer service uses instances as its basic units and provides metering data for the instance billing cycle. Fees are calculated based on length of time of load balancer rentals and network traffic.
The following prices are for reference only. The exact price will be based on the customized plan you choose.
Fees are calculated based on length of time of load balancer rentals and network traffic.
Payment method: Use first, Pay later
a) Instance rental fee is based on two types of Server Load Balancer instances: public network and private network. A public Server Load Balancer includes the public IP cost, while a private Server Load Balancer is cost-free.
b) Network traffic fees are priced on a non-incremental, linear basis in Phase I. For private network Server Load Balancer instances, no fees for any network traffic will be billed.
c) Network traffic is billed by the hour and fees will be deducted in real time. If a Server Load Balancer instance is used for less than one hour within any given billing cycle, you will be billed for the price of one full hour.
d) The billed amount for any given billing cycle is calculated based on the instance rental fee for the current billing cycle added on top of the network traffic fee for the current billing cycle. Network traffic fees apply to outgoing traffic (downstream traffic). No fee is charged for incoming traffic (upstream traffic).
1. Websites with Heavy Traffic and Short Outbursts
Websites which have high volume of traffic and sudden spikes for a very short time. In this scenario, Server Load Balancer manages traffic peak efficiently and maintains a consistent user experience.
Suggested configuration: Server Load Balancer + Elastic Compute Service (ECS)
Use Alibaba Cloud Server Load Balancer with the Pay-By-Bandwidth model for applications on the public network with relatively high bandwidth usage.
Easily adjust the ECS configuration and scale instances according to your application needs using this configuration.
This way you do not have to worry about ECS configurations causing resource bottlenecks.
2. Websites with Significant Traffic Peaks
Websites which have predictable traffic but fluctuating bandwidth requirements. Server Load Balancer provides flexibility to manage oscillating traffic peaks and effectively control costs.
Suggested configuration: Server Load Balancer + Elastic Compute Service (ECS ) + Auto Scaling
3. Applications that Require High Availability and Low-Latency
Applications or websites with users from different parts of the world and require low latency and high availability (HA) with multilayer disaster recovery.
Suggested configuration: Server Load Balancer + Auto Scaling + DNS
Applications with users in various regions of the world can utilize DNS service.
This routes each Server Load Balancer request to the most suitable region and provides cross-regional disaster recovery.
Enables local disaster recovery for multiple zones using a combination of Server Load Balancer and ECS.
Provides complete health checks for websites to eliminate a single point of failure (SPOF).
You can seamlessly distribute incoming traffic with Alibaba Cloud Server Load Balancer using developer resources including LI, APIs and SDKs.
Using Server Load Balancer through the Management Console
Alibaba Cloud Management Console provides a simple web-based user interface, which enables you to access and configure load balancing web servers or Server Load Balancer resources. Using this console you can create and modify Server Load Balancers, change configurations like SSL certificates, ports and much more.Documentation
Using Server Load Balancer through the Alibaba Cloud CLI
You can easily manage Server Load Balancer resources through Alibaba Cloud Command Line Interface (CLI). You can download and install the CLI package here.
Server Load Balancer API Reference
You can use APIs to create or modify Server Load Balancers, carry out health checks, control SSL certificates, ports and Instances. Please read API Introduction.
Server Load Balancer SDK Reference
You can use Alibaba Cloud Server Load Balancer with SDKs of your choice. Here is the SDK Guide with the full list of available SDKs.
The Server Load Balancer is a ready-to-use enterprise load balancer service which distributes incoming traffic across multiple ECS instances, detects unhealthy instances and routes traffic to only healthy instances enabling you to build highly scalable and robust applications.
These resources will help you understand how Alibaba Cloud Server Load Balancer works.
Below are the links to the documentation, SDKs and other resources.
1. What kinds of Server Load Balancers are available? Can I change the Server Load Balancer type?
Alibaba Cloud provides two types of Server Load Balancer services: public and private. You can choose the type of Server Load Balancer based on your business requirements. The system then automatically assigns the public or private IP address to the Server Load Balancer.
The Server Load Balancer system allocates different service addresses (public/private IP addresses) according to the server load balancing types you choose. To change the Server Load Balancer type, you need to first delete the old Server Load Balancer and then create a new Server Load Balancer with the expected type.
2. What is ECS instance weight?
Instance weight can be defined as the ratio of traffic forwarded by SLB to each ECS instance under it. The higher the ECS weight ratio, the more traffic is received by that ECS instance.
3. Why are the actual loads of ECS instances which share the same weighted value different?
If session persistence option has been enabled, Server Load Balancer allows to bind a user’s session to a specific instance so all requests from the user during the session are sent to the same instance. This might result in actual loads of ECS instances with the same weighted value being different.
4. Can I increase or decrease the number of ECS instances under Server Load Balancer at any time while using Alibaba Cloud Server Load Balancer?
Yes, you can increase or decrease the number of backend servers or ECS Instances under the Server Load Balancer. However, while performing the above operations, we recommend you to enable the health check function for the new Instance.
5. Does Server Load Balancer support concurrent access to multiple sites through the same port?
Yes, you can resolve multiple domain names to the Server Load Balancer IP addresses and configure different host headers on ECS servers to make a single Server Load Balancer Instance accessible for multiple ports.
6. How many ECS instances does Server Load Balancer support at most?
Alibaba Cloud does not limit the number of ECS servers in the Server Load Balancer Instance configuration. However, to ensure stability and efficiency of your services, we recommend configuring the servers that provide different services or perform different tasks under different Server Load Balancer Instances according to business types or application modules.
7. How can I ensure that data is synchronized between different ECS instances under Server Load Balancer?
You can choose one of the many tools available such as Rsync to synchronize data between servers. You can also configure your ECS Instance to a stateless application server and store data and files on Relational Database Service (RDS) and Object Storage Service (OSS).
8. Can ECS instances of different operating systems work under the same Server Load Balancer?
Yes,Server Load Balancer itself doesn’t pose any restrictions on the operating system used by the ECS instance if the application service configurations and data in ECS instances are consistent. However, we recommend you to select two ECS web servers of the same operating system for convenience, better management and maintenance of instances.
9. Does ECS load balancing require additional configuration?
To add ECS Instances under Server Load Balancer Instance, there’s no need for special configurations. If access to ECS Instances associated with Server Load Balancer Layer-4 (TCP protocol) service in Linux system is unsuccessful, you need to ensure that the following three values in the system configuration file /etc/sysctl.conf is 0:
net.ipv4.conf.default.rp_filter = 0
net.ipv4.conf.all.rp_filter = 0
net.ipv4.conf.eth0.rp_filter = 0
If the communication between your ECS Instances deployed in the same intranet is not successful, you need to check whether the following parameters have been configured correctly:
To update the configuration, use sysctl -p.
10. Does ECS instance require additional bandwidth when it is used under the Server Load Balancer?
The ECS Instance and Server Load Balancer communicates through the intranet, so ECS does not require additional Internet bandwidth.
11. Can I have multiple ECS instances under one Server Load Balancer present in different regions?
Server Load Balancer does not support cross-region deployment. Hence, please ensure to have multiple ECS instances of one Server Load Balancer in the same region under the same account for successful configuration.
12. If I disable the ECS public Network Interface Card (NIC), will it affect the Server Load Balancer service?
Yes, disabling the ECS public NIC will affect the Server Load Balancer service.
If ECS servers utilize both the public and private IP addresses, disabling the public NICs will influence SLB service as the default route will now change from public to private and return request might fail. We recommend not disabling the public NIC.
In cases where you don’t disable the NIC, you will have to modify the default route to the private network. However, take into consideration whether the service has any dependency on the public network or not while accessing other services like RDS through the public network.
13. What is the mechanism behind Server Load Balancer session persistence?
Once you enable session persistence, Server Load Balancer will distribute server access requests from one client during the session to the same ECS Instance for processing.
For 7-Layer Server Load Balancer (HTTP protocol), session persistence in the system is based on cookies.
For 4-Layer Server Load Balancer SLB (TCP protocol), session persistence in the system is based on IP addresses.
For more details about Server Load Balancer session persistence, see the SLB User Guide.
14. How to enable session persistence and what is the maximum duration?
When you configure Server Load Balancer monitoring, you can select the session persistence option. You can then configure different session persistence policies for different monitoring services. The longest session persistence can be 86,400 seconds (24 hours).
15. Does Server Load Balancer support different session persistence rules for different domain names?
Yes, Server Load Balancer supports different session persistence rules for different domain names. You can achieve this through the "Rewrite Service Cookie" session persistence provided by Server Load Balancer. For more details about the server load balancing configurations, see the SLB User Guide.
16. How can I enable health check for ECS instances?
You have to enable health check option while configuring Server Load Balancer monitoring. You can configure different health check policies for different monitoring services.
For more details about Server Load Balancer health check, refer to SLB User Guide.
17. How are health checks configured properly?
Server Load Balancer health check is achieved primarily by initiating heartbeat checks on ECS Instances under it.
The Server Load Balancer system and ECS communicate with each other over the intranet. To ensure the normal operation of the health check, you need to ensure your ECS is accessible through the intranet.
For more details about enterprise load balancer health check, see SLB User Guide.
18. What is the maximum bandwidth of Server Load Balancer and what configuration limits does it have?
You can set different bandwidth peaks based on the capacity requirements of your applications. Below are some rules to set bandwidth peaks:
Server Load Balancer can manage up to 50 services with different rules for each monitoring service.
The bandwidth peak for a single monitoring service can be set within 5-1,000 Mbps.
You can reset bandwidth limit if monitoring service indicates application requirements are exceeding the current limit.
19. Which protocols does Server Load Balancer support?
Server Load Balancer supports 4-Layer TCP protocol, 7-Layer HTTP protocol and 7-Layer HTTPS protocol.
20. Which forwarding methods does Server Load Balancer support?
Currently Server Load Balancer supports two forwarding algorithms:
1. Weighted Round Robin algorithm: Distributes external and internal access requests to the backend servers or ECS Instances in sequence for processing.
2. Weighted Least Connection algorithm: Distributes access requests to the ECS Instance that has the current least connections.
21. What are the recommended values for configuring health checks?
We recommend the following configurations for health checks:
Response time-out: 5 seconds
Health check interval: 2 seconds
Unhealthy threshold value: 3
Healthy threshold value: 3
22. Why does the 503 error occur when I try to access the HTTP Server Load Balancer service through the domain name bound to the Server Load Balancer IP address?
Such errors are usually caused by incorrect configuration of health checks.
For more details about troubleshooting Alibaba Cloud Server Load Balancer health check exceptions, see the SLB User Guide.