Skip to content

Use GracefulHandler rather than StatisticsHandler to coordinate graceful shutdown of Jetty #50268

@dsyer

Description

@dsyer

Boot 3.4 switched the default server shutdown to graceful, which adds the overhead of Jetty's StatisticsHandler. At the time, there was no other mechanism in Jetty available for graceful shutdowns. Since Jetty 12 there is a GracefulHandler and also Server implements Graceful. Boot could look at using those instead of StatisticsHandler. There might even be a GracefulHandler implementation that has less overhead than the one Jetty maintains, but we'd need to measure and decide if we want to maintain such a handler or use the one Jetty provides. Benchmarks show this as possibly a large effect because it does processing on every request, even if we only wanted it for shutdown.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions