Feature Request - Graceful Shutdown
I would like to be able to gracefully shutdown a deepstream server (for e.g. upgrade, down-scaling etc..).
This means that close should not return until it can do so without affecting clients.
This would mean e.g.
- De-register instance from load-balancer e.g. (HAProxy, NGinx)
- Tell client to stop sending new commands and switch over to another server (TCP) or just reconnect of a load balancer is setup (WS).
- Wait for any RPC calls to respond
- Handle all queued messages etc...
This would require handling both on the client and server side.
I think this depends on us implementing a close event on the protocol both ways which can inform clients to reconnect (will force it to reroute to another deepsteam).
The rpc part is harder, since you don't want to deny service but you also don't want to have clients generate more rpcs since it could stop the shutdown.
Generally speaking, interesting concept and will be discussed on the roadmap and see how it prioritises.
I agree this is a good improvement to provide a graceful stop, we will prioritize accordingly.
@yasserf: Do you have any preliminary estimate for when this feature might arrive?
This is the next feature we want to add into deepstream post presence, so will be sometime by end of year.