202 - Load Balancer

Read the Docs

If you want to get a better idea about the objects that we will be working with in this module, you can review the docs here:

Objectives

The purpose of this module is to demonstrate how to configure and deploy a load balancer as a listener in front of multiple webserver targets.

Terminology

Load Balancer

Elastic Load Balancing automatically distributes incoming application traffic across multiple targets. Traffic can be handles in a single zone or across availability zones.

Listener

Process that checks for connection requests over a specific port and routes the request to a configured target group.

Target Group

A collection of targets such as a webserver instance that is the destination for the load balancer listener

Load Balancer Concepts

Service Schema

A service allows you to declare traffic flow between different cloud resources. When services are defined they declare the type of network traffic allowed into the resource or direct traffic flow and also automatically configures resources that use the service such as a load balancer.

Like the internal-http service we define for the webserver over port 8080, here we define a service called external-http and specify the service to allow port 80.

  service:
    external-http:
      port: 80
      protocol: http

Balancer Schema

With the balancer schema we define a load balancer by providing a name, a network to deploy into and define access as a public scoped load balancer. The routes use our defined services that tell the load balancer to configure a listener with service external-http on port 80 that forwards traffic to our target service internal-http listening on port 8080.

Tuono will then handle all of the load balancer configuration from here, such as creating and ensuring the load balancer is highly available by creating subnets across availability zones and configuring all required routing to ensure that we are reaching both webservers we configured.

  balancer:
    hol-public-balancer:
      network: vnet-walkthrough
      scope: public
      routes:
       - from: external-http
         to: internal-http

Last updated

Was this helpful?