Software /
code /
prosody-modules
Comparison
mod_graceful_shutdown/README.md @ 6209:d611ed13df7e draft
Merge
author | Trần H. Trung <xmpp:trần.h.trung@trung.fun> |
---|---|
date | Tue, 18 Mar 2025 00:16:25 +0700 |
parent | 4898:mod_graceful_shutdown/README.markdown@999e7cb7f6d9 |
comparison
equal
deleted
inserted
replaced
6208:e20901443eae | 6209:d611ed13df7e |
---|---|
1 ::: {.alert .alert-warning} | |
2 This module is an experiment about a more graceful shutdown process. | |
3 | |
4 Graceful shutdown has now been implemented in Prosody trunk and will be | |
5 part 0.12. See [issue #1225](https://issues.prosody.im/1225) for | |
6 details. | |
7 ::: | |
8 | |
9 Why | |
10 === | |
11 | |
12 When shutting down, a number of sessions, connections and other things | |
13 are teared down. Due to all these things happening very quickly, | |
14 sometimes e.g. client unavailable notifications don't make it to all | |
15 remote contacts because the server-to-server connections are teared down | |
16 just after. | |
17 | |
18 How | |
19 === | |
20 | |
21 This module works by breaking the shutdown process into separate steps | |
22 with a brief pause between them. | |
23 | |
24 It goes something like this | |
25 | |
26 1. Stop accepting new client connections. | |
27 2. Close all client connections. | |
28 3. Fire event for everything else. | |
29 4. Tell `net.server` to quit the main loop. | |
30 5. ??? | |
31 6. Still here? Kill itself. | |
32 |