dapr / docs

Dapr user documentation, used to build docs.dapr.io
https://docs.dapr.io
Creative Commons Attribution 4.0 International
987 stars 715 forks source link

Document Graceful Shutdown in the Health sections #4063

Closed msfussell closed 2 months ago

msfussell commented 4 months ago

Dapr now accepts a dapr.io/block-shutdown-duration annotation or --dapr-block-shutdown-duration CLI flag which delays the full shutdown procedure for this duration or until the app reports as unhealthy- whichever is sooner. During this period, all Subscriptions and input bindings will be closed. This is useful for applications that need to use the Dapr APIs as part of their own shutdown procedure. See additional info here.

This should also be added to https://docs.dapr.io/operations/resiliency/health-checks/sidecar-health/

Document the relationship between these settings. Most of the text can be take from here --dapr-graceful-shutdown-seconds | not supported |   | dapr.io/graceful-shutdown-seconds | Graceful shutdown duration in seconds for Dapr, the maximum duration before forced shutdown when waiting for all in-progress requests to complete. Defaults to 5. If you are running in Kubernetes mode, this value should not be larger than the Kubernetes termination grace period, who’s default value is 30.

--dapr-block-shutdown-duration | not supported |   | dapr.io/block-shutdown-duration | Block shutdown duration, if set, blocks the graceful shutdown procedure (as described above) from starting until the given duration has elapsed or the application becomes unhealthy as configured through application health options. This is useful for applications that need to execute Dapr APIs during their own termination procedure. Any new invocations of any Dapr APIs are not available to the application once the block has expired. Accepts Go duration string.

--dapr-graceful-shutdown-seconds not supported dapr.io/graceful-shutdown-seconds Graceful shutdown duration in seconds for Dapr, the maximum duration before forced shutdown when waiting for all in-progress requests to complete. Defaults to 5. If you are running in Kubernetes mode, this value should not be larger than the Kubernetes termination grace period, who’s default value is 30. --dapr-block-shutdown-duration not supported dapr.io/block-shutdown-duration Block shutdown duration, if set, blocks the graceful shutdown procedure (as described above) from starting until the given duration has elapsed or the application becomes unhealthy as configured through application health options. This is useful for applications that need to execute Dapr APIs during their own termination procedure. Any new invocations of any Dapr APIs are not available to the application once the block has expired. Accepts Go duration string.