Name Date Size

..11-Feb-20204 KiB

.gitignoreH A D11-Feb-2020623

config/H11-Feb-20204 KiB

configure.acH A D11-Feb-20202.5 KiB

docs/H11-Feb-20204 KiB

DoxyfileH A D11-Feb-202063.9 KiB

include/libvbucket/H11-Feb-20204 KiB

libvbucket.pc.inH A D11-Feb-2020258

LICENSEH A D11-Feb-202011.1 KiB

m4/H11-Feb-20204 KiB

Makefile.amH A D11-Feb-20203.4 KiB

README.markdownH A D11-Feb-20201.6 KiB

src/H11-Feb-20204 KiB

tests/H11-Feb-20204 KiB

README.markdown

1libvbucket: a vbucket library for memcached
2===========================================
3
4Config syntax
5-------------
6
7The configuration string is JSON.
8
9Example:
10
11    {
12      "hashAlgorithm": "CRC",
13      "numReplicas": 2,
14      "serverList": ["server1:11211", "server2:11210", "server3:11211"],
15      "vBucketMap":
16        [
17          [0, 1, 2],
18          [1, 2, 0],
19          [2, 1, -1],
20          [1, 2, 0]
21        ]
22    }
23
24### hashAlgorithm
25
26The hash algorithm can be in upper or lower case. Libvbucket currently
27supports the following hash algorithms (via libhashkit):
28
29* default - this is libhashkit's default of one_at_a_time
30* md5
31* crc - this is CRC32, a good general purpose hash for short strings
32* fnv1_64
33* fnv1a_64
34* fnv1_32
35* fnv1a_32
36* hsieh
37* murmur
38* jenkins
39
40### numReplicas
41
42numReplicas is the number of extra copies that will be stored on
43servers. Each vBucket in vBucketMap must have this number of server
44indexes plus one (the master server).
45
46### serverList
47
48This has one string per server, in whatever format your app expects a
49server config string in. This may change to be more structured later.
50
51### vBucketMap
52
53This contains one entry per vBucket, and the number of entries must be
54a power of two. Each entry must be an array of numReplicas+1
55zero-based indices into serverList, with the first entry indicating
56the master server for the bucket and the remaining entries specifying
57the replicas, in order. -1 indicates that no server is mapped for that
58particular master/replica of that particular vBucket.
59
60In the future this will probably be extended to support "intermediate
61states" of vBuckets which are being migrated.
62
63