Article

Table of Contents
Theme:
Was this article helpful?

2  out of  2 found this helpful

Try Vultr Today with

$50 Free on Us!

Want to contribute?

You could earn up to $600 by adding new articles!

How to Configure a Vultr Load Balancer with Private Networking

Last Updated: Tue, May 11, 2021
Load Balancer Scaling Networking

Introduction

The Vultr Load Balancer is a fully-managed solution to distribute traffic across multiple back-end servers. In this guide, you'll learn how to distribute web traffic to multiple webservers via their private network interface.

If you are new to Vultr Load Balancers, we recommend reading the Load Balancer Quickstart Guide first.

Vultr's Load Balancer has its own integrated firewall and supports private networking, which means you can set up advanced configurations like this:

Network Diagram

  • The Web Servers listen to HTTP on the private network.
  • The Web Servers listen to SSH on the public network.
  • The Vultr Firewall allows SSH to the public network.
  • The Load Balancer Firewall allows HTTP traffic from Cloudflare.
  • The Load Balancer distributes HTTP traffic to the web servers on the private network.

For simplicity, this example uses HTTP, but you could expand this to any protocol. If you use HTTPS, you may want to configure SSL/TLS certificates on the Load Balancer.

Here's a step-by-step guide to creating a secure, load-balanced web cluster with a private network.

1. Deploy Web Servers

Deploy three web servers in the same location, with private networking enabled. Configure the web servers to listen to HTTP on their private network interfaces.

2. Deploy a Load Balancer

  1. Navigate to the Load Balancers section of the Vultr Customer Portal.
  2. Click the blue plus icon to deploy a load balancer.
  3. Choose the same location as your web servers.
  4. In Load Balancer Configuration, enter a label and leave the other options at default.

    Screenshot of Load Balancer Configuration section

  5. Leave the default Forwarding Rule for HTTP at port 80.

  6. Select your private network.

    Screenshot of Private Network section

    The load balancer will automatically use address in the range shown. You can select the network address range when you create your private network.

  7. In the Firewall Rules section, enter Port 80, and set the Source to cloudflare.

    Firewall Rules

  8. Choose HTTP and Port 80 for Health Checks.

    Health Checks

  9. Click Add Load Balancer.

Wait for the Load Balancer to deploy.

Click your Load Balancer to edit its configuration.

  1. Click Add Instance.
  2. Choose an instance from the drop-down.
  3. Click Attach Instance.

    Add Instance

  4. Repeat steps 1 – 3 for each web server instance.

  5. Click the Configuration tab.
  6. Click Networking to review your configuration. Note that the Load Balancer consumes three IP addresses from the private network range for itself.

    Screenshot of Networking

4. Deploy a Vultr Firewall

  1. Navigate to the Add Firewall Group page.
  2. Give the firewall group a descriptive name and click Add Firewall Group.
  3. Add an inbound IPv4 Rule that accepts SSH from anywhere.

    SSH Rule

  4. Click Linked Instances on the left menu.

  5. Link each of the three instances to the firewall group.

    Linked Instances

5. Final Steps

The Vultr configuration is complete, and you can SSH to your web servers, but you'll still need to configure DNS and add the Load Balancer's IP address at Cloudflare. See the Cloudflare getting started guide to complete those steps.

After completing the Cloudflare setup, your webservers are secure and load-balanced. The Cloudflare CDN accelerates the delivery of your static assets, and the Vultr load balancer provides high availability.

More Information

Want to contribute?

You could earn up to $600 by adding new articles