curl --location --request GET 'https://api.cloudflare.com/client/v4/zones//load_balancers'
steering_policy
to learn how steering is affected."off"
: Use default_pools
."geo"
: Use region_pools
/country_pools
/pop_pools
. For non-proxied requests, the country for country_pools
is determined by location_strategy
."random"
: Select a pool randomly."dynamic_latency"
: Use round trip time to select the closest pool in default_pools (requires pool health checks)."proximity"
: Use the pools' latitude and longitude to select the closest pool using the Cloudflare PoP location for proxied requests or the location determined by location_strategy
for non-proxied requests.""
: Will map to "geo"
if you use region_pools
/country_pools
/pop_pools
otherwise "off"
.{
"errors": [],
"messages": [],
"result": [
{
"adaptive_routing": {
"failover_across_pools": true
},
"country_pools": {
"GB": [
"abd90f38ced07c2e2f4df50b1f61d4194"
],
"US": [
"de90f38ced07c2e2f4df50b1f61d4194",
"00920f38ce07c2e2f4df50b1f61d4194"
]
},
"created_on": "2014-01-01T05:20:00.12345Z",
"default_pools": [
"17b5962d775c646f3f9725cbc7a53df4",
"9290f38c5d07c2e2f4df57b1f61d4196",
"00920f38ce07c2e2f4df50b1f61d4194"
],
"description": "Load Balancer for www.example.com",
"enabled": true,
"fallback_pool": null,
"id": "699d98642c564d2e855e9661899b7252",
"location_strategy": {
"mode": "resolver_ip",
"prefer_ecs": "always"
},
"modified_on": "2014-01-01T05:20:00.12345Z",
"name": "www.example.com",
"pop_pools": {
"LAX": [
"de90f38ced07c2e2f4df50b1f61d4194",
"9290f38c5d07c2e2f4df57b1f61d4196"
],
"LHR": [
"abd90f38ced07c2e2f4df50b1f61d4194",
"f9138c5d07c2e2f4df57b1f61d4196"
],
"SJC": [
"00920f38ce07c2e2f4df50b1f61d4194"
]
},
"proxied": true,
"random_steering": {
"default_weight": 0.2,
"pool_weights": {
"9290f38c5d07c2e2f4df57b1f61d4196": 0.5,
"de90f38ced07c2e2f4df50b1f61d4194": 0.3
}
},
"region_pools": {
"ENAM": [
"00920f38ce07c2e2f4df50b1f61d4194"
],
"WNAM": [
"de90f38ced07c2e2f4df50b1f61d4194",
"9290f38c5d07c2e2f4df57b1f61d4196"
]
},
"rules": [
{
"condition": "http.request.uri.path contains \"/testing\"",
"disabled": false,
"fixed_response": {
"content_type": "application/json",
"location": "www.example.com",
"message_body": "Testing Hello",
"status_code": 0
},
"name": "route the path /testing to testing datacenter.",
"overrides": {
"adaptive_routing": {
"failover_across_pools": true
},
"country_pools": {
"GB": [
"abd90f38ced07c2e2f4df50b1f61d4194"
],
"US": [
"de90f38ced07c2e2f4df50b1f61d4194",
"00920f38ce07c2e2f4df50b1f61d4194"
]
},
"default_pools": [
"17b5962d775c646f3f9725cbc7a53df4",
"9290f38c5d07c2e2f4df57b1f61d4196",
"00920f38ce07c2e2f4df50b1f61d4194"
],
"fallback_pool": null,
"location_strategy": {
"mode": "resolver_ip",
"prefer_ecs": "always"
},
"pop_pools": {
"LAX": [
"de90f38ced07c2e2f4df50b1f61d4194",
"9290f38c5d07c2e2f4df57b1f61d4196"
],
"LHR": [
"abd90f38ced07c2e2f4df50b1f61d4194",
"f9138c5d07c2e2f4df57b1f61d4196"
],
"SJC": [
"00920f38ce07c2e2f4df50b1f61d4194"
]
},
"random_steering": {
"default_weight": 0.2,
"pool_weights": {
"9290f38c5d07c2e2f4df57b1f61d4196": 0.5,
"de90f38ced07c2e2f4df50b1f61d4194": 0.3
}
},
"region_pools": {
"ENAM": [
"00920f38ce07c2e2f4df50b1f61d4194"
],
"WNAM": [
"de90f38ced07c2e2f4df50b1f61d4194",
"9290f38c5d07c2e2f4df57b1f61d4196"
]
},
"session_affinity": "cookie",
"session_affinity_attributes": {
"drain_duration": 100,
"samesite": "Auto",
"secure": "Auto",
"zero_downtime_failover": "sticky"
},
"session_affinity_ttl": 5000,
"steering_policy": "dynamic_latency",
"ttl": 30
},
"priority": 0,
"terminates": false
}
],
"session_affinity": "cookie",
"session_affinity_attributes": {
"drain_duration": 100,
"samesite": "Auto",
"secure": "Auto",
"zero_downtime_failover": "sticky"
},
"session_affinity_ttl": 5000,
"steering_policy": "dynamic_latency",
"ttl": 30
}
],
"success": true,
"result_info": {
"count": 1,
"page": 1,
"per_page": 20,
"total_count": 2000
}
}