dcached(1)
dcached - Distributed and masterless cache cluster.
dcached
dcached can run as a standalone node or as a cluster of nodes. Config file at /etc/dcached.conf defines dcached behaviour.
cache:
ip: "" #leave blank
port: "9009" #listen port for cache service.
gc_freq: 3600 #seconds, cache subsystem garbage collector
mode: "standalone" # "cluster"
siblings:
address: "224.0.0.1:9999" #multicast group.
beacon_freq: 2 #seconds
max_datagram_size: 128 #bytes, hostname MUST fit here.
ttl: 5 #seconds, time to expire siblings registrar.
beacon_interface: "" #Network interface to use to send the multicast beacon
Dcached differs from others cache systems as it does not use a key-value based model, it uses a key-key-value model as in application_name-key-value. So several applications can use the same dcached cluster without key collision amongst applications.
- Set
- Get
- Remove
- Stats
HTTP POST to /cache/set
{
"appname":"my-awesome-service",
"key": "unique-key-for-this-app",
"value": "some-frequent-value",
"ttl": 120
}
HTTP POST to /cache/get
{
"appname":"my-awesome-service",
"key": "unique-key-for-this-app"
}
Remove Operations
- key
- application
- all
HTTP POST to /cache/remove/key
{
"appname":"my-awesome-service",
"key": "unique-key-for-this-app"
}
HTTP POST to /cache/remove/application
{
"appname":"my-awesome-service",
"key": "unique-key-for-this-app"
}
HTTP POST to /cache/remove/all
{
"appname":"all"
}
-
local (requested node) HTTP GET to /cache/stats/local
-
all (all cluster nodes) HTTP GET to /cache/stats/all
/etc/dcached.conf
/etc/default/dcached
Maintained by Diego Cena [email protected]. Up-to-date sources and binaries can be found at https://github.com/diegohce/dcached and bugs/issues can be submitted there.