Alibaba Server Load Balancer
This course introduces the Alibaba Server Load Balancer (SLB) service and its features, components, and settings. You'll also learn how to use SLB through a guided demonstration from the Alibaba platform.
- Get a basic understanding of Alibaba Cloud SLB
- Learn about the features, components, and additional settings of SLB
- Learn how to set up a server load balancer
This course is intended for anyone looking to use server load balancer to manage their Alibaba Cloud workloads, as well as anyone studying for the ACP Cloud Computing certification exam.
To get the most out of this course, you should have a basic understanding of the Alibaba Cloud platform.
SLB additional settings. Let's first talk about multi-zone disaster tolerance so you can use the Primary/Backup Zone feature in SLB to implement multi-zone disaster tolerance. So how does that work? Well, essentially, within an Alibaba Cloud regions, such as Singapore, Hong Kong, what you will do is set up backend ECS instances that span at least two different zones and then you'll attach those instances to your Server Load Balancer. And by default, Server Load Balancer is configured in a multi-zone way, so there will be a primary and a secondary zone, and you just make sure that the primary and secondary zone you select for your SLB matches the two zones where your ECS instances are deployed.
What will then happen is if there's a failure in one of those two zones, the Server Load Balancer will detect that internally, it will make sure all incoming traffic from the internet is thereby routed to the still running, still active Server Load Balancer service in the other non-failed zone and will route all requests to the running ECS instances, ignoring the ECS instances in the failed zone and that all happens within about 30 seconds. When the primary zone comes back online, again, Server Load Balancer will detect that and will once again begin distributing requests across both of those zones equally. If you want to achieve cross-region disaster tolerance, things are a little bit different. You can't achieve that with SLB alone because Server Load Balancer cannot span multiple regions, you now need to include some DNS failover capability.
So Alibaba Cloud DNS has a built-in health check mechanism that you can turn on and at the DNS level, if DNS service realizes that one of your load balancers is unreachable, say in the China East 1 region, then it can stop routing requests over to that region and start routing them to the Server Load Balancer in your healthy China North 1 region. With the deployment of this type, you are able to survive both single zone failure and a single region failure. By distributing across multiple zones and multiple regions, you can tolerate the failure of both a zone or a region, so this gives you the maximum failure tolerance capability but you do have to make sure that you've implemented your application in a way that allows this kind of a configuration.
One issue to resolve, which is not shown on the slide, is how you're going to synchronize, say a database between these two zones. So, of course, you can do that, we do provide tools for that, which we discussed in the RDS section of the course, but you do need to be aware that a multi-region architecture is more complex and requires more advanced planning, Auto Scaling, one of the key reasons that people use Server Load Balancer is to integrate with our Auto Scaling service so that they can scale their web application or web application backend up and down with demand. So this Auto Scaling feature allows you to do a couple of things, you can maintain instance availability, ECS instance availability by detecting impaired ECS instances and replacing them automatically, and you can also use Auto Scaling to grow and shrink your pool of ECS instances on demand.
So how does Server Load Balancer fit into this? While Auto Scaling and Server Load Balancer are integrated in such a way that Auto Scaling can tell Server Load Balancer to add or remove instances from its backend server pool so when the Auto Scaling service grows the pool of backend servers, it can link the new servers up to Server Load Balancer, when it deletes unnecessary servers, it can remove them from the Server Load Balancer to make sure that all the Server Load Balancer requests are being distributed evenly across those pool no matter how many ECS instances are in the pool in total. SLB Security, SLB provides protection against DDoS attacks up to five gigabits per second via our built-in Anti-DDoS Basic.
All traffic from the internet goes through this anti-DDoS service before it arrives at Server Load Balancer and anti-DDoS can defend Server Load Balancer against multiple different attack types, such as SYN flood, UDP flood, ACK flood, ICMP flood, DNS Query flood, NTP Reply flood, and HTTP flood attacks so it has very sophisticated attack detection mechanisms, and again, up to five gigabits per second, that service is provided for free. If you experience a lot of high volume attacks, you might want to consider upgrading to Anti-DDoS Pro. So if you look in the Server Load Balancer console, you'll see what the black hole threshold and cleaning threshold are for a given Server Load Balancer. That five gigabits per second, that's the high-end protection that anti-DDoS offers and that scales actually with the size of your load balancer instance.
So at the cleaning threshold, that's the traffic level at which the anti-DDoS services triggered and begins to scrub attack traffic. The black hole threshold is where the anti-DDoS service is unable to continue protecting your Server Load Balancer effectively and shunts all incoming traffic from the internet into what is called a black hole, meaning none of the traffic reaches your load balancer, that's done as a protective measure to protect your load balancer and the servers behind it, but it doesn't mean no one can access your site. And if you're curious what exactly those thresholds are for a given Server Load Balancer, you can mouse over the little shield icon, which you can see in the left-hand side of the screenshot on the slide, you can mouse over that in the load balancer console and you'll see what your thresholds are.
The largest Server Load Balancer instances will have a black hole threshold of five gigabits per second as I mentioned on the previous slide, smaller Server Load Balancers may have a smaller protection threshold. For instance, the SLB shown here has a traffic scrubbing threshold of 300 megabits per second, so when traffic reaches the 300 megabit per second level, anti-DDoS will be triggered and will start filtering traffic, and then it has a black hole threshold of 1.2 gigabits per second. So this load balancer will start throwing away incoming internet traffic at the 1.2 gigabit per second threshold so actually, before five gigabits per second.
If I had purchased a bigger, more capable load balancer, then my free protection threshold would be higher. And again, if you need more protection than that, you can turn on Anti-DDoS Pro for any type of Server Load Balancer, any type of public Server Load Balancer and that will provide protection well up into the hundreds of gigabits per second. Okay, and now a quick recap. So Server Load Balancer is a fully managed, scalable, and highly available load balancing service, you can host multiple different applications behind a single Server Load Balancer by configuring multiple listeners for that load balancer, and the load balancer service integrates with Auto Scaling so you can scale your backend server pool up and down on demand. That's it for this section. In the next section, let's have a hands-on demo and see how Server Load Balancer works in practice.
Alibaba Cloud, founded in 2009, is a global leader in cloud computing and artificial intelligence, providing services to thousands of enterprises, developers, and governments organizations in more than 200 countries and regions. Committed to the success of its customers, Alibaba Cloud provides reliable and secure cloud computing and data processing capabilities as a part of its online solutions.