How to Resize a Vultr Load Balancer
-
by Blog Admin
- 67
How to Resize a Vultr Load Balancer
Resizing a Vultr Load Balancer by increasing the number of nodes involves updating the Load Balancer’s configuration to incorporate additional servers. This adjustment distributes incoming traffic across a greater number of nodes, which enhances both performance and reliability by reducing the load on individual servers and improving overall capacity. By scaling up the number of nodes, you ensure that your application can handle higher traffic volumes and maintain optimal performance.
Follow this guide to resize a Vultr Load Balancer on your Vultr account using the Vultr Customer Portal, API, CLI, or Terraform.
- Vultr Customer Portal
- Navigate to Products and click Load Balancers.
- Click your target Load Balancer to open its management page.
- In Details, click the pencil icon.
- Adjust Number of Nodes (odd number).
- Click Save changes.
- Vultr API
- Send a
GETrequest 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}"
- Send a
PATCHrequest to the Update Load Balancers endpoint to increase the node size of the target Load Balancer by an odd number.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 '{ "nodes": {new-node-size} }'
-
Send a
GETrequest 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}"
- Vultr CLI
- List all available instances and note the target Load Balancer’s ID.
console
$ vultr-cli load-balancer list - Update the target Load Balancer’s node size.
console
$ vultr-cli load-balancer update <load-balancer-id> --nodes <new-node-size> -
Get the details of the target Load Balancer.
console$ vultr-cli load-balancer get <load-balancer-id>- Terraform
- Open your Terraform configuration file for the existing Load Balancer.
- Update the number of
nodesin the configuration.terraformresource "vultr_load_balancer" "lb" { # ...existing fields (region, forwarding_rules, health_check, etc.) nodes = 3 }
- Apply the configuration and observe the following output:
Apply complete! Resources: 0 added, 1 changed, 0 destroyed.
How to Resize a Vultr Load Balancer Resizing a Vultr Load Balancer by increasing the number of nodes involves updating the Load Balancer’s configuration to incorporate additional servers. This adjustment distributes incoming traffic across a greater number of nodes, which enhances both performance and reliability by reducing the load on…
How to Resize a Vultr Load Balancer Resizing a Vultr Load Balancer by increasing the number of nodes involves updating the Load Balancer’s configuration to incorporate additional servers. This adjustment distributes incoming traffic across a greater number of nodes, which enhances both performance and reliability by reducing the load on…