envoyproxy / xds-relay

Caching, aggregation, and relaying for xDS compliant clients and origin servers
Apache License 2.0
131 stars 29 forks source link

Add grpc server start/stop cycle based on ready endpoint #188

Closed jyotimahapatra closed 3 years ago

jyotimahapatra commented 3 years ago

This PR ties up the ready endpoint with grpc server start/stop cycle. When ready endpoint is made to fail, the grpc server gracefully shuts down, so that the existing connections are drained.

Similarly, when ready endpoint is made healthy back, the grpc server starts up again and starts responding to requests.

Throughout the start/stop cycle the cache endpoints are available for debugging.

Interrupt signals cause all endpoints to be drained and the server exits.