containerd / ttrpc-rust

Rust implementation of ttrpc (GRPC for low-memory environments)
Apache License 2.0
195 stars 45 forks source link

Graceful shutdown and server restart for async [hot upgrade needed] #63

Closed Tim-Zhang closed 3 years ago

Tim-Zhang commented 4 years ago
async: graceful shutdown and server restart supported

- Support graceful shutdown.
- Support stop_listen() -> start() to restart.
- Examples updates
- Implement AsRawFd and FromRawFd

The hot upgrade needs the restart feature.
First call stop_listen() to stop new connections coming then call
disconnect() to wait all exist request done. if there are failures
during stop_listen() and disconnect(), only need to call start()
to make rollback.

Signed-off-by: Tim Zhang <tim@hyper.sh>