Global Load Balancer Regions enable the distribution of traffic depending on your user locations by creating child Load Balancer instances linked to a parent Load Balancer. You can create one child Load Balancer in each Vultr region and link multiple instances to distribute traffic. User requests to the parent Load Balancer are routed to the nearest child Load Balancer in a region depending on the user's location.
Follow this guide to manage Vultr Global Load Balancer regions using the Vultr Customer Portal, API or CLI.
Send a GET
request to the List Regions endpoint and note your target region ID.
$ curl "https://api.vultr.com/v2/regions" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a GET
request to the List Load Balancers endpoint and note your target Load Balancer's ID.
$ curl "https://api.vultr.com/v2/load-balancers" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Send a PATCH
request to the Update Load Balancer endpoint to create a child Load Balancer in the target region.
$ 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 '{
"global_regions": [
"{region_1_id}",
"{region_2_id}"
]
}'
List all the region IDs, note down the required region IDs.
$ vultr-cli regions list
List all available instances and note the target Load Balancer's ID.
$ vultr-cli load-balancer list
Update the instance by adding a region ID to provision a child Load Balancer in the target regions.
$ vultr-cli load-balancer update <load_balancer_id> --global-regions <region_1_id> <region_2_id>
No comments yet.