{"id":216,"date":"2026-09-22T10:46:22","date_gmt":"2026-09-22T10:46:22","guid":{"rendered":"https:\/\/phoenixnap.com\/doc\/?p=216"},"modified":"2026-11-27T10:31:06","modified_gmt":"2026-11-27T10:31:06","slug":"load-balancing","status":"publish","type":"post","link":"https:\/\/phoenixnap.com\/doc\/load-balancing","title":{"rendered":"Set Up a Load Balancer"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">The <strong><code>s0.d1.small<\/code><\/strong> server is ideal for demonstrating HAProxy configuration and testing load balancing. In this tutorial, HAProxy runs on the server alongside three lightweight local web servers that simulate backend services.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For production deployments, choose a server configuration based on expected traffic, connection counts, and resource requirements.<\/p>\n\n\n\n<div class=\"wp-block-group has-background is-vertical is-layout-flex wp-container-core-group-is-layout-2e417836 wp-block-group-is-layout-flex\" style=\"border-left-color:#4fabc2;border-left-width:0.19rem;background-color:#4fabc233;padding-top:0.94rem;padding-right:var(--wp--preset--spacing--30);padding-bottom:0.94rem;padding-left:1.25rem\">\n<h6 class=\"wp-block-heading\" style=\"font-size:0.81rem;font-style:normal;font-weight:600;letter-spacing:0px\">Prerequisites<\/h6>\n\n\n\n<p class=\"wp-block-paragraph\" style=\"font-size:clamp(0.875rem, 0.875rem + ((1vw - 0.2rem) * 0.102), 0.94rem);\">Log in to the <a href=\"https:\/\/bmc.phoenixnap.com\/\" target=\"_blank\" rel=\"noreferrer noopener\">BMC portal<\/a> (if you are a new user, <a href=\"https:\/\/phoenixnap.com\/doc\/set-up-your-account\/\" data-type=\"post\" data-id=\"313\">set up your account<\/a>). You will also need a deployed <strong><code>s0.d1.small<\/code><\/strong> BMC server running Ubuntu. <a href=\"https:\/\/phoenixnap.com\/doc\/connect-to-server\" data-type=\"post\" data-id=\"568\">Connect to your server<\/a> via SSH or <a href=\"https:\/\/phoenixnap.com\/doc\/bmc-remote-console\/\" data-type=\"post\" data-id=\"209\">remote console<\/a>.<\/p>\n<\/div>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Install HAProxy<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">HAProxy receives incoming requests and forwards them to the backend servers according to its configuration.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1. Add the HAProxy repository:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">sudo add-apt-repository ppa:vbernat\/haproxy-1.8<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Press <strong>Enter<\/strong> when asked to add the repository.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2. Update the package list:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-2\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">sudo apt-get update<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-2\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">3. Install HAProxy:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-3\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">sudo apt-get install haproxy<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-3\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Step 2: Create Test Web Servers<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Create three local web servers to simulate backend services. Each server returns a different page so you can identify which backend handled a request.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1. Create three directories:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-4\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">mkdir server{1..3}<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-4\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">2. Create an <em><strong>index.html<\/strong><\/em> file in each directory:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-5\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">touch server{1..3}\/index.html<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-5\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">3. Add a distinct HTML page to each file. For example:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-6\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">sudo vi server1\/index.html<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-6\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Add the following content:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-7\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml shcb-code-table shcb-line-numbers\"><span class='shcb-loc'><span><span class=\"hljs-meta\">&lt;!DOCTYPE <span class=\"hljs-meta-keyword\">html<\/span>&gt;<\/span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">html<\/span>&gt;<\/span>\n<\/span><\/span><span class='shcb-loc'><span>  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">head<\/span>&gt;<\/span>\n<\/span><\/span><mark class='shcb-loc'><span>\u00a0\u00a0  <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">title<\/span>&gt;<\/span>Server 1<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">title<\/span>&gt;<\/span>\n<\/span><\/mark><span class='shcb-loc'><span>  <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">head<\/span>&gt;<\/span>\n<\/span><\/span><mark class='shcb-loc'><span>    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">body<\/span>&gt;<\/span>Connected!<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">body<\/span>&gt;<\/span>\n<\/span><\/mark><span class='shcb-loc'><span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">html<\/span>&gt;<\/span>\n<\/span><\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-7\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">4. Repeat the process for <em><strong>server2\/index.html<\/strong><\/em> and <strong><em>server3\/index.html<\/em><\/strong>. Change the title and body text to identify each server.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Configure HAProxy Load Balancer<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">1. Edit the HAProxy configuration file (<strong><em>\/etc\/haproxy\/haproxy.cfg<\/em><\/strong>) and add the following configuration:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-8\" data-shcb-language-name=\"Properties\" data-shcb-language-slug=\"properties\"><span><code class=\"hljs language-properties shcb-code-table shcb-line-numbers\"><span class='shcb-loc'><span><span class=\"hljs-attr\">defaults<\/span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-meta\">\u00a0\u00a0mode<\/span> <span class=\"hljs-string\">http<\/span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-meta\">\u00a0\u00a0timeout<\/span> <span class=\"hljs-string\">client 10s<\/span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-meta\">\u00a0\u00a0timeout<\/span> <span class=\"hljs-string\">connect 5s<\/span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-meta\">\u00a0\u00a0timeout<\/span> <span class=\"hljs-string\">server 10s<\/span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-meta\">\u00a0\u00a0timeout<\/span> <span class=\"hljs-string\">http-request 10s<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-attr\">frontend<\/span> <span class=\"hljs-string\">myfrontend<\/span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-meta\">\u00a0\u00a0bind<\/span> <span class=\"hljs-string\">127.0.0.1:80<\/span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-meta\">\u00a0\u00a0default_backend<\/span> <span class=\"hljs-string\">myservers<\/span>\n<\/span><\/span><span class='shcb-loc'><span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-attr\">backend<\/span> <span class=\"hljs-string\">myservers<\/span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-meta\">\u00a0\u00a0balance<\/span> <span class=\"hljs-string\">roundrobin<\/span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-meta\">\u00a0\u00a0server<\/span> <span class=\"hljs-string\">server1 127.0.0.1:8000<\/span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-meta\">\u00a0\u00a0server<\/span> <span class=\"hljs-string\">server2 127.0.0.1:8001<\/span>\n<\/span><\/span><span class='shcb-loc'><span><span class=\"hljs-meta\">\u00a0\u00a0server<\/span> <span class=\"hljs-string\">server3 127.0.0.1:8002<\/span>\n<\/span><\/span><\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-8\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Properties<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">properties<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">The configuration has three sections:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>defaults<\/code><\/strong>. The shared settings defined in all the following sections. The section sets the wait times to help avoid common connection problems.<\/li>\n\n\n\n<li><strong><code>frontend<\/code><\/strong>. Defines the address and port where HAProxy receives requests. The <strong><code>default_backend<\/code><\/strong> line points to where the load balancer should relay the connections.<\/li>\n\n\n\n<li><strong><code>backend<\/code><\/strong>. Stores the server addresses and ports for multiple servers, defined in the following step. The load balancing algorithm is set to <strong>round robin<\/strong>.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Save the file.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">2. Restart HAProxy to apply the configuration:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-9\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">sudo systemctl restart haproxy<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-9\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<h2 class=\"wp-block-heading\">Step 4: Run the Test Servers and Verify Load Balancer<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Run each test web server in a separate terminal session:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1. Open three additional terminal tabs and connect to the same BMC server in each tab:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-10\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">ssh ubuntu@&#91;PUBLIC_IP]<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-10\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">2. In each session, navigate to a different directory and start the web server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Session 1<\/strong>:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-11\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">python3 -m http.server 8000 --<span class=\"hljs-built_in\">bind<\/span> 127.0.0.1<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-11\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\"><strong>Session 2<\/strong>:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-12\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">python3 -m http.server 8001 --<span class=\"hljs-built_in\">bind<\/span> 127.0.0.1<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-12\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\"><strong>Session 3<\/strong>:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-13\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">python3 -m http.server 8002 --<span class=\"hljs-built_in\">bind<\/span> 127.0.0.1<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-13\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Keep these processes running. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">3. In your original terminal session, send a request to HAProxy:<\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-14\" data-shcb-language-name=\"Bash\" data-shcb-language-slug=\"bash\"><span><code class=\"hljs language-bash\">curl 127.0.0.1:80<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-14\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">Bash<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">bash<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p class=\"wp-block-paragraph\">Repeat the command several times. The response identifies different backend packages as HAProxy distributes new requests using round-robin balancing.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Install HAProxy on an s0.d1.small server instance, configure round-robin load balancing, and test traffic distribution across three web servers.<\/p>\n","protected":false},"author":8,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[57],"tags":[],"class_list":["post-216","post","type-post","status-publish","format-standard","hentry","category-tutorials"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Set Up a Load Balancer | phoenixNAP<\/title>\n<meta name=\"description\" content=\"Learn how to configure an HAProxy load balancer on phoenixNAP Bare Metal Cloud servers, set up round-robin rules, and test backends.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/phoenixnap.com\/doc\/load-balancing\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Set Up a Load Balancer | phoenixNAP\" \/>\n<meta property=\"og:description\" content=\"Learn how to configure an HAProxy load balancer on phoenixNAP Bare Metal Cloud servers, set up round-robin rules, and test backends.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/phoenixnap.com\/doc\/load-balancing\" \/>\n<meta property=\"og:site_name\" content=\"BMC Docs\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/phoenixnap\" \/>\n<meta property=\"article:published_time\" content=\"2026-09-22T10:46:22+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-11-27T10:31:06+00:00\" \/>\n<meta name=\"author\" content=\"Marko Aleksic\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@phoenixNAP\" \/>\n<meta name=\"twitter:site\" content=\"@phoenixNAP\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Marko Aleksic\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/load-balancing#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/load-balancing\"},\"author\":{\"name\":\"Marko Aleksic\",\"@id\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/#\\\/schema\\\/person\\\/388816d91a9c0dbfb4257a5807eb0850\"},\"headline\":\"Set Up a Load Balancer\",\"datePublished\":\"2026-09-22T10:46:22+00:00\",\"dateModified\":\"2026-11-27T10:31:06+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/load-balancing\"},\"wordCount\":343,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/#organization\"},\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/load-balancing#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/load-balancing\",\"url\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/load-balancing\",\"name\":\"Set Up a Load Balancer | phoenixNAP\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/#website\"},\"datePublished\":\"2026-09-22T10:46:22+00:00\",\"dateModified\":\"2026-11-27T10:31:06+00:00\",\"description\":\"Learn how to configure an HAProxy load balancer on phoenixNAP Bare Metal Cloud servers, set up round-robin rules, and test backends.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/load-balancing#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/load-balancing\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/load-balancing#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Set Up a Load Balancer\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/#website\",\"url\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/\",\"name\":\"phoenixNAP Bare Metal Cloud Documentation\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/#organization\",\"name\":\"phoenixNAP\",\"url\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/phoenixnap-logo.png\",\"contentUrl\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/wp-content\\\/uploads\\\/2026\\\/10\\\/phoenixnap-logo.png\",\"width\":200,\"height\":200,\"caption\":\"phoenixNAP\"},\"image\":{\"@id\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/phoenixnap\",\"https:\\\/\\\/x.com\\\/phoenixNAP\",\"https:\\\/\\\/www.linkedin.com\\\/company\\\/phoenix-nap\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/PhoenixNAPdatacenter\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/#\\\/schema\\\/person\\\/388816d91a9c0dbfb4257a5807eb0850\",\"name\":\"Marko Aleksic\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cd755a8fadae1a19e47b381aa9aa6309fde0a9dbb6decea8c96f027e1babf093?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cd755a8fadae1a19e47b381aa9aa6309fde0a9dbb6decea8c96f027e1babf093?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/cd755a8fadae1a19e47b381aa9aa6309fde0a9dbb6decea8c96f027e1babf093?s=96&d=mm&r=g\",\"caption\":\"Marko Aleksic\"},\"url\":\"https:\\\/\\\/phoenixnap.com\\\/doc\\\/author\\\/markoa\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Set Up a Load Balancer | phoenixNAP","description":"Learn how to configure an HAProxy load balancer on phoenixNAP Bare Metal Cloud servers, set up round-robin rules, and test backends.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/phoenixnap.com\/doc\/load-balancing","og_locale":"en_US","og_type":"article","og_title":"Set Up a Load Balancer | phoenixNAP","og_description":"Learn how to configure an HAProxy load balancer on phoenixNAP Bare Metal Cloud servers, set up round-robin rules, and test backends.","og_url":"https:\/\/phoenixnap.com\/doc\/load-balancing","og_site_name":"BMC Docs","article_publisher":"https:\/\/www.facebook.com\/phoenixnap","article_published_time":"2026-09-22T10:46:22+00:00","article_modified_time":"2026-11-27T10:31:06+00:00","author":"Marko Aleksic","twitter_card":"summary_large_image","twitter_creator":"@phoenixNAP","twitter_site":"@phoenixNAP","twitter_misc":{"Written by":"Marko Aleksic","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/phoenixnap.com\/doc\/load-balancing#article","isPartOf":{"@id":"https:\/\/phoenixnap.com\/doc\/load-balancing"},"author":{"name":"Marko Aleksic","@id":"https:\/\/phoenixnap.com\/doc\/#\/schema\/person\/388816d91a9c0dbfb4257a5807eb0850"},"headline":"Set Up a Load Balancer","datePublished":"2026-09-22T10:46:22+00:00","dateModified":"2026-11-27T10:31:06+00:00","mainEntityOfPage":{"@id":"https:\/\/phoenixnap.com\/doc\/load-balancing"},"wordCount":343,"commentCount":0,"publisher":{"@id":"https:\/\/phoenixnap.com\/doc\/#organization"},"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/phoenixnap.com\/doc\/load-balancing#respond"]}]},{"@type":"WebPage","@id":"https:\/\/phoenixnap.com\/doc\/load-balancing","url":"https:\/\/phoenixnap.com\/doc\/load-balancing","name":"Set Up a Load Balancer | phoenixNAP","isPartOf":{"@id":"https:\/\/phoenixnap.com\/doc\/#website"},"datePublished":"2026-09-22T10:46:22+00:00","dateModified":"2026-11-27T10:31:06+00:00","description":"Learn how to configure an HAProxy load balancer on phoenixNAP Bare Metal Cloud servers, set up round-robin rules, and test backends.","breadcrumb":{"@id":"https:\/\/phoenixnap.com\/doc\/load-balancing#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/phoenixnap.com\/doc\/load-balancing"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/phoenixnap.com\/doc\/load-balancing#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/phoenixnap.com\/doc\/"},{"@type":"ListItem","position":2,"name":"Set Up a Load Balancer"}]},{"@type":"WebSite","@id":"https:\/\/phoenixnap.com\/doc\/#website","url":"https:\/\/phoenixnap.com\/doc\/","name":"phoenixNAP Bare Metal Cloud Documentation","description":"","publisher":{"@id":"https:\/\/phoenixnap.com\/doc\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/phoenixnap.com\/doc\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/phoenixnap.com\/doc\/#organization","name":"phoenixNAP","url":"https:\/\/phoenixnap.com\/doc\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/phoenixnap.com\/doc\/#\/schema\/logo\/image\/","url":"https:\/\/phoenixnap.com\/doc\/wp-content\/uploads\/2026\/10\/phoenixnap-logo.png","contentUrl":"https:\/\/phoenixnap.com\/doc\/wp-content\/uploads\/2026\/10\/phoenixnap-logo.png","width":200,"height":200,"caption":"phoenixNAP"},"image":{"@id":"https:\/\/phoenixnap.com\/doc\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/phoenixnap","https:\/\/x.com\/phoenixNAP","https:\/\/www.linkedin.com\/company\/phoenix-nap\/","https:\/\/www.youtube.com\/user\/PhoenixNAPdatacenter"]},{"@type":"Person","@id":"https:\/\/phoenixnap.com\/doc\/#\/schema\/person\/388816d91a9c0dbfb4257a5807eb0850","name":"Marko Aleksic","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/cd755a8fadae1a19e47b381aa9aa6309fde0a9dbb6decea8c96f027e1babf093?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/cd755a8fadae1a19e47b381aa9aa6309fde0a9dbb6decea8c96f027e1babf093?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/cd755a8fadae1a19e47b381aa9aa6309fde0a9dbb6decea8c96f027e1babf093?s=96&d=mm&r=g","caption":"Marko Aleksic"},"url":"https:\/\/phoenixnap.com\/doc\/author\/markoa"}]}},"_links":{"self":[{"href":"https:\/\/phoenixnap.com\/doc\/wp-json\/wp\/v2\/posts\/216","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/phoenixnap.com\/doc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/phoenixnap.com\/doc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/phoenixnap.com\/doc\/wp-json\/wp\/v2\/users\/8"}],"replies":[{"embeddable":true,"href":"https:\/\/phoenixnap.com\/doc\/wp-json\/wp\/v2\/comments?post=216"}],"version-history":[{"count":14,"href":"https:\/\/phoenixnap.com\/doc\/wp-json\/wp\/v2\/posts\/216\/revisions"}],"predecessor-version":[{"id":3392,"href":"https:\/\/phoenixnap.com\/doc\/wp-json\/wp\/v2\/posts\/216\/revisions\/3392"}],"wp:attachment":[{"href":"https:\/\/phoenixnap.com\/doc\/wp-json\/wp\/v2\/media?parent=216"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/phoenixnap.com\/doc\/wp-json\/wp\/v2\/categories?post=216"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/phoenixnap.com\/doc\/wp-json\/wp\/v2\/tags?post=216"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}