JobMaster: use Danga::Socket to schedule
[MogileFS-Server.git] / doc / memcache-support.txt
blob2160a56b34fce6c23f746c0cfd0c0c57213e0c09
1 An oft-requested feature, now implemented, is memcached support within
2 the tracker, in particular to speed up get_paths requests and reduce
3 load on the database.
5 After years of saying it's stupid, I finally implemented it, but I
6 still maintain it's (usually) stupid.
8 Really, you should cache get_paths requests in your application,
9 avoiding an extra round-trip to the trackers that could be avoided on
10 a cache hit.
12 That is, you should do:
14 1)   app <-> memcache
16 Rather than:
18 2)   app <-> tracker <-> memcache
20 Although, if 1) is too hard, it's true that 2) is cheaper than 3):
22 3)   app <-> tracker <-> db.
24 So now you have lots of options!
26 To use memcached support on get_paths requests, telnet to one of your trackers and do:
28     set_server_setting key=memcache_servers&value=127.0.0.1:11211
30 (where value is a comma-separated list, if you have multiple)
32 And then all future get_paths requests with noverify=1 (which now
33 doubles as the "memcached is okay" flag) will use memcache.
35 All this may change in the future, but the instructions given here
36 will remain compatible if things do change.