chash: retry on another endpoint if the first one fails #10730
Labels
kind/feature
Categorizes issue or PR as related to a new feature.
needs-priority
needs-triage
Indicates an issue or PR lacks a `triage/foo` label and requires one.
When using the upstream-hash-by feature, if an endpoint fails, nginx will keep retrying on the same endpoint. This is a reasonable default configuration. However, if the application can tolerate it, better availability can be achieved by retrying on another endpoint (e.g. the next endpoint in the hash ring).
In particular this is useful during deploys, as nginx will try to send requests to a terminating pod for a couple seconds until the backends are synchronized. In our application, we are working around this by sleeping in a
preStop
hook for a few seconds, but the time for nginx to sync is not guaranteed, and it also slows down pod shutdown.This is similar to a feature that was implemented for the session affinity balancer:
session-cookie-change-on-failure
in #4048The text was updated successfully, but these errors were encountered: