Graceful Shutdown
    • PDF

    Graceful Shutdown

    • PDF

    Article summary

    Glasswall Halo implements graceful shutdown which allows all services to complete pending requests and reject new requests during the shutdown process.

    The addition of a graceful shutdown ensures that any in flight or outstanding requests are processed.

    Synchronous API and Asynchronous API

    The API's leverage the ASP.NET Core graceful shutdown logic, more information can be found here. The default value is set to 60 seconds, which is the amount of time after the server begins shutting down before connections are forcefully closed.

    Kestrel will wait for the duration of the timeout for any ongoing request processing to complete before terminating the connection. No new connections or requests will be accepted during this time.
    It is possible that some tasks may continue to run after the shutdown timeout has elapsed - this is outlined in the Microsoft Documentation.

    However, tasks aren't abandoned after cancellation is requested — the caller awaits all tasks to complete.

    Report Aggregator and Engine

    The Report Aggregator and Engine service are both hosted services which enable custom actions in the lifecycle of the service, for more information please refer to Microsoft Documentation.

    Both services will ensure that all requests are completed within the default time of 5 seconds once the shutdown process has begun. Once the default time has been exceeded, the service will always be terminated.


    Was this article helpful?