comparison mod_storage_multi/README.markdown @ 1886:e502c05c0608

mod_storage_multi: Add README
author Kim Alvefur <zash@zash.se>
date Thu, 01 Oct 2015 17:27:23 +0200
parents
children a7fdab9c14e2
comparison
equal deleted inserted replaced
1885:b42eb10dc7d2 1886:e502c05c0608
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"`.