Skip to content

Commit 218b793

Browse files
nathanljosevalim
andauthored
Update lib/phoenix/tracker.ex
Co-authored-by: José Valim <[email protected]>
1 parent a44e701 commit 218b793

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

lib/phoenix/tracker.ex

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,14 @@ defmodule Phoenix.Tracker do
7272
7373
## Application Shutdown
7474
75-
A tracker does not automatically replicate its state across the cluster as it
76-
shuts down. This means that your supervision tree shuts down normally - as it
77-
does when you call `System.stop()` or the BEAM receives a `SIGTERM` - any
78-
presences that the local tracker instance has will continue to be seen as
79-
present by other trackers in the cluster until the `:down_period` for the
80-
instance has passed.
75+
When a tracker shuts down, the other nodes do not assume it has been gone
76+
for good. After all, in a distributed system, it is impossible to know if something
77+
is just temporarily unavailable or if it has crashed.
78+
79+
For this reason, when you call `System.stop()` or the Erlang VM receives a
80+
`SIGTERM` - any presences that the local tracker instance has will continue to
81+
be seen as present by other trackers in the cluster until the `:down_period`
82+
for the instance has passed.
8183
8284
If you want a normal shutdown to immediately cause other nodes to see that
8385
tracker's presences as leaving, pass `permdown_on_shutdown: true`. On the

0 commit comments

Comments
 (0)