{"id":1999,"date":"2022-03-18T13:25:12","date_gmt":"2022-03-18T11:25:12","guid":{"rendered":"https:\/\/upcloud.com\/global\/us\/resources\/tutorials\/get-started-upcloud-load-balancer\/"},"modified":"2022-03-18T13:25:12","modified_gmt":"2022-03-18T11:25:12","slug":"get-started-upcloud-load-balancer","status":"publish","type":"tutorial","link":"https:\/\/upcloud.com\/global\/resources\/tutorials\/get-started-upcloud-load-balancer\/","title":{"rendered":"How to get started with Managed Load Balancer"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">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!<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Managed Load Balancer empowers you to effortlessly build resilience and increase application throughput with simple yet flexible configuration. In this tutorial, we&#8217;ll introduce you to the features and options that can help you make the most of your cloud infrastructure.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-prerequisites\">Prerequisites<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you are new to the world of software-defined networking, you might want to begin with our tutorial for <a rel=\"noreferrer noopener\" href=\"https:\/\/upcloud.com\/global\/community\/tutorials\/configure-sdn-private-networks\/\" target=\"_blank\">configuring SDN Private networks<\/a>. Once all set up on the backend, adding a Load Balancer is just plug-and-play.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-creating-load-balancer\">Creating Load Balancer<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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 <a href=\"https:\/\/hub.upcloud.com\/load-balancer\/services\" target=\"_blank\" rel=\"noreferrer noopener\">UpCloud Control Panel<\/a> and the Load Balancer section.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/load_balancer_tab-1024x466.png\" alt=\"Getting started with Managed Load Balancer\" class=\"wp-image-32945\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Click the <em><a href=\"https:\/\/hub.upcloud.com\/load-balancer\/new\" target=\"_blank\" rel=\"noreferrer noopener\">Get started<\/a><\/em> button to open the new Load Balancer configuration page.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You will then be greeted by the first of the three-part configuration wizard.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"1-configuration\">1. Configuration<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In the first part, you have the following selections to make:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Location<\/strong> is the data centre in which the Load Balancer will be created. Choose the same location as your backend Cloud Servers.<\/li>\n\n\n\n<li><strong>Plan<\/strong> allows you to pick the session capacity and number of nodes employed by the Load Balancer.<\/li>\n\n\n\n<li><strong>Service name<\/strong> asks you to set a unique name for your Load Balancer service<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/new_load_balancer.png\" alt=\"Create new Load Balancer\" class=\"wp-image-32947\" width=\"762\" height=\"1030\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Once you&#8217;ve made your selections, click the <em>Next<\/em> button to proceed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">2. Networks<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Note that the network configuration can only be set at service creation and cannot be changed later.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Public access<\/strong> when enabled allows the Load Balancer to listen for public connections. Disable this setting if you plan to use the Load Balancer internally only.<\/li>\n\n\n\n<li><strong>Private networks<\/strong> allow you to attach one or more SDN Private Networks with any number of Cloud Servers to load balance between.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">When set, click the <em>Next<\/em> button to continue to the next step.<\/p>\n\n\n\n<figure class=\"wp-block-gallery has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" data-id=\"33168\" src=\"https:\/\/upcloud.com\/media\/networks_managed_load_balancer-974x1024.png\" alt=\"Networks tab\" class=\"wp-image-33168\" \/><\/figure>\n<\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"2-backends\">3. Backends<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Next up, you will be asked to set up your load-balancing backends. This consists of selecting the appropriate SDN Private network and adding at least one backend with attached Cloud Servers.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/backend_load_balancer-1024x708.png\" alt=\"-\" class=\"wp-image-33189\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Backends<\/strong> can be created by clicking the <em>Create new backend <\/em>button.<\/li>\n\n\n\n<li>Choose a Backend name and click the <em>Create backend <\/em>button.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/create_backend-1-1024x703.png\" alt=\"Create backend Managed Load Balancer\" class=\"wp-image-33192\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Then click the <em>Edit<\/em> button to access the backend configuration.<\/li>\n\n\n\n<li>Click the <em>Add member<\/em> button to attach Cloud Servers.<\/li>\n\n\n\n<li>Note that you can have multiple backends with any number of attached backend servers allowing many possibilities in service configurations. <\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>DNS Resolver<\/strong> allows you to use hostnames instead of IP addresses by adding a DNS resolver if you have one configured. This is optional.<\/li>\n\n\n\n<li><strong>Properties<\/strong> give you access to the most commonly customised features to fine-tune your Load Balancer. Adjust the properties as needed or leave them to their default values. <\/li>\n\n\n\n<li><strong>Health check<\/strong> is part of the core functionality of the Load Balancer which keeps track of the availability of your backend servers. Set the monitoring according to the type of your backend service to allow the Load Balancer to maintain an accurate list of available backend servers.<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/edit_backends_load_balancer-422x1024.png\" alt=\"Edit backend\" class=\"wp-image-33194\" width=\"802\" height=\"1946\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Once you&#8217;ve configured your backend, click the <em>Done<\/em> button to save the changes. You can then repeat the steps to include multiple backends as needed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/backend_created_load_balancer-1024x603.png\" alt=\"Backend created for Managed Load Balancer\" class=\"wp-image-33197\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">When done, click the <em>Next<\/em> button again to continue to the last section.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"3-frontends\">4. Frontends<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>The Algorithm<\/strong> determines the method according to which the traffic is distributed between your backends servers.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Managed Load Balancer currently supports\u00a0<em>round-robin<\/em>\u00a0only. Other algorithm options will be added later.\u00a0<em>Round-robin<\/em>\u00a0uses each backend server evenly in rotation.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/frontends_load_balancer.png\" alt=\"Frontends Managed Load Balancer\" class=\"wp-image-33200\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Frontends<\/strong> declare the port numbers and traffic modes your Load Balancer will listen for.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Create a new one by clicking the <em>Add Frontend<\/em> button<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/create_frontend_load_balancer-1024x804.png\" alt=\"-\" class=\"wp-image-33199\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select between HTTP(S) and TCP modes<\/li>\n\n\n\n<li>Enter the port number<\/li>\n\n\n\n<li>Choose the default backend<\/li>\n\n\n\n<li>Include an SSL certificate bundle or <a href=\"https:\/\/upcloud.com\/global\/resources\/tutorials\/manage-ssl-certificates-load-balancer\">add a new one<\/a>.<\/li>\n\n\n\n<li>Select any private networks you want the frontend to listen to internally.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">With the frontend configuration ready, click the <em>Create frontend<\/em> button to save the settings. Then repeat the steps to create additional frontends as needed.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/frontend_created_load_balancer.png\" alt=\"Fronted created Managed Load Balancer\" class=\"wp-image-33201\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">After you have configured the required frontends, click the <em>Create Load Balancer<\/em> button to confirm. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/create-load-balancer-setting-up-1024x526.webp\" alt=\"New Managed Load Balancer setting up\" class=\"wp-image-23927\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Then just sit back and we take care of the setup in the background.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-load-balancer-settings\">Load Balancer settings<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Once you&#8217;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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Below we&#8217;ve outlined what each of the tabs at your Load Balancer can help you with.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-overview\">Overview<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/upcloud.com\/media\/managed_load_balancer_overview-829x1024.png\" alt=\"Managed Load Balancer Overview\" class=\"wp-image-33202\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This would be done with your domain name registrar. Have a look at our explanatory <a href=\"https:\/\/upcloud.com\/global\/community\/stories\/domain-name-system\/\" target=\"_blank\" rel=\"noreferrer noopener\">guide on DNS systems<\/a> if you are unfamiliar with how to go about getting this done.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-backends\">Backends<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"h-frontends\">Frontends<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can also add or change the SSL certificates used for your Load Balancer and enable secure access.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Resolvers<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">DNS resolvers are used to look up the IP addresses of the member servers by their host names. Using a DNS resolver can also allow you to further optimise your Load Balancer by caching IP addresses, increase the efficiency and performance of your system, and eliminate repeated queries.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Metrics<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">In this section, you can view the metrics of your Load Balancer for both backends and frontends. The metrics view is refreshed automatically once per minute.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use this view to watch for session rates, traffic amount, and backend response times to keep track of your Load Balancer health or troubleshoot connectivity issues.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"h-managing-ssl-certificates\">Managing SSL certificates<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Besides creating and managing Load Balancers, you also have the option to set up certificate management by creating SSL certificate bundles. The certificate bundles can then be easily applied to your Load Balancer frontends to enable HTTPS.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">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 <a href=\"https:\/\/upcloud.com\/global\/community\/tutorials\/manage-ssl-certificates-load-balancer\/\" target=\"_blank\" rel=\"noreferrer noopener\">SSL Certificate tutorial<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"summary\">Summary<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">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.<\/p>\n","protected":false},"author":3,"featured_media":33165,"comment_status":"open","ping_status":"closed","template":"","community-category":[274,259],"class_list":["post-1999","tutorial","type-tutorial","status-publish","has-post-thumbnail","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/tutorial\/1999","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/tutorial"}],"about":[{"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/types\/tutorial"}],"author":[{"embeddable":true,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/comments?post=1999"}],"version-history":[{"count":0,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/tutorial\/1999\/revisions"}],"wp:attachment":[{"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/media?parent=1999"}],"wp:term":[{"taxonomy":"community-category","embeddable":true,"href":"https:\/\/upcloud.com\/global\/wp-json\/wp\/v2\/community-category?post=1999"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}