nginx / unit-docs

NGINX Unit's official website and documentation
https://unit.nginx.org
Creative Commons Attribution 4.0 International
51 stars 101 forks source link

Graceful upstream updates (connection draining) #32

Closed maxmalysh closed 1 year ago

maxmalysh commented 3 years ago

It's not clear how Unit handles upstream updates. What happens with already established connections when a corresponding upstream server is removed from the config? I guess these connections will be closed. If so, is it possible to enable graceful connection draining instead? How?

It would be nice to have an example showing how to implement graceful upstream updates for long-living connections.

Main use case: zero-downtime deployments & rolling updates for websocket servers.

VBart commented 3 years ago

All connections are stay alive until corresponding requests processing will be finished. So, basically it's graceful.

Note that currently there's no support for proxying WebSocket protocol in Unit. This feature is in the roadmap.

ghost commented 1 year ago

Closing, please continue here for the WS proxying support: https://github.com/nginx/unit/issues/361