May 12, 2021

How to create a load balancing infrastructure?

AuthorDaniel Krüger
Categories

In our blog series on the topic of the cloud, we have already taken a closer look at the main types of cloud computing (blog article). Infrastructure as a Service (IaaS) is one of these service models. Typical components of the data centre infrastructure such as hardware, computing power, storage space or network resources are found here in the cloud. But what does this look like in concrete terms and what challenges can be overcome with laaS?

What does load balancing mean and why is it so important?

Load balancing refers to the process of distributing a set of tasks across a number of computing units with the aim of using these resources more efficiently. Load balancing can optimise response time and avoid uneven overloading of some computing nodes while leaving other computing nodes idle.(Source)

What are the use cases?

Use cases for load balancing include automatically detecting outages, rerouting traffic, enabling server maintenance without any degradation and providing higher performance and availability in general.(Source)

Creating Load Balancers: A step-by-step guide

In technical terms: [number of the step]. [AWS name of page] / [Azure name of page].

Step 1: Find the load balancer service; select the load balancer type

  • AWS: Go to EC2, then "Load Balancing" and select "Load Balancers"; click "Create Load Balancer", then select "Application Load Balancer"
  • Azure: In the portal, search for "Load Balancers," select "Application Gateway"
  • IBM: Search for "Load Balancers" in the portal, select "IBM Cloud Load Balancer"

Step 2: Configure Load Balancer / Basics

  • AWS: Enter a name, select VPC and availability zones; you must specify at least two availability zones
  • Azure: Enter a name and resource group, then select a region, virtual network, and subnet; CAUTION: The subnet must have the Application Gateway as its only member
  • IBM: Enter a name and the data center where the load balancer will be created. Also specify the type of load balancer (public-to-public, public-to-private, private-to-private). The pairings of the types indicate whether the frontend and backend should be private or public. Depending on which type you have selected, you may also have to specify a subnet and allocate a public IP address

Step 3: Security settings / frontends

  • AWS: If you selected the HTTPS protocol for the listener in the previous step, select or upload a certificate and add a security policy
  • Azure: Select whether you want the load balancer to be accessible via a public or private IP address; if you select "public", you must also select or create a public IP address
  • IBM: Here you select on which protocols and which ports the load balancer should listen

Step 4: Configure security group

  • AWS: Create a security group or select an existing one

Step 5: Configure routing / configuration

  • AWS: Enter a name; destination type (instance, IP, or lambda) and configure state checks if needed (usually checking if we receive an HTTP 200 code within a defined timeout window)
  • Azure: Enter a rule name; in the Listener tab, enter the listener name, whether the frontend IP should be public. In the Backend tab, add the backend target name (here of type "Backend Pool") and the HTTP settings. For HTTP settings you need to give it a name, port and request timeout
  • IBM: Here you can configure state checks. This is done by default using requests via HTTP on port 80

Step 6: Register targets / backends

  • AWS: Register the instances whose traffic is to be forwarded by the load balancer
  • Azure: Create a backend pool, give it a name and add IP addresses or fully qualified virtual machine domain names
  • IBM: Select your server instances from the dropdown table and click "Assign Server"

Step 7: Verify + Create

To learn how the various other cloud types and cloud services (PaaS and SaaS) interact in practice, see our next blog article on cloud.


Recommended article
November 30, 2022 The 12 Factor App Part 3: (Disposability, Dev/prod parity, Logs, Admin processes)

All blog articles