User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the...

30
Elastic Load Balance User Guide Issue 01 Date 2018-01-19 HUAWEI TECHNOLOGIES CO., LTD.

Transcript of User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the...

Page 1: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide

Issue 01

Date 2018-01-19

HUAWEI TECHNOLOGIES CO., LTD.

Page 2: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

i

Copyright © Huawei Technologies Co., Ltd. 2018. All rights reserved.

No part of this document may be reproduced or transmitted in any form or by any means without prior

written consent of Huawei Technologies Co., Ltd.

Trademarks and Permissions

and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.

All other trademarks and trade names mentioned in this document are the property of their respective

holders.

Notice

The purchased products, services and features are stipulated by the contract made between Huawei and

the customer. All or part of the products, services and features described in this document may not be

within the purchase scope or the usage scope. Unless otherwise specified in the contract, all statements,

information, and recommendations in this document are provided "AS IS" without warranties, guarantees or

representations of any kind, either express or implied.

The information in this document is subject to change without notice. Every effort has been made in the

preparation of this document to ensure accuracy of the contents, but all statements, information, and

recommendations in this document do not constitute a warranty of any kind, express or implied.

Page 3: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide Contents

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

ii

Contents

1 Overview ................................................................................................................................ 1

1.1 Basic Concepts ...................................................................................................................................................................... 1

1.1.1 Elastic Load Balance ......................................................................................................................................................... 1

1.1.2 Listener ............................................................................................................................................................................... 1

1.1.3 Health Check ...................................................................................................................................................................... 2

1.2 Functions ............................................................................................................................................................................... 2

1.3 Related Services .................................................................................................................................................................... 2

2 Quick Start ............................................................................................................................. 4

2.1 Configuration Description .................................................................................................................................................... 4

2.2 Creating a TCP Private Network Load Balancer ................................................................................................................ 5

2.3 Creating an HTTP Public Network Load Balancer ............................................................................................................ 6

2.4 Creating an HTTPS Public Network Load Balancer .......................................................................................................... 8

3 Management ........................................................................................................................ 10

3.1 Managing Load Balancers .................................................................................................................................................. 10

3.2 Managing Listeners ............................................................................................................................................................ 12

3.3 Managing Backend ECSs ................................................................................................................................................... 16

3.4 Managing Certificates......................................................................................................................................................... 17

4 FAQs ..................................................................................................................................... 21

4.1 What Is ELB? ...................................................................................................................................................................... 21

4.2 Can I Adjust the Bandwidth of a Load Balancer? ............................................................................................................ 21

4.3 What Forwarding Rules Does ELB Support? ................................................................................................................... 21

4.4 Does ELB Support ECSs Running Different OSs? .......................................................................................................... 22

4.5 How Many Load Balancers Can I Have? .......................................................................................................................... 22

4.6 Does ELB Support an SSL Certificate Chain? ................................................................................................................. 22

4.7 How Can ELB Support Multiple Certificates? ................................................................................................................. 22

4.8 How Can I Configure a Public or Private Network Load Balancer?............................................................................... 22

4.9 What Are the Functions of a Listener? .............................................................................................................................. 22

4.10 What Is the Relationship Between the Load Balancing Algorithms and Sticky Session Types? ................................ 23

4.11 What Are Protocols and Frontend Ports? ........................................................................................................................ 23

4.12 What Are ECS Protocols and Ports?................................................................................................................................ 24

4.13 Is the EIP Assigned to a Load Balancer Used Exclusively? .......................................................................................... 24

4.14 Will There Be Any Adverse Impact If I Delete My Load Balancer? ............................................................................ 24

Page 4: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide Contents

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

iii

4.15 How Do I Rectify a Health Check Failure? .................................................................................................................... 24

4.16 Why Do Many IP Addresses Accessing the Backend ECSs of a Load Balancer Begin with 100.125? ..................... 25

4.17 How Can I Obtain the Real IP Address of a Visitor?...................................................................................................... 25

4.18 What Are the Limitations of Selecting the Subnet During Load Balancer Creation? .................................................. 25

A Change History ................................................................................................................... 26

Page 5: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 1 Overview

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

1

1 Overview

1.1 Basic Concepts

1.1.1 Elastic Load Balance

Elastic Load Balance (ELB) is a traffic distribution control service that distr ibutes access

traffic to multiple Elastic Cloud Servers (ECSs) based on the forwarding policy. ELB enables

you to achieve higher levels of fault tolerance and expand service capabilities of your

applications.

In addition, ELB supports centralized deployment of internal and external networks. It also

allows access through the VPN, Direct Connect connections, and across VPCs.

With a web-based console, you can create load balancers, configure the ports required for

listening, and add backend ECSs for load balancers. ELB helps eliminate single points of

failure (SPOFs), improving the availability of the whole system.

1.1.2 Listener

You can create a listener and define the load balancing policy and forwarding rule.

The following are some concepts related to the load balancing policy and forwarding rule:

A listener specifies the load balancing policy based on the protocol of the connection between

the client and load balancer, the protocol of the connection between the load balancer and

backend ECSs, and the ports. The load balancer supports HTTP, TCP, and HTTPS and can

listen to ports 1 to 65535.

The following three types of forwarding rules are available:

Round robin: Each connection request is distributed to the next ECS in sequence so that

all requests are distributed evenly to all ECSs.

Least connections: New connections are distributed to the ECS processing the least

connections.

Source IP address: The source IP address of the request is used as the HashKey to

identify the ECS in the static fragment table.

Choose an appropriate algorithm as needed to distribute access traffic and improve load

balancing capabilities.

The following three types of sticky session are available:

Page 6: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 1 Overview

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

2

Source IP address: The source IP address of the request is used as the HashKey to

identify the ECS in the static fragment table.

HTTP cookie: The load balancer generates a cookie after it receives a request from a

client. All the subsequent requests with the cookie are distributed to the same backend

ECS for processing.

App cookie: This type of sticky session relies on backend applications. All requests with

the cookie generated by backend applications are distributed to the same backend ECS

for processing.

Choose an appropriate sticky session type as needed to distribute access traffic and improve

load balancing capabilities.

1.1.3 Health Check

You can configure health checks to monitor the status of backend ECSs and ensure that the

load balancer forwards requests only to ECSs that are running properly. After an abnormal

ECS recovers, the load balancer will automatically distribute access traffic to this ECS again.

Health check protocols include TCP, HTTPS, and HTTP.

1.2 Functions

ELB allows you to control load balancing. A self-service web-based console is provided for

you to easily configure the service and quickly add service resources to implement load

balancing.

ELB provides the following functions:

Linear capacity expansion, eliminating SPOFs

Support for TCP, HTTPS, and HTTP

Access by the VPN, internal, and external networks

1.3 Related Services Virtual Private Cloud (VPC)

ELB requires elastic IP addresses and subnets assigned in the VPC service.

Auto Scaling (AS)

After ELB is configured, AS automatically adds or removes ECSs bound to a load

balancer in a scaling action.

Cloud Trace Service (CTS)

ELB can use CTS to record operations performed on cloud resources.

Identity and Access Management (IAM)

IAM is required to provide authentication.

Cloud Eye

After you have enabled ELB, you can use Cloud Eye to view the status of monitored

objects, without requiring additional plug-ins to be installed. Table 1-1 lists the metrics

supported by Cloud Eye.

Page 7: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 1 Overview

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

3

Table 1-1 ELB metrics

Metric Description

cps Shows the number of concurrent connections processed by the

monitored object per second.

Active

Connections

Shows the number of active connections processed by the monitored

object per second.

New cps Shows the number of new connections processed by the monitored

object per second.

Incoming

Packets

Shows the number of incoming packets on the monitored object per

second.

Inbound Rate Shows the number of incoming bytes per second on the monitored

object.

Outbound Rate Shows the number of outgoing bytes per second on the monitored

object.

Abnormal Hosts Shows the number of abnormal backend ECSs associated with a load

balancer.

Normal Hosts Shows the number of normal backend ECSs associated with a load

balancer.

Page 8: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 2 Quick Start

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

4

2 Quick Start

2.1 Configuration Description To distribute traffic to multiple backend ECSs, you need to create a load balancer, add a

listener to the load balancer, configure the health check, and add ECSs to the listener.

If you want to provide the load balancing service for public network users and distribute

access traffic from the Internet to multiple backend ECSs, bind an elastic IP address (EIP) to

the load balancer.

If you want to provide the load balancing service for private network users and distribute

access traffic in the same VPC to multiple backend ECSs, you do not need to bind an EIP to

the load balancer.

Figure 2-1 shows the configuration process.

Page 9: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 2 Quick Start

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

5

Figure 2-1 Configuration process

2.2 Creating a TCP Private Network Load Balancer

Scenarios

This section describes how to create a private network load balancer on the management

console. This load balancer receives TCP requests and forwards them to backend ECSs in the

same VPC.

Prerequisites

ECSs to be added to the load balancer have been started and can be accessed through port 22

by other ECSs in the same security group using TCP.

Create a Private Network Load Balancer

To create a private network load balancer, perform the following operations:

Page 10: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 2 Quick Start

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

6

1. Log in to the management console.

2. Under Network, click Elastic Load Balance.

3. On the ELB console, click Create Load Balancer.

4. On the displayed page, set parameters based on Table 3-1.

5. Click Create Now.

6. Confirm the specifications, select I have read and agreed to the Huawei Elastic Load

Balance Agreement, and click Submit.

Add a Listener

Perform the following operations to configure a listener that receives TCP requests from port

22 and forwards these requests to backend ECSs, and to configure the health check for the

load balancer:

1. On the Elastic Load Balance page, select a load balancer.

2. Click the name of the load balancer to switch to the page that shows basic information

about the load balancer.

3. In the Listener area, click Add Listener.

4. In the displayed dialog box, configure the listener based on Table 3-2. Set

Protocol/Frontend Port to TCP/22.

5. Click OK.

Add Backend ECSs

Perform the following operations to add backend ECSs to the listener so that the listener can

distribute traffic to ECSs:

1. On the Elastic Load Balance page, locate the row that contains the target load balancer.

2. Click the name of the load balancer to switch to the page that shows basic information

about the load balancer.

3. In the Listener area, select the target listener.

4. In the row of the target listener, click Add Backend ECS in the Operation column.

5. In the displayed dialog box, select the subnet, enter the backend port, and select backend

ECSs to be added.

For more information about the parameters, see Table 3-4. You can filter backend ECSs

by their running status, name, and private IP address.

6. Click OK.

2.3 Creating an HTTP Public Network Load Balancer

Scenarios

This section describes how to create a public network load balancer with an EIP on the

management console. The created load balancer can forward HTTP requests from the public

network to backend ECSs.

Page 11: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 2 Quick Start

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

7

Prerequisites

ECSs to be added to the load balancer have been started and security rules of the ECSs allow

access through port 80 using HTTP.

Create a Public Network Load Balancer

Perform the following operations to create a load balancer with an EIP:

1. Log in to the management console.

2. Under Network, click Elastic Load Balance.

3. On the ELB console, click Create Load Balancer.

4. On the displayed page, set parameters based on Table 3-1.

5. Click Create Now.

6. Confirm the specifications, select I have read and agreed to the Huawei Elastic Load

Balance Agreement, and click Submit.

Add a Listener

Perform the following operations to add a listener that receives HTTP requests from port 80

and forwards these requests to backend ECSs, and to configure the health check for the load

balancer.

1. On the Elastic Load Balance page, select a load balancer.

2. Click the name of the load balancer to switch to the page that shows basic information

about the load balancer.

3. In the Listener area, click Add Listener.

4. In the displayed dialog box, configure the listener based on Table 3-2. Set

Protocol/Frontend Port to HTTP/80.

5. Click OK.

Add Backend ECSs

Perform the following operations to add backend ECSs to your load balancer so that the load

balancer can distribute traffic to ECSs:

1. On the Elastic Load Balance page, locate the row that contains the target load balancer.

2. Click the name of the load balancer to switch to the page that shows basic information

about the load balancer.

3. In the Listener area, select the target listener.

4. In the row of the target listener, click Add Backend ECS in the Operation column.

5. In the displayed dialog box, select the subnet, enter the backend port, and select backend

ECSs to be added. For more information about the parameters, see Table 3-4. You can

filter backend ECSs by their running status, name, and private IP address.

6. Click OK.

Page 12: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 2 Quick Start

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

8

2.4 Creating an HTTPS Public Network Load Balancer

Scenarios

The load balancer forwards data using HTTPS. User authentication is required. Requests of a

session must be sent to the same backend ECS.

Prerequisites

ECSs to be added to the load balancer have been started and security rules of the ECSs allow

access through port 443 using HTTPS.

Create User Certificate

Perform the following operations to create a certificate:

Under Elastic Load Balancer, click Certificate and then Create Certificate. In the

displayed Create Certificate dialog box, specify the following information:

Certificate Name and Description

Certificate Content: specifies the certificate content in PEM format.

Private Key: This must be an unencrypted private key. The format is as follows:

-----BEGIN PRIVATE KEY-----

[key]

-----END PRIVATE KEY-----

Create a Public Network Load Balancer

Perform the following operations to create a load balancer with an EIP:

1. Log in to the management console.

2. Under Network, click Elastic Load Balance.

3. On the ELB console, click Create Load Balancer.

4. On the displayed page, set parameters based on Table 3-1.

5. Click Create Now.

6. Confirm the specifications, select I have read and agreed to the Huawei Elastic Load

Balance Agreement, and click Submit.

Add a Listener

Perform the following operations to add a listener that receives HTTPS requests from port

443 and forwards these requests to backend ECSs, and to configure the health check for the

load balancer.

1. On the Elastic Load Balance page, select a load balancer.

2. Click the name of the load balancer to switch to the page that shows basic information

about the load balancer.

3. In the Listener area, click Add Listener.

4. In the displayed dialog box, configure the listener based on Table 3-2. Set

Protocol/Frontend Port to HTTPS/443.

When HTTPS is set for Protocol, a certificate must be bound to the listener.

Page 13: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 2 Quick Start

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

9

5. Click OK.

Add Backend ECSs

Perform the following operations to add backend ECSs to your load balancer so that the load

balancer can distribute traffic to ECSs:

1. On the Elastic Load Balance page, locate the row that contains the target load balancer.

2. Click the name of the load balancer to switch to the page that shows basic information

about the load balancer.

3. In the Listener area, select the target listener.

4. In the row of the target listener, click Add Backend ECS in the Operation column.

5. In the displayed dialog box, select the subnet, enter the backend port, and select backend

ECSs to be added.

For more information about the parameters, see Table 3-4. You can filter backend ECSs

by their running status, name, and private IP address.

6. Click OK.

Page 14: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 3 Management

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

10

3 Management

3.1 Managing Load Balancers This section provides operations for you create and query a load balancer, and delete a load

balancer that is not in use.

Create a Load Balancer

Perform the following operations to create a load balancer with an EIP:

1. Log in to the management console.

2. Under Network, click Elastic Load Balance.

3. On the ELB console, click Create Load Balancer.

4. Configure the parameters based on Table 3-1.

Table 3-1 Parameter description

Parameter Description Example Value

Name Specifies the load balancer name. ELB-93wd

VPC Specifies the VPC to which the load

balancer belongs.

You can select an existing VPC, or

click View VPC and create a desired

one.

For more information about VPC, see

the Virtual Private Cloud User Guide.

vpc-4536

Subnet Specifies the subnet to which the load

balancer belongs.

subnet-4536

LB Virtual IP

Address

Specifies the IP address of the load

balancer. You can select Automatic

or Manual. If you select Manual,

enter an IP address.

192.168.1.10

EIP Specifies the IP address that is bound

to the load balancer and enables the

load balancer to receive and

Existing EIP

Page 15: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 3 Management

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

11

Parameter Description Example Value

automatically forward requests from

the public network to multiple ECSs.

The following options are available:

Do Not Use: The load balancer

cannot receive requests from the

public network.

Existing EIP: An existing EIP

will be used to create the load

balancer. You need to select an

EIP.

Description Provides description of the load

balancer.

-

5. Click Create Now.

6. Confirm the specifications, select I have read and agreed to the Huawei Elastic Load

Balance Agreement, and click Submit.

Query a Load Balancer

You can view the status and subnet of a created load balancer in the load balancer list on the

Elastic Load Balance page.

1. In the upper right corner of the load balancer list, select the name, public IP address, or

subnet from the drop-down list to query a load balancer.

2. Click the name of a load balancer to query its details.

Bind an EIP to a Load Balancer

You can bind an EIP to a load balancer to receive requests from the public network.

1. Locate the row that contains the target load balancer and click its name to switch to the

page that shows details of the load balancer.

2. Click Bind following EIP and select the EIP to be bound from the drop-down list.

3. Click to bind the EIP to the load balancer.

Click Unbind to unbind the EIP.

Delete a Load Balancer

If you do not need a load balancer any longer, you can delete it.

1. On the Elastic Load Balance page, locate the row that contains the target load balancer

and click Delete in the Operation column.

2. In the dialog box displayed, click OK.

If the load balancer has listeners, delete the listeners first before deleting the load balancer.

Page 16: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 3 Management

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

12

3.2 Managing Listeners

Scenarios

A listener is a process that checks for connection requests. It is configured with a protocol and

port number for connections from clients to the load balancer and a protocol and port number

for connections from the load balancer to backend ECSs.

The listener automatically checks the status of all backend ECSs. If a backend ECS is not

running properly, the load balancer will stop forwarding traffic to it.

This section describes how to add, modify, and delete a listener. If you want to add a listener

to a load balancer, change the load balancing algorithm, sticky session type, or health check

configuration, or you do not want to use a listener, you can refer to this section.

Add a Listener

1. Log in to the management console.

2. Under Network, click Elastic Load Balance.

3. On the Elastic Load Balance page, click the name of the target load balancer.

4. In the Listener area, click Add Listener. Configure the parameters based on Table 3-2.

Table 3-2 Parameter description

Parameter Description Example Value

Name Specifies the name of the listener. listener01

Protocol/Frontend Port Specifies the load distribution protocol and port.

The port value ranges from 1 to 65535 and the

following protocols are available:

HTTP: layer-7 load balancing

TCP: layer-4 load balancing

HTTPS: HTTPS-based load balancing

HTTP/80

LB Algorithm Specifies the algorithm that the load balance

uses.

Round robin: Each connection request is

distributed to the next ECS in sequence so

that all requests are distributed evenly to all

ECSs.

Least connections: New connections are

distributed to the ECS processing the least

connections.

Source IP address: The source IP address of

the request is used as the HashKey to

identify the ECS in the static fragment table.

NOTE

Choose an appropriate algorithm as needed to distribute access traffic and improve load balancing capabilities.

Round robin

Page 17: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 3 Management

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

13

Parameter Description Example Value

Certificate Specifies the certificate used by HTTPS load

balancers. This parameter is available only when

LB Protocol is set to HTTPS.

-

Sticky Session Type Specifies the sticky session type.

Source IP address: The source IP address of

the request is used as the HashKey to

identify the ECS in the static fragment table.

HTTP cookie: The load balancer generates a

cookie after it receives a request from a

client. All the subsequent requests with the

cookie are distributed to the same backend

ECS for processing.

App cookie: This type of sticky session

relies on backend applications. All requests

with the cookie generated by backend

applications are distributed to the same

backend ECS for processing.

NOTE

Source IP address can only be used for TCP. Choose an appropriate sticky session type as needed to distribute access traffic and improve load balancing capabilities.

HTTP

COOKIE

Description Provides supplementary information about the

listener.

-

Health Check Mode Specifies the supported health check mode. Four

values are available (the value cannot be

modified once it is set):

HTTPS: available only when Protocol is set

to TCP.

TCP: available when Protocol is set to

HTTP, or TCP

HTTP: available only when Protocol is set

to TCP or HTTP.

HTTP

Interval (s) Specifies the maximum interval for the health

check.

5

Timeout (s) Specifies the maximum timeout duration for the

health check.

10

Check Path Specifies the health check path (a URL). This

parameter is required if Health Check Mode is

set to HTTP.

/index.html

Maximum Retries Specifies the maximum number of retries for the

health check. The value ranges from 1 to 10.

3

HTTP Method Specifies the HTTP or HTTPS request method.

This parameter is required if Health Check

GET

Page 18: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 3 Management

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

14

Parameter Description Example Value

Mode is set to HTTP or HTTPS.

HTTP Status Code Specifies the returned status code for an HTTP

or HTTPS request. This parameter is required if

Health Check Mode is set to HTTP or

HTTPS.

201

Modify Listener

1. Log in to the management console.

2. Under Network, click Elastic Load Balance.

3. On the Elastic Load Balance page, click the name of the target load balancer.

4. In the Listener area, locate the row of the target listener and click Modify in the

Operation column.

5. On the Modify Listener page, set parameters as prompted.

Table 3-3 Parameter description

Parameter Description Example Value

Name Specifies the name of the listener. listener01

LB Algorithm Specifies the algorithm that the load balance

uses.

Round robin: Each connection request is

distributed to the next ECS in sequence so

that all requests are distributed evenly to all

ECSs.

Least connections: New connections are

distributed to the ECS processing the least

connections.

Source IP address: The source IP address of

the request is used as the HashKey to

identify the ECS in the static fragment table.

NOTE

Choose an appropriate algorithm as needed to distribute access traffic and improve load balancing capabilities.

Round robin

Sticky Session Type Specifies the sticky session type.

Source IP address: The source IP address of

the request is used as the HashKey to

identify the ECS in the static fragment table.

HTTP cookie: The load balancer generates a

cookie after it receives a request from a

client. All the subsequent requests with the

cookie are distributed to the same backend

HTTP

COOKIE

Page 19: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 3 Management

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

15

Parameter Description Example Value

ECS for processing.

App cookie: This type of sticky session

relies on backend applications. All requests

with the cookie generated by backend

applications are distributed to the same

backend ECS for processing.

NOTE

Source IP address can only be used for TCP. Choose an appropriate sticky session type as needed to distribute access traffic and improve load balancing capabilities.

Description Provides supplementary information about the

listener.

-

Health Check Mode Specifies the health check mode. The following

modes are available:

HTTPS

TCP

HTTP

The value cannot be changed.

-

Interval (s) Specifies the maximum interval for the health

check.

5

Timeout (s) Specifies the maximum timeout duration for the

health check.

10

Check Path Specifies the health check path (a URL). This

parameter is required if Health Check Mode is

set to HTTP.

/index.html

Maximum Retries Specifies the maximum number of retries for the

health check. The value ranges from 1 to 10.

3

HTTP Method Specifies the HTTP or HTTPS request method.

This parameter is required if Health Check

Mode is set to HTTP or HTTPS.

GET

HTTP Status Code Specifies the returned status code for an HTTP

or HTTPS request. This parameter is required if

Health Check Mode is set to HTTP or

HTTPS.

201

6. Click OK.

Delete a Listener

1. Log in to the management console.

2. Under Network, click Elastic Load Balance.

3. On the Elastic Load Balance page, click the name of the target load balancer.

Page 20: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 3 Management

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

16

4. In the Listener area, locate the row of the target listener and click Delete in the

Operation column.

5. In the dialog box displayed, click OK.

If backend ECSs have been added to a listener, remove the backend ECSs before deleting the listener.

3.3 Managing Backend ECSs

Scenarios

This section provides operations for you to add ECSs to a load balancer and remove ECSs

when you do not want to use them.

Before adding backend ECSs, check whether the rule of the security group to which the ECSs

belong allows access by 100.125.0.0/16 and specify the protocol and port for the health check.

If the protocol and port are not specified, the health check cannot be conducted for the added

backend ECSs.

To query the protocol and port for the health check, select the listener for which the backend

ECSs are to be added, and click View under Health Check. To configure the security group

rule, choose Network > Virtual Private Cloud > Security Group. Locate the security group

of the target ECSs on the Security Group page and click the security group name to query

the rule.

Add Backend ECSs

1. Log in to the management console.

2. Under Network, click Elastic Load Balance.

3. On the Elastic Load Balance page, click the name of the target load balancer.

4. Locate the row that contains the target listener and click Add Backend ECS in the

Operation column.

5. In the displayed dialog box, select the subnet, enter the backend port, and select backend

ECSs to be added. For more information about the parameters, see Table 3-4. You can

filter backend ECSs by their running status, name, and private IP address.

6. Click OK.

Table 3-4 Parameter description

Parameter Description Example Value

Backend Port Specifies the port for listening to backend

ECSs. The value ranges from 1 to 65535.

123

Weight Specifies the weight of a backend ECS.

The weight determines the proportion of the

number of requests a backend ECS

processes. For example, a backend ECS

whose weight is 2 processes twice the

number of requests processed by a backend

ECS whose weight is 1. The default value

10

Page 21: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 3 Management

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

17

Parameter Description Example Value

is 1.

Remove Backend ECSs

1. In the Listener area, locate the target listener and click the number in the Backend ECS

Quantity column to view the added backend ECSs.

2. To remove a single ECS, locate the row that contains the target ECS and click Remove.

To remove multiple backend ECSs, select the target ECSs and click Remove above the

ECS list.

3. In the dialog box displayed, click OK.

3.4 Managing Certificates

Scenarios

A certificate is required when the listener uses the HTTPS protocol. You can upload a

certificate and bind it to the listener to provide the HTTPS service.

Create a Certificate

1. Log in to the management console.

2. Under Network, click Elastic Load Balance.

3. On the displayed page, click the Certificate tab.

4. Click Create Certificate under Certificate.

5. On the Create Certificate page, specify the following information:

− Certificate Name

− Description

− Certificate Content: The content must be in PEM format.

− Private Key

Private Key: This must be an unencrypted private key. The format is as follows:

-----BEGIN PRIVATE KEY-----

[key]

-----END PRIVATE KEY-----

If a certificate chain is used, you need to configure all the content and private keys from the sub-certificate to the root certificate and ensure that the content is configured in the same sequence as the private keys.

For example, if you have three certificates in a sequence of sub-certificate > intermediate certificate > root certificate, the configuration is in the same sequence.

6. Click OK.

Page 22: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 3 Management

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

18

Delete a Certificate

Only certificates that are not in use can be deleted.

Perform the following operations to delete a certificate:

1. Log in to the management console.

2. Under Network, click Elastic Load Balance.

3. On the displayed page, click the Certificate tab.

4. Locate the row that contains the target certificate and click Delete in the Operation

column.

5. In the displayed dialog box, click OK.

Modify a Certificate

1. Log in to the management console.

2. Under Network, click Elastic Load Balance.

3. On the displayed page, click the Certificate tab.

4. Locate the row that contains the target certificate and click Modify in the Operation

column.

5. In the displayed dialog box, modify the certificate information.

6. Click OK.

Bind a Certificate

1. Log in to the management console.

2. Under Network, click Elastic Load Balance.

3. On the displayed page, click the name of the load balancer for which the HTTPS

protocol is to be selected.

4. In the Listener area, click Add Listener.

5. In the displayed dialog box, configure the parameters based on Table 3-5. When

Protocol set to HTTPS, a certificate must be bound to the listener.

Table 3-5 Parameter description

Parameter Description Example Value

Name Specifies the name of the listener. listener01

Protocol/Frontend Port Select HTTPS. HTTPS/443

LB Algorithm Specifies the algorithm that the load balance

uses.

Round robin: Each connection request is

distributed to the next ECS in sequence so

that all requests are distributed evenly to all

ECSs.

Least connections: New connections are

distributed to the ECS processing the least

connections.

Round robin

Page 23: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 3 Management

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

19

Parameter Description Example Value

Source IP address: The source IP address of

the request is used as the HashKey to

identify the ECS in the static fragment table.

NOTE

Choose an appropriate algorithm as needed to distribute access traffic and improve load balancing capabilities.

Certificate A certificate is required when Protocol set to

HTTPS.

-

Sticky Session Type Specifies the sticky session type.

Source IP address: The source IP address of

the request is used as the HashKey to

identify the ECS in the static fragment table.

HTTP cookie: The load balancer generates a

cookie after it receives a request from a

client. All the subsequent requests with the

cookie are distributed to the same backend

ECS for processing.

App cookie: This type of sticky session

relies on backend applications. All requests

with the cookie generated by backend

applications are distributed to the same

backend ECS for processing.

NOTE

The source IP address type applies to TCP. Choose an appropriate sticky session type as needed to distribute access traffic and improve load balancing capabilities.

HTTP cookie

Description Provides supplementary information about the

listener.

-

Health Check Mode Specifies the supported health check mode. Four

values are available (the value cannot be

modified once it is set):

HTTPS: available only when Protocol is set

to TCP.

TCP: available when Protocol is set to

HTTP, or TCP

HTTP: available only when Protocol is set

to TCP or HTTP.

HTTP

Interval (s) Specifies the maximum interval for the health

check.

5

Timeout (s) Specifies the maximum timeout duration for the

health check.

10

Check Path Specifies the health check path, which is a URL.

This parameter is required if Health Check

Mode is set to HTTP.

/index.html

Page 24: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 3 Management

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

20

Parameter Description Example Value

Maximum Retries Specifies the maximum number of retries for the

health check. The value ranges from 1 to 10.

3

HTTP Method Specifies the HTTP or HTTPS request method.

This parameter is required if Health Check

Mode is set to HTTP or HTTPS.

GET

HTTP Status Code Specifies the returned status code for an HTTP

or HTTPS request. This parameter is required if

Health Check Mode is set to HTTP or

HTTPS.

201

6. Click OK.

Page 25: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 4 FAQs

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

21

4 FAQs

4.1 What Is ELB? Elastic Load Balance (ELB) is a traffic distribution control service that distributes access

traffic to multiple Elastic Cloud Servers (ECSs) based on the forwarding policy. ELB enables

you to achieve higher levels of fault tolerance and expand service capabilities of your

applications.

In addition, ELB supports centralized deployment of internal and external networks. It also

allows access through the VPN, Direct Connect connections, and across VPCs.

You can create a load balancer on a web-based console, configure listening ports and backend

ECSs required for the service. ELB helps eliminate single points of failure (SPOFs),

improving the availability of the whole system.

4.2 Can I Adjust the Bandwidth of a Load Balancer? You can adjust the bandwidth of a public network load balancer by adjusting that of the bound

EIP. For details about how to modify the EIP bandwidth, see the Virtual Private Cloud User

Guide.

4.3 What Forwarding Rules Does ELB Support?

ELB supports the following forwarding rules:

Round robin: sends requests to backend ECSs in polling mode. This forwarding rule

applies to short-connection services, such as the HTTP service.

Least connections: preferentially sends requests to the backend ECS with the least

connections. This forwarding rule applies to long-connection services, such as the

database service.

Source IP address: calculates the hash value of the request source IP address and sends

requests to a matched ECS. This forwarding rule ensures that requests initiated from the

same source IP addresses are sent to a fixed ECS. This rule applies to TCP connections

of load balancers that do not use cookies.

Page 26: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 4 FAQs

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

22

4.4 Does ELB Support ECSs Running Different OSs? ELB has no requirements for the OSs used on backend ECSs.

It will run properly if your ECSs have consistent data and the same applications deployed.

Although there are no specific requirements for backend OSs, it is recommended that you

install the same OS on all of your ECSs to simplify operation and maintenance (O&M). If the

IP mode is used, only backend ECSs running Linux are supported.

4.5 How Many Load Balancers Can I Have? You can have a maximum of 10 load balancers by default.

If you need more load balancers, you can apply for a higher quota. You can apply for a

maximum of 255 load balancers.

4.6 Does ELB Support an SSL Certificate Chain? Yes. You can upload the certificates to the console and put the certificate information in

Certificate Content. Private keys can be stored in the same way as the certificates.

A certificate chain has multiple certificates, and the correct sequence for filling in Certificate

Content is sub-certificate, intermediate certificate, and root certificate. A sub-certificate is

website certificate.

4.7 How Can ELB Support Multiple Certificates? Each listener supports only one certificate or certificate chain. If you have multiple

certificates or certificate chains, you need to create more listeners.

4.8 How Can I Configure a Public or Private Network Load Balancer?

When you create a load balancer, a virtual IP address will be assigned and a private network

load balancer is created by default. If you bind a public network IP address to the load

balancer, it can serve as a public network load balancer. ELB supports private and public

network access simultaneously.

4.9 What Are the Functions of a Listener? A listener specifies the load balancer protocol and port, ECS protocol and port, and listening

policy.

Page 27: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 4 FAQs

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

23

4.10 What Is the Relationship Between the Load Balancing Algorithms and Sticky Session Types?

The sticky session feature ensures that requests from the same user are forwarded to the same

backend ECS. Three types of sticky sessions are available. Table 4-1 lists relationships with

load balancing algorithms.

Table 4-1 Relationships between load balancing algorithms and sticky session types

Load Balancing Algorithm

Sticky Session Type Layer 4 (TCP) Layer 7 (HTTP/HTTPS)

Round robin Source IP address Supported Not supported

HTTP cookie N/A Supported

App cookie N/A Supported

Least connections Source IP address Supported Not supported

HTTP cookie N/A Supported

App cookie N/A Supported

Source IP address Source IP address Supported Supported

HTTP cookie N/A Supported

App cookie N/A Supported

Round robin is recommended. Layer-4 sticky sessions use source IP addresses, and layer-7

sticky sessions use HTTP cookies.

4.11 What Are Protocols and Frontend Ports? The system supports load balancing using the HTTPS, TCP (layer 4) or HTTP (layer 7)

protocol. You can select a protocol and default port based on the service provided.

Protocol Function

TCP Application deployment using TCP

HTTP Web application

HTTPS Web applications using HTTPS

Page 28: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 4 FAQs

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

24

4.12 What Are ECS Protocols and Ports? Backend ECSs provide network service protocols and ports. For example, if Internet

Information Services (IIS) is installed on a Windows ECS, the default protocol is HTTP, and

the default port is 80.

4.13 Is the EIP Assigned to a Load Balancer Used Exclusively?

During the life cycle of your ELB, the assigned EIP is exclusively used by your load balancer.

4.14 Will There Be Any Adverse Impact If I Delete My Load Balancer?

If your service IP address has been correctly resolved to the domain name and ELB runs

properly, do not delete your load balancer unless necessary. If the load balancer is deleted, its

IP address and service configuration will be released, and deleted data cannot be restored. If

you create a new one, a new IP address will be assigned. However, you can also use original

IP address when creating the load balancer.

4.15 How Do I Rectify a Health Check Failure? The health check is implemented by detecting the heartbeat communication between the load

balancer and backend ECSs. The load balancer communicates with backend ECSs over an

intranet. Therefore, to conduct a successful health check, you need to ensure that your ECSs

are routable from the intranet. You can perform the following steps to rectify a health check

failure.

1. In the Listener area, locate the row that contains the listener for which the health check

fails, and click View in the Health Check column. A dialog box is displayed.

− Health Check Mode: Ensure that the protocol has been configured and port has

been enabled for the ECS to be checked.

− Check Path: If HTTP is used for the health check, check whether the health check

path for the ECS is correct.

2. Ensure that software, such as the firewall, in the ECS, does not block the health check

source IP addresses.

3. Check whether rules of the security group to which the backend ECS belongs allows

access by 100.125.0.0/16, and configure the protocol and port used for the health check

of the load balancer. Obtain the health check protocol and port from the dialog box

displayed in step 1.

4. If the health check failure persists, contact technical support.

Page 29: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide 4 FAQs

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

25

4.16 Why Do Many IP Addresses Accessing the Backend ECSs of a Load Balancer Begin with 100.125?

This issue is caused by the health check.

In addition to forwarding external access requests to backend ECSs using internal IP

addresses of system servers, ELB performs health check on the ECSs to check backend

service availability. When forwarding external access requests or initiating health check

requests, ELB translates their source IP addresses into IP addresses starting with 100.125,

such as 100.125.0.0/16.

To make your external services available, ensure that the security group containing the ECSs

allows traffic from these IP addresses.

4.17 How Can I Obtain the Real IP Address of a Visitor? Layer-7 (HTTPS) load balancing automatically obtains real IP addresses of visitors using the

X-Forwarded-For HTTP header. This function cannot be disabled.

Layer-4 (TCP) load balancing requires the TOA kernel module to obtain real IP addresses.

4.18 What Are the Limitations of Selecting the Subnet During Load Balancer Creation?

If different VPCs of the same user have subnets with the same network segment, a load

balancer can be created in the first subnet and load balancers created in other subnets are

unavailable.

Page 30: User Guide - HUAWEI CLOUD · The purchased products, services and features are stipulated by the contract made between Huawei and the customer. All or part of the products, services

Elastic Load Balance

User Guide A Change History

Issue 01 (2018-01-19) Huawei Proprietary and Confidential

Copyright © Huawei Technologies Co., Ltd.

26

A Change History

Release Date What's New

2018-01-19 This issue is the first official release.