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.
Let's now turn our attention to some of server load balancer's features and take a look at server load balancer's architecture. Alibaba cloud provides two types of load balancer. There's the layer four load balancer for routing TCP and UDP traffic, and then there is the layer seven load balancer for routing HTTP and HTTPS traffic. Now the layer four load balancer is based on LVS, Linux Virtual Server, plus keepalived. So you can see in the diagram on the lower right here, that TCP and UDP traffic is passed to a LVS cluster and then passed to the back-end ECS instances.
It's the fact that we're using a cluster that allows us to provide high availability in the server load balancer. In layer seven, for layer seven traffic, so that's HTTP and HTTPS, we use tengine, which is a web server based on NGINX. So our routing is done via tengine rather than LVS, but the concept is similar. We have a cluster of tengine servers that pass traffic back to the back-end ECS instances.
So for layer four server load balancer, both TCP and UDP protocols are supported. The incoming client connection is bound to the server connection. What that means is the load balancer is transparent to the user. So the user's traffic passes through the load balancer unmodified, and is routed back to one of the back-end ECS instances with no header modification. So the traffic is not modified in any way.
Now the layer seven load balancer works a little bit differently. So it supports HTTP and HTTPS, and the connection that the user makes to your site actually terminates at the load balancer itself, which means that the load balancer can examine the HTTP stream and can modify headers. This is good because it means you can make intelligent routing decisions based upon the content of the connection. But it also means that when you send the traffic to one of the back end ECS instances, you do that by opening a new HTTP connection from the load balancer to the back-end ECS, which means that if the back-end ECS needs to see the user's original IP address, they have to get that from the X forwarded for header in the HTTP connection.
They can't just check the source IP address of the incoming connection, because that will be the load balancer rather than the user's IP. So keep that in mind when you're using the layer seven balancer. Next we'll turn our attention to some of the server load balancers key components and functions, in particular we'll take a look at how listeners are configured.
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.