Skip to content

Server process end lifecycle and object lifetime management #2802

@mrice32

Description

@mrice32

Description: We've run into a few situations internally where we would like to be able to create objects that will be destroyed at server shutdown or simply be notified of server shutdown. It's been difficult to do this in the context of a statically registered factories because the statically registered component is never destructed or notified of shutdown, and the elements it produces generally share their lifetime with the config that they are associated with rather than the process itself. Our use cases revolve around the graceful shutdown of shared, long-lived clients that dispatch RPCs asynchronously. I think this is a broad problem that may motivate an Envoy-wide solution rather than something that we put together in a proprietary context. If there is an existing solution to this problem in Envoy, feel free to chime in.

cc @htuch @mattklein123 @jmarantz @rohitbhoj

Metadata

Metadata

Assignees

Labels

enhancementFeature requests. Not bugs or questions.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions