I use nginx as an ingress controller in Kubernetes.
I have a websocket connection between 2 applications which you should stay open indefinitely. There is a reconnect mechanism but that should be avoided as much as possible.
Currently, the nginx config looks something like this (omitted non-relevant parts):
location / {
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_send_timeout 3600s;
proxy_read_timeout 3600s;
}
Are there any arguments against picking a very high value for the timeouts, let's say 1 year?