Early bird access to UpCloud Load Balancer

Sharing work between multiple members of a group is a true and tested method for improving efficiency. However, rarely is it this quick and easy to accomplish by simply configuring Load Balancer!

UpCloud Load Balancer empowers you to effortlessly build resilience and increase application throughput with simple yet flexible configuration. In this tutorial, we’ll introduce you to the features and options that can help you make the most of your cloud infrastructure.

Prerequisites

The UpCloud Load Balancer works as the network level frontend of your application or website by directing connections to your backend servers. As such, to test out the capabilities of the Load Balancer, you will need at least 2 Cloud Servers in the same zone that are connected to the same SDN Private network.

If you are new to the world of software-defined networking, you might want to begin with our tutorial for configuring SDN Private networks. Once all set up on the backend, adding a Load Balancer is just plug-n-play.

Creating Load Balancer

The UpCloud Load Balancer works on the network level redirecting traffic to the backend Cloud Servers. At this time, the Load Balancer needs to be within the same data centre as the intended backend servers. If you already have Cloud Servers up and running, you can begin by heading over to your UpCloud Control Panel and the Load Balancer section.

Click the Get started button to open the new Load Balancer configuration page.

You will then be greeted by the first of the three-part configuration wizard.

1. Configuration

In the first part, you have the following selections to make:

  • Location is the data centre the Load Balancer will be created in. Choose the same location as your backend Cloud Servers.
  • Plan allows you to pick the system resources and the number of nodes employed by the Load Balancer.
  • Service name asks you to set a unique name for your Load Balancer serviceOnce you’ve made your selections, click the Next button to proceed.

2. Backends

Following the configuration choices, you will next be asked to set up your backend. This consists of selecting the appropriate SDN Private network and adding at least one backend with attached Cloud Servers.

  • Private network means the SDN Private network that will be used to facilitate the backend connections.
  • Backends can be created by clicking the Add Backend button.
    • Click the Add new member button to attach Cloud Servers.
    • Note that you can have multiple backends with any number of attached backend servers allowing many possibilities in service configurations.

When done, click the Next button again to continue to the last section.

3. Frontends

In the final part of the Load Balancer configuration, you can select the load balancing algorithm as well as create the frontend configurations to manage incoming connections.

  • Algorithm determines the method according to which the traffic is distributed between your backends servers. You can choose between the following options:
    • Round robin uses each backend server evenly in turn.
    • Least connections direct traffic to the backend server with the lowest number of connections.
    • Source IP hashes the IP address of the incoming connection and divides the traffic evenly while ensuring the same backend is always chosen for the same source IP.
    • Hostname matching routes incoming traffic based on the domain name specified in the Host header allowing you to distribute traffic to e.g. example.com and blog.example.com to different backends.
  • Frontends declare the port numbers and traffic modes your Load Balancer will listen for.
    • Create a new by clicking the Add Frontend button,
    • Select between HTTP and TCP modes
    • Choose the default backend
    • Enter the port number
    • Include an SSL certificate bundle or add a new one.

After you have configured the required frontends, click the Create Load Balancer button to confirm. Then just sit back and we take care of the setup in the background.

Load Balancer settings

Once you’ve created your first Load Balancer, you can take a look at the management panel. It provides you with much the same configuration options to further customise your Load Balancer as in the creation step.

Below we’ve outlined what each of the tabs at your Load Balancer can help you with.

Overview

The first tab includes, most importantly, the domain name the Load Balancer will respond to. Additionally, you have the configuration details and the option to resize the service.

If you configured the front and backends with live services, you can already test the connectivity by simply using the Load Balancer domain. However, for a more human-readable domain, you should create a CNAME record for your own domain to direct traffic to the Load Balancer.

This would be done with your domain name registrar. Have a look at our explanatory guide on DNS systems if you are unfamiliar with how to go about getting this done.

Backends

Besides configuring backends during Load Balancer creation, here you have the same options for managing the backends of your Load Balancer. Create or modify backends to scale your services by adding or removing backend nodes.

Frontends

This section allows you to make changes to your frontend configuration. Add or remove frontends, set which backends each redirects to or create load balancing rules for more control over the flow of traffic to your application or website.

You can also add or change the SSL certificates used for your Load Balancer and enable secure access.

Managing SSL certificates

Besides creating and managing Load Balancers, you also have the option to set up certificate management by uploading your SSL certificates. The certificate bundles can then easily be applied to your Load Balancer frontends to enable HTTPS. In the Certificates section under the Load Balancer menu, click the Add certificates bundle button to get started. Then in the Create certificate bundle window, do the following:

  • Name the certificate bundle, for example, according to the domain it is for.
  • Certificate type set to manual allows you to upload your own certificates.
  • Certificate section itself requires you to enter or upload the certificate file for a specific domain.
  • Intermediata certificates act as in-between to protect the root certificates and the server certificates issued out to the public.
  • Private key is used to validate your certificate and must be included for the certificates to work.

After you’ve entered the necessary details, click the Create button to add the certificate bundle. Once created, certificate bundles can be assigned to Load Balancer frontends to enable HTTPS. Additionally, as SSL certificates are only issued for a limited time, you will need to be able to update them. This can be done by editing the existing certificate bundle and adding the new certificates to overwrite the expiring ones. Any Load Balancers using the particular certificate bundle will then automatically update the certificates without interruption to your services.

Summary

UpCloud Load Balancer makes it quick and easy to distribute your website traffic or application workload across a scaling cluster. Combined with the built-in certificate management, it can save you time and money that’d be better spent developing your services.

Janne Ruostemaa

Editor-in-Chief

Back to top