Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] Improve coordinated shutdown doc hygiene #5677

Merged
merged 2 commits into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 1 addition & 73 deletions docs/articles/actors/coordinated-shutdown.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,79 +8,7 @@ There's an `ActorSystem` extension called `CoordinatedShutdown` that will stop c

The default phases and their orderings are defined in the default HOCON configuration as `akka.coordinated-shutdown.phases`, and they are defined below:

```hocon
phases {

# The first pre-defined phase that applications can add tasks to.
# Note that more phases can be be added in the application's
# configuration by overriding this phase with an additional
# depends-on.
before-service-unbind {
}

# Stop accepting new incoming requests in for example HTTP.
service-unbind {
depends-on = [before-service-unbind]
}

# Wait for requests that are in progress to be completed.
service-requests-done {
depends-on = [service-unbind]
}

# Final shutdown of service endpoints.
service-stop {
depends-on = [service-requests-done]
}

# Phase for custom application tasks that are to be run
# after service shutdown and before cluster shutdown.
before-cluster-shutdown {
depends-on = [service-stop]
}

# Graceful shutdown of the Cluster Sharding regions.
cluster-sharding-shutdown-region {
timeout = 10 s
depends-on = [before-cluster-shutdown]
}

# Emit the leave command for the node that is shutting down.
cluster-leave {
depends-on = [cluster-sharding-shutdown-region]
}

# Shutdown cluster singletons
cluster-exiting {
timeout = 10 s
depends-on = [cluster-leave]
}

# Wait until exiting has been completed
cluster-exiting-done {
depends-on = [cluster-exiting]
}

# Shutdown the cluster extension
cluster-shutdown {
depends-on = [cluster-exiting-done]
}

# Phase for custom application tasks that are to be run
# after cluster shutdown and before ActorSystem termination.
before-actor-system-terminate {
depends-on = [cluster-shutdown]
}

# Last phase. See terminate-actor-system and exit-jvm above.
# Don't add phases that depends on this phase because the
# dispatcher and scheduler of the ActorSystem have been shutdown.
actor-system-terminate {
timeout = 10 s
depends-on = [before-actor-system-terminate]
}
}
```
[!code-hocon[Pigeon.conf](../../../src/core/Akka/Configuration/Pigeon.conf#L1019-L1091)]
Aaronontheweb marked this conversation as resolved.
Show resolved Hide resolved

## Custom Phases

Expand Down
3 changes: 2 additions & 1 deletion src/core/Akka/Configuration/Pigeon.conf
Original file line number Diff line number Diff line change
Expand Up @@ -1016,6 +1016,7 @@ akka {
# - recover=off: If the phase fails the shutdown is aborted
# and depending phases will not be executed.
# depends-on=[]: Run the phase after the given phases

phases {

# The first pre-defined phase that applications can add tasks to.
Expand Down Expand Up @@ -1087,6 +1088,6 @@ akka {
depends-on = [before-actor-system-terminate]
}
}
#//#coordinated-shutdown-phases

}
}