By Jeremy Pedersen
Welcome back! This is the 22nd installment in our Friday blog series. This week, we take a look at load balancing on Alibaba Cloud.
If you've been keeping a close eye on Alibaba Cloud lately, you may have noticed that there have been some changes to the Server Load Balancer (SLB) service.
The SLB service is now divided into ALB (Application Load Balancer) and CLB (Classic Load Balancer), both of which fall under the heading of "SLB" (Server Load Balancer).
What does it all mean? Let's take a (quick) look in this week's Friday blog.
At a high level, the key difference is that Classic Load Balancer (CLB) uses a hardware load balancer architecture where each load balancer instance is hosted on a single physical machine (or rather a pair of them, in Active-Active configuration to provide high availability). By contrast, Application Load Balancer (ALB) uses NFV (Network Functions Virtualization) to virtualize load balancing functionality across a cluster of machines.
ALB is designed for more sophisticated HTTP and HTTPS load balancing: it can route HTTP or HTTPS traffic based on the
Host header field, it can do session-based routing (cookie-based), and it even supports newer protocols like QUIC and Google's gRPC.
All of the Layer 4 (TCP/UDP) and Layer 7 (HTTP/HTTPS) load balancing capabilities originally provided directly as the "SLB" service are now provided by CLB (Classic Load Balancer).
Thus, "SLB" now refers to the entire load balancing service, encompassing both CLB and ALB.
So how should you choose?
### For HTTP or HTTPS, when should I choose ALB?
Pretty much all the time! ALB scales better than CLB, supports more sophisticated routing and filtering rules, and allows you to do traffic mirroring and splitting. Some of the benefits include:
You can learn more about the features and limitations of ALB here.
If you already have a Layer 7 SLB (now "CLB") instance deployed and don't want to change your public IP address or go through the process of cutting over to a new ALB instance, then by all means continue to use CLB.
Another very specific scenario is no-cost, private network load balancing. One of the cool features of CLB is the ability to provide shared-capacity load balancing for free, so long as the load balancer is not accessible from the Internet. Note that this is true only for the "Shared Performance" SLB instance type, in which you share load balancing capacity with other users in your Region and Zone. Dedicated SLB instances still cost money, even if they are private network (VPC-only).
So for no-cost internal SLB deployments, CLB still wins.
You might also want to keep using CLB if you need to have a fixed public IPv4 address associated with your load balancer. By default, ALB instances have a domain name but no guaranteed or "fixed" public IP. CLB instances - on the other hand - always provide a fixed public IP since they are bound to a specific physical machine, unlike the cluster of machines that runs the ALB service.
That's it! You can find more details in the documentation, but the general rules of thumb are:
Happy architecting, and see you next time!
Great! Reach out to me at
email@example.com and I'll do my best to answer in a future Friday Q&A blog.
You can also follow the Alibaba Cloud Academy LinkedIn Page. We'll re-post these blogs there each Friday.
JDP - October 8, 2021
JDP - April 30, 2021
JDP - August 27, 2021
JDP - October 15, 2021
Alibaba Cloud TC Content - July 27, 2021
JDP - May 14, 2021
Respond to sudden traffic spikes and minimize response time with Server Load BalancerLearn More
An easy to use service that provides real-time monitoring of servers to ensure high availabilityLearn More
Fully managed and less trouble database servicesLearn More
High-performance virtual machines with data transfer plan, starting from $2.50 per monthLearn More
More Posts by JDP