From 5bfa8266d49bb9b2c09e0f281f40186d45380c28 Mon Sep 17 00:00:00 2001 From: Francis Lavoie Date: Tue, 24 Nov 2020 16:27:23 -0500 Subject: [PATCH] docs: Add cookie hash policy for proxy (#110) * docs: Add cookie hash policy for proxy * Update src/docs/markdown/caddyfile/directives/reverse_proxy.md Co-authored-by: Matt Holt Co-authored-by: Matt Holt --- src/docs/markdown/caddyfile/directives/reverse_proxy.md | 1 + 1 file changed, 1 insertion(+) diff --git a/src/docs/markdown/caddyfile/directives/reverse_proxy.md b/src/docs/markdown/caddyfile/directives/reverse_proxy.md index 915ffbf..67c7d2c 100644 --- a/src/docs/markdown/caddyfile/directives/reverse_proxy.md +++ b/src/docs/markdown/caddyfile/directives/reverse_proxy.md @@ -82,6 +82,7 @@ Load balancing is used whenever more than one upstream is defined. - `random_choose ` - selects two or more upstreams randomly, then chooses one with least load (`n` is usually 2) - `round_robin` - iterate each upstream in turn - `uri_hash` - map URI to sticky upstream + - `cookie [ []]` - based on the given cookie (default name is `lb` if not specified), which value is hashed; optionally with a secret for HMAC-SHA256 - **lb_try_duration** is a [duration value](/docs/conventions#durations) that defines how long to try selecting available backends for each request if the next available host is down. By default, this retry is disabled. Clients will wait for up to this long while the load balancer tries to find an available upstream host. - **lb_try_interval** is a [duration value](/docs/conventions#durations) that defines how long to wait between selecting the next host from the pool. Default is `250ms`. Only relevant when a request to an upstream host fails. Be aware that setting this to 0 with a non-zero `lb_try_duration` can cause the CPU to spin if all backends are down and latency is very low.