How to Manage Health Checks on a Vultr Load Balancer

Updated on 10 September, 2025

A monitoring feature that verifies your backend servers are operational by periodically testing their response to HTTP, HTTPS, or TCP requests.


Health Checks on a Vultr Load Balancer monitor the status of your backend servers by periodically sending requests to them. These checks assess whether a server is healthy and responsive, enabling the Load Balancer to route traffic only to servers that are functioning correctly. By configuring health checks, you ensure that traffic is directed away from servers experiencing issues, maintaining the reliability and performance of your application.

Follow this guide to manage the health checks on a Vultr Load Balancer 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 your target Load Balancer to open its management page.
  3. In Details, review current health status and click the pencil icon.
  4. Scroll down to the Health Checks section to manage it.
  5. Enter the target port in the Port field to monitor.
  6. Set the Interval in seconds to perform health checks on the target port.
  7. Set the Response timeout in seconds for how long the Load Balancer should wait between responses on the target port.
  8. Set the Unhealthy Threshold to define how many times an instance should fail before the Load Balancer stops forwarding traffic.
  9. Set the Healthy Threshold to define how many times an instance should pass before the Load Balancer starts forwarding traffic to it.
  10. Enter the URL path in the HTTP Path field to perform healthy checks.
  11. Click Save changes to apply the changes.
  1. Send a GET request to the List Load Balancers endpoint and note the target Load Balancer's ID.

    console
    $ curl "https://api.vultr.com/v2/load-balancers" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  2. Send a PATCH request to the Update Load Balancer endpoint to update the target Load Balancer's health checks configuration.

    console
    $ curl "https://api.vultr.com/v2/load-balancers/{load-balancer-id}" \
        -X PATCH \
        -H "Authorization: Bearer ${VULTR_API_KEY}" \
        -H "Content-Type: application/json" \
        --data '{
            "health_check" : {
                "protocol" : "{http_or_https_or_tcp}",
                "port" : {port},
                "path" : "{path}",
                "check_interval" : {interval_in_seconds},
                "response_timeout" : {timeout_in_seconds},
                "unhealthy_threshold" : {unhealthy_threshold},
                "healthy_threshold" : {healthy_threshold}
            }
        }'
    
  3. Send a GET request to the Get Load Balancer endpoint to fetch the details of the target Load Balancer.

    console
    $ curl "https://api.vultr.com/v2/load-balancers/{load-balancer-id}" \
        -X GET \
        -H "Authorization: Bearer ${VULTR_API_KEY}"
    
  1. List all available instances and note the target Load Balancer's ID.

    console
    $ vultr-cli load-balancer list
    
  2. Update the target Load Balancer's health checks configuration.

    console
    $ vultr-cli load-balancer update <load-balancer-id> \
        --protocol "<http_or_https_or_tcp>" \
        --port {port} \
        --path "{path}" \
        --check-interval <interval_in_seconds> \
        --response-timeout <timeout_in_seconds> \
        --healthy-threshold <healthy_threshold> \
        --unhealthy-threshold <unhealthy_threshold>
    
  3. Get the details of the target Load Balancer.

    console
    $ vultr-cli load-balancer get <load-balancer-id>
    
  1. Open your Terraform configuration for the existing Load Balancer.

  2. Add or update the health_check block to define probe protocol, port, path, and thresholds, then apply.

    terraform
    resource "vultr_load_balancer" "lb" {
        # ...existing fields (region, label, forwarding_rules, etc.)
    
        health_check {
            path                = "/health"
            port                = 8080
            protocol            = "http"
            response_timeout    = 3
            unhealthy_threshold = 2
            check_interval      = 10
            healthy_threshold   = 3
        }
    }
    
  3. Apply the configuration and observe the following output:

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

Comments

No comments yet.