×
Community Blog Manage Traffic on Multiple Servers with Alibaba Cloud Server Load Balancer

Manage Traffic on Multiple Servers with Alibaba Cloud Server Load Balancer

This tutorial describes how you can use Alibaba Cloud Server Load Balancer to distribute traffic across multiple servers.

Effectively handling the traffic and data transmission loads of a multiple cloud server setup can be a complex process. However, it's completely necessary, as business-critical applications require a highly available solution to manage a heavy workload. Alibaba Cloud Server Load Balancer (SLB) simplifies the distribution of workload across servers, network links, and other resources to minimize latency and prevent possible overload. With SLB, you can balance multiple cloud servers or scale your application to optimize your resource utilization on the cloud.

In this tutorial, you will learn how you can set up and configure Alibaba Cloud Server Load Balancer to distribute loads across multiple cloud servers to effectively manage these loads.

Prerequisites:

As a prerequisite to this tutorial, you need to have multiple Alibaba Cloud servers, specifically Alibaba Cloud Elastic Compute Service (ECS) instances running already. Naturally, you will also need to have these ECS instances configured to host web pages.

Step 1: Purchasing a Server Load Balancer Instance

1. Log in to the Alibaba Cloud Console.

2. Under the Products and Services section, select Server Load Balancer.

1

3. Select the same region where you previously launched your Alibaba Cloud ECS instances, and check for any existing Server Load Balancer in this region. If you need to create an SLB instance, select Create Instance on the top-left corner of the page.

2

4. Choose your preferred selection for Region, Primary Zone, Backup Zone (if applicable), Instance Type, Public Bandwidth, and Quantity. Then, select Buy Now to confirm the order.

3

5. Verify your selection on the next page and click Activate to activate the service.

4

Step 2: Configuring Server Load Balancer

You will need to configure the purchased Server Load Balancer instance before using it.

1. On the management console, select Server Load Balancer.

2. To change the name of your instance, place your cursor in the Server Load Balancer ID/Name column and click the Edit icon.

5

3. Click Manage to modify the configurations of your instance.

6

4. Select Listener in the left panel.

7

5. Select Add Listener in the top-right corner to open the Add Listener dialogue box.

8

Note: One Server Load Balancer instance can have up to 50 listeners.

6. Select TCP and set the frontend and backend ports to 80. Click Next Step to go to the Health Check Configuration tab.

9

Note: Server Load Balancer supports both Layer 4 (specifically the TCP and UDP protocols) and Layer 7 (specifically the HTTP and HTTPS protocols) load balancing.

7. Click Expand Advance Options and set the parameters as shown in the figure below. Click Confirm to proceed.

10

8. Click Confirm to close the dialogue box and return to the management console.

11

9. In the left-side panel, navigate to Backend Server located, which is under Server. Click the Servers Not Added tab to view all available servers.

12

10. Click Add to add ECS instances onto Server Load Balancer.

13

11. Set the Weight of your ECS instances. Click Confirm.

14

Note: If all instances are set to a weight of 100 (the default setting), the average forwarding rule is adopted. In this rule, the load is equally distributed among all the servers.

12. You will now see the two backend ECS instances added and displayed in the Servers Added tab.

15

13. Visit the address of the Server Load Balancer instance to verify successful installation. We have set up our ECS instances to host static websites.

16

Note: You will be forwarded to any one of the web pages hosted by the ECS instances since the traffic load is equally distributed.

With that, you have configured Server Load Balancer to manage your ECS instances.

0 0 0
Share on

Alibaba Clouder

2,605 posts | 747 followers

You may also like

Comments