1886
|
1 ---
|
|
2 summary: Multi-backend storage module (WIP)
|
|
3 labels:
|
|
4 - NeedDocs
|
|
5 ...
|
|
6
|
|
7 Introduction
|
|
8 ============
|
|
9
|
|
10 This module attemtps to provide a storage driver that is really multiple
|
|
11 storage drivers. This could be used for storage error tolerance or
|
|
12 caching of data in a faster storage driver.
|
|
13
|
|
14 Configuration
|
|
15 =============
|
|
16
|
|
17 An example:
|
|
18
|
|
19 ``` {.lua}
|
|
20 storage = "multi"
|
|
21 storage_multi_policy = "all"
|
|
22 storage_multi = {
|
|
23 "memory",
|
|
24 "internal",
|
|
25 "sql"
|
|
26 }
|
|
27 ```
|
|
28
|
|
29 Here data would be first read from or written to [mod\_storage\_memory],
|
|
30 then internal storage, then SQL storage. For reads, the first successful
|
|
31 read will be used. For writes, it depends on the `storage_multi_policy`
|
|
32 option. If set to `"all"`, then all storage backends must report success
|
|
33 for the write to be considered successful. Other options are `"one"` and
|
|
34 `"majority"`.
|