annotate mod_storage_multi/README.markdown @ 4203:c4002aae4ad3

mod_s2s_keepalive: Use timestamp as iq @id RFC 6120 implies that the id attribute must be unique within a stream. This should fix problems with remote servers that enforce uniqueness and don't answer duplicated ids. If it doesn't do that, then at least you can get a guesstimate at round-trip time from the difference between the result iq stanza and the timestamp it was logged without having to go look for when it was sent, or needing to keep state.
author Kim Alvefur <zash@zash.se>
date Wed, 14 Oct 2020 18:02:10 +0200
parents a7fdab9c14e2
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1886
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
1 ---
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
2 summary: Multi-backend storage module (WIP)
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
3 labels:
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
4 - NeedDocs
1887
a7fdab9c14e2 mod_storage_multi: Put in Alpha stage
Kim Alvefur <zash@zash.se>
parents: 1886
diff changeset
5 - Stage-Alpha
1886
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
6 ...
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
7
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
8 Introduction
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
9 ============
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
10
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
11 This module attemtps to provide a storage driver that is really multiple
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
12 storage drivers. This could be used for storage error tolerance or
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
13 caching of data in a faster storage driver.
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
14
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
15 Configuration
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
16 =============
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
17
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
18 An example:
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
19
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
20 ``` {.lua}
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
21 storage = "multi"
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
22 storage_multi_policy = "all"
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
23 storage_multi = {
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
24 "memory",
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
25 "internal",
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
26 "sql"
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
27 }
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
28 ```
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
29
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
30 Here data would be first read from or written to [mod\_storage\_memory],
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
31 then internal storage, then SQL storage. For reads, the first successful
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
32 read will be used. For writes, it depends on the `storage_multi_policy`
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
33 option. If set to `"all"`, then all storage backends must report success
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
34 for the write to be considered successful. Other options are `"one"` and
e502c05c0608 mod_storage_multi: Add README
Kim Alvefur <zash@zash.se>
parents:
diff changeset
35 `"majority"`.