You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/features/proxy/configure.md
+8-4Lines changed: 8 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -408,7 +408,7 @@ Doing this involves the following steps:
408
408
409
409
1. Declare a _local zone_ in your proxy configuration file.
410
410
1. Attach zone labels to the pools within your set definitions.
411
-
1. In your route definitions, invoke a route handler that makes use of zone information. Handlers supporting this typically start with a 'z', like `route_zfailover`
411
+
1. In your route definitions, invoke a route handler that makes use of zone information. Handlers supporting this are noted in their documentation (like `route_failover`)
412
412
413
413
To declare the local zone and attach zone labels to your defined pools, modify your configuration file's `pools{}` block like this:
414
414
@@ -434,6 +434,10 @@ The following example excerpt from a proxy configuration file that declares a lo
434
434
435
435
```lua
436
436
local_zone("west")
437
+
-- This configures the zone from an environment variable:
438
+
-- local_zone_from_env("ZONE")
439
+
-- This configures the zone by reading a line from a file on disk:
440
+
-- local_zone_from_file("./zonefile.txt")
437
441
438
442
pools {
439
443
set_main_pools= {
@@ -474,16 +478,16 @@ pools {
474
478
}
475
479
```
476
480
477
-
The following proxy configuration excerpt extends the previous example with a `routes{}` block that uses [`route_zfailover`]({{<proxy_base_path>}}reference#route_zfailover).
481
+
The following proxy configuration excerpt extends the previous example with a `routes{}` block that uses [`route_failover`]({{<proxy_base_path>}}reference#route_failover).
* <var>POOL_LIST_OR_SET_NAME</var>: either one of the following:
114
121
* A bracketed, comma-separated list of of pool names defined in the `pools{}` block of your configuration file—for example, `{ "cust_pool_1", "cust_pool_2" }`.
115
122
* The name of a set defined in the `pools{}` block of your configuration file—for example, `"set_cust_pools"`.
123
+
* See [Prioritize a route using local zones]({{<proxy_base_path>}}configure#zones) - if a zoned pool set is supplied and `local_zone` is configured, the local zone is tried first.
124
+
* <var>LOCAL_ZONE</var>: Override the local zone.
116
125
* <var>FAILOVER_COUNT</var>: the number of times we will try another pool in the list before returning an error.
117
126
* <var>SHUFFLE_BOOLEAN</var>: if true, then the proxy randomizes the list of pools before routing the request. Otherwise, uses the list of pools in the given order.
118
127
* <var>MISS_BOOLEAN</var>: if true, then the proxy treats both misses and errors as failures. Otherwise, the proxy counts only errors as failures.
128
+
* <var>WAIT_FLOAT</var>: wait at most this amount of time in seconds before failing over to the next pool (fractional time allowed)
119
129
120
130
### `route_zfailover`
121
131
132
+
NOTE: This function has been deprecated. Its functionality is available in
133
+
`route_failover` and `route_allfatest`
134
+
122
135
Routes the request to a named set of pools. You can tune the behavior of this handler by passing in additional arguments.
123
136
124
137
To use this handler, you need to define zones in your configuration file. For more information, see [Prioritize a route using local zones]({{<proxy_base_path>}}configure#zones).
0 commit comments