Mercurial > prosody-modules
annotate mod_graceful_shutdown/README.markdown @ 5951:d6a695abb33c
mod_ping_muc: Delay ping a configurable amount of time
If a server is restarting, checking immediately before it has a chance
to complete its restart and get ready would often fail, preventing the
possibility of transparent restarts as supported by Prosody's mod_muc.
Reconnecting immediately when a connection is closed for being idle, or
because the remote server is trying to reclaim some resources, is also
counter-productive as the connection may fail.
Also, if there is some Internet routing problem affecting s2s, it may
help to wait a bit before checking, in case the problem resolved itself
in the mean time.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 11 Aug 2024 16:10:24 +0200 |
parents | 999e7cb7f6d9 |
children |
rev | line source |
---|---|
4898
999e7cb7f6d9
mod_graceful_shutdown: Add a banner saying no longer needed with trunk
Kim Alvefur <zash@zash.se>
parents:
2818
diff
changeset
|
1 ::: {.alert .alert-warning} |
2170
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
2 This module is an experiment about a more graceful shutdown process. |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
3 |
4898
999e7cb7f6d9
mod_graceful_shutdown: Add a banner saying no longer needed with trunk
Kim Alvefur <zash@zash.se>
parents:
2818
diff
changeset
|
4 Graceful shutdown has now been implemented in Prosody trunk and will be |
999e7cb7f6d9
mod_graceful_shutdown: Add a banner saying no longer needed with trunk
Kim Alvefur <zash@zash.se>
parents:
2818
diff
changeset
|
5 part 0.12. See [issue #1225](https://issues.prosody.im/1225) for |
999e7cb7f6d9
mod_graceful_shutdown: Add a banner saying no longer needed with trunk
Kim Alvefur <zash@zash.se>
parents:
2818
diff
changeset
|
6 details. |
999e7cb7f6d9
mod_graceful_shutdown: Add a banner saying no longer needed with trunk
Kim Alvefur <zash@zash.se>
parents:
2818
diff
changeset
|
7 ::: |
999e7cb7f6d9
mod_graceful_shutdown: Add a banner saying no longer needed with trunk
Kim Alvefur <zash@zash.se>
parents:
2818
diff
changeset
|
8 |
2170
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
9 Why |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
10 === |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
11 |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
12 When shutting down, a number of sessions, connections and other things |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
13 are teared down. Due to all these things happening very quickly, |
2818 | 14 sometimes e.g. client unavailable notifications don't make it to all |
2170
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
15 remote contacts because the server-to-server connections are teared down |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
16 just after. |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
17 |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
18 How |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
19 === |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
20 |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
21 This module works by breaking the shutdown process into separate steps |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
22 with a brief pause between them. |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
23 |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
24 It goes something like this |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
25 |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
26 1. Stop accepting new client connections. |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
27 2. Close all client connections. |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
28 3. Fire event for everything else. |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
29 4. Tell `net.server` to quit the main loop. |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
30 5. ??? |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
31 6. Still here? Kill itself. |
4652a112a4ba
mod_graceful_shutdown: Experiment in improving the shutdown experience
Kim Alvefur <zash@zash.se>
parents:
diff
changeset
|
32 |