How to Provision Vultr Load Balancer

Updated on 10 September, 2025

A guide explaining how to set up and configure a Vultr Load Balancer for distributing traffic across multiple servers.


Vultr Load Balancer efficiently distributes incoming traffic across multiple servers, ensuring balanced resource utilization and enhanced reliability. This service prevents individual servers from becoming overloaded by managing traffic evenly, which helps maintain application performance and uptime. By provisioning a Load Balancer, you can enhance the scalability and resilience of your applications, improving overall user experience.

Follow this guide to provision a Vultr Load Balancer on your Vultr account using the Vultr Customer Portal, API, CLI, or Terraform.

  • Vultr Customer Portal
  • Vultr API
  • Vultr CLI
  • Terraform
  1. Navigate to Products and click Load Balancers.

  2. Click Create Load Balancer.

  3. In Load Balancer Basics, set:

    • Label
    • Algorithm (default: Round Robin)
    • Timeout (seconds)
    • Number of Nodes (odd number)
  4. Configure additional settings:

    • Force HTTP to HTTPS redirects all HTTP traffic to HTTPS. To enable this option, create at least one HTTPS forwarding rule and add a valid SSL certificate.
    • Proxy Protocol forwards the client’s original IP address to backend nodes. If you enable this feature, configure your backend nodes to accept Proxy Protocol headers.
    • Sticky Sessions ensures that the Load Balancer routes a client’s requests to the same backend server.
  5. Under Health Checks, set Protocol, Port, Path, and Health Check Intervals.

  6. In Locations, select one or more deployment locations.

  7. In Load Balancer Configuration, expand sections as needed:

    • Non‑Public VPC Network (optional)
    • Forwarding Rules
    • Firewall Rules
    • SSL
    Note
    Create at least one HTTPS forwarding rule before enabling HTTP/2 or HTTP/3. Enable HTTP/3 only if an HTTP/2 rule exists.
  8. Click Create Load Balancer.

  1. Send a GET request to the List Regions endpoint and note your target region ID.

    console
    $ curl "https://api.vultr.com/v2/regions" \
      -X GET \
      -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  2. Send a POST request to the Create Load Balancer endpoint to provision a Load Balancer.

    console
    $ curl "https://api.vultr.com/v2/load-balancers" \
        -X POST \
        -H "Authorization: Bearer ${VULTR_API_KEY}" \
        -H "Content-Type: application/json" \
        --data '{
            "region" : "{region_id}",
            "balancing_algorithm" : "{roundrobin_or_leastconn}",
            "ssl_redirect" : false,
            "http2": false,
            "http3": false,
            "proxy_protocol" : false,
            "timeout" : {timeout_in_seconds},
            "label" : "{label}",
            "nodes" : {number_of_nodes},
            "health_check" : {
                "protocol" : "{http_or_https_or_tcp}",
                "port" : {port},
                "path" : "/health",
                "check_interval" : {interval_in_seconds},
                "response_timeout" : {timeout_in_seconds},
                "unhealthy_threshold" : {unhealthy_threshold},
                "healthy_threshold" : {healthy_threshold}
            },
            "forwarding_rules": [
            {
                "frontend_protocol" : "{http_or_https_or_tcp}",
                "frontend_port" : {frontend_port_number},
                "backend_protocol" : "{http_or_https_or_tcp}",
                "backend_port" : {backend_port_number}
            }
            ],
            "firewall_rules": [
            {
                "port" : {allowed_port_number},
                "source" : "{source_ip_cidr}",
                "ip_type" : "{v4_or_v6}"
            }
            ],
            "auto_ssl": {
                "domain_zone" : "{your_domain}",
                "domain_sub" : "{subdomain}"
            }
        }'
    

    Visit the Create Load Balancer page to view additional attributes you can include in your request.

  3. Send a GET request to the List Load Balancers endpoint to list all the available Load Balancers.

    console
    $ curl "https://api.vultr.com/v2/load-balancers" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  1. List all Vultr regions and note the target region ID.

    console
    $ vultr-cli regions list
    
  2. Create a Load Balancer.

    console
    $ vultr-cli load-balancer create \
        --region "<region_id>" \
        --balancing-algorithm "<roundrobin_or_leastconn>" \
        --ssl-redirect false \
        --proxy-protocol false \
        --response-timeout <timeout_in_seconds> \
        --label "<label>" \
        --nodes <number_of_nodes> \
        --protocol "<http_or_https_or_tcp>" \
        --port <port> \
        --path "/health" \
        --check-interval <interval_in_seconds> \
        --healthy-threshold <healthy_threshold> \
        --unhealthy-threshold <unhealthy_threshold> \
        --forwarding-rules "frontend_protocol:<http_or_https_or_tcp>,frontend_port:<frontend_port_number>,backend_protocol:<http_or_https_or_tcp>,backend_port:<backend_port_number>" \
        --firewall-rules "port:<allowed_port_number>,ip_type:<v4_or_v6>,source:<source_ip_cidr>"
    

    Run vultr-cli load-balancer create --help to view additional options you can apply when creating a Load Balancer.

  3. List all the available Load Balancers.

    console
    $ vultr-cli load-balancer list
    
  1. Ensure the Vultr Terraform provider is configured in your Terraform project.

  2. Define the Load Balancer resource in your Terraform configuration file.

    terraform
    resource "vultr_load_balancer" "lb" {
        region              = "ewr"
        label               = "vultr-load-balancer"
        balancing_algorithm = "roundrobin"
    
        forwarding_rules {
            frontend_protocol = "http"
            frontend_port     = 82
            backend_protocol  = "http"
            backend_port      = 81
        }
    
        health_check {
            path                = "/test"
            port                = 8080
            protocol            = "http"
            response_timeout    = 1
            unhealthy_threshold = 2 
            check_interval      = 3
            healthy_threshold   = 4
        }
    }
    
  3. Apply the configuration and observe the following output:

    Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

Comments

No comments yet.