forked from joewilliams/merle
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README
53 lines (34 loc) · 1.62 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
For original README, see README.orig
= About =
Building on merle and ketama, this application enables memcached access from erlang.
= Prerequisites =
- ruby and rake for building
- libketama <http://www.audioscrobbler.net/development/ketama/>
- memcached servers <http://www.danga.com/memcached/>
= Builing =
Run rake a first time and make sure ERL_TOP is set at the right location.
sudo rake install will install the application where necessary.
= Example Usage =
Provide a ketama.servers file (such as the one here).
Open 3 terminals and start memcached in each one of them on a different port :
$ memcached -p 11211 -vv
$ memcached -p 11212 -vv
$ memcached -p 11213 -vv
Open another terminal, and run :
$ erl -s merle -merle file '"ketama.servers"' # use the one included here.
You should see on the memcached servers something like :
<18 new client connection
For the rest, see the README.orig file
You should see that the keys you set are distributed amongs the servers.
= Editing the ketama file =
The ketama.servers file is tracked and reloaded each time it is modified.
ketama provided consistent hashing goodness ; adding and removing memcached servers does not invalidate all the cache.
One caveat : currently the app doesn't flush newly added memcached servers, that may cause inconsistencies.
On top of that, I have not implemented the flush command for a specific server.
= Authors =
Eric Cestari, maintaining this stuff.
With original merle client
* Copyright 2009, Joe Williams <[email protected]>
* Copyright 2009, Nick Gerakines <[email protected]>
And original ketama driver by Richard Jones last.fm
(thanks guys !)