Flexible Engine - Advanced guide


Updated on :

Step 4 – Configuring load balancer (ELB)

For this step, you will create and configure a load balancer using the Elastic Load Balance (ELB) service. ELB is a service that automatically distributes incoming traffic between multiple ECS to balance their loads. In our case, the load distributor we are going to create will improve fault tolerance and expand the service capabilities of the applications installed on our web server.

To create an ELB, click Elastic Load Balance, and then Create Classic Load Balancer.

 

On the new page that appears, enter the following information:

  • Type: Public network
  • Subnet: Web-subnet
  • VPC: web-vpc
  • EIP: use Existing (select the EIP from the previous)
  • Public Network Bandwidth: 300 Mbit/s
  • Description: load distributor for the web server
  • Name: elb-advanced

 

Click Create Now, then on Submit, and wait for a few seconds for the screen to show the newly created ELB.

 

 

Now, we have to specify the protocols that we want to do with the load distribution. For this, we create two Listeners object associated with our ELB. Select the newly created load balancer (elb-advanced), and click the Add Listener button and fill in the following information:

 

Listener 1

  • Name: listener-advanced
  • Frontend Protocol/Port: HTTP/80
  • Backend Protocol/Port: HTTP/80
  • LB Mode: Round Robin
  • Sticky Session: No
  • HealthCheck Mode: HTTP/80
  • Interval (s): 5
  • Timeout (s): 10
  • Healthy Threshold: 3
  • Unhealthy Threshold: 3
  • Check Path: /

 

Listener 2

  • Name: listener-advanced-ssh
  • Frontend Protocol/Port: TCP/22
  • Backend Protocol/Port: TCP/22
  • LB Mode: Round Robin
  • Sticky Session: Yes
  • Stickiness Duration: 5 min
  • HealthCheck Mode: TCP/22
  • Interval (s): 5
  • Timeout (s): 10
  • Healthy Threshold: 3
  • Unhealthy Threshold: 3
  • Check Path: /

 

Click OK.

 

You can now access the web site via the ELB, specifying in your web browser the ELB’s EIP in place of that of the ECS : http://<EIP de ELB>/index.html.