How to get started with Managed 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!
Managed 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.
The Managed 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 Managed 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.
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 session capacity and number of nodes employed by the Load Balancer.
- Service name asks you to set a unique name for your Load Balancer service
Once you’ve made your selections, click the Next button to proceed.
Next up, you will be asked to set up your backends. 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, your backend Cloud Servers need to be connected to this network.
- 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.
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.
The 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.
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.
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.
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 creating SSL certificates bundles. The certificate bundles can then be easily applied to your Load Balancer frontends to enable HTTPS.
You can find detailed instructions on how to obtain dynamic SSL certificates using the certificate manager or how to upload your own certificates in our SSL Certificate tutorial.
Managed 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 would be better spent developing your services.