https://github.com/diegohce/dcached
Masterless distributed cluster cache system
https://github.com/diegohce/dcached
cache cache-cluster cache-node cluster cluster-cache distributed distributed-cache go golang masterless memcache nodes parallel
Last synced: 11 months ago
JSON representation
Masterless distributed cluster cache system
- Host: GitHub
- URL: https://github.com/diegohce/dcached
- Owner: diegohce
- License: gpl-3.0
- Created: 2018-09-26T17:18:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2019-04-12T20:45:36.000Z (almost 7 years ago)
- Last Synced: 2025-01-29T22:25:02.007Z (about 1 year ago)
- Topics: cache, cache-cluster, cache-node, cluster, cluster-cache, distributed, distributed-cache, go, golang, masterless, memcache, nodes, parallel
- Language: Go
- Homepage:
- Size: 4.64 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://goreportcard.com/report/github.com/diegohce/dcached)
[](https://github.com/diegohce/dcached/releases/)
[](https://github.com/diegohce/dcached/releases/)
[](https://github.com/diegohce/dcached/blob/master/LICENSE)
[](https://github.com/diegohce/dcached/graphs/commit-activity)
[](http://hits.dwyl.io/diegohce/dcached)
[](https://github.com/diegohce/dcached/releases/)
dcached(1)
# NAME
*dcached* - Distributed and masterless cache cluster.
# SYNOPSIS
*dcached*
# DESCRIPTION
*dcached* can run as a standalone node or as a cluster of nodes.
Config file at /etc/dcached.conf defines *dcached* behaviour.
# CONFIG FILE
```
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
```
# Cache Operations
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
## Set
HTTP POST to /cache/set
```json
{
"appname":"my-awesome-service",
"key": "unique-key-for-this-app",
"value": "some-frequent-value",
"ttl": 120
}
```
## Get
HTTP POST to /cache/get
```json
{
"appname":"my-awesome-service",
"key": "unique-key-for-this-app"
}
```
## Remove
Remove Operations
* key
* application
* all
### Remove key
HTTP POST to /cache/remove/key
```json
{
"appname":"my-awesome-service",
"key": "unique-key-for-this-app"
}
```
### Remove application
HTTP POST to /cache/remove/application
```json
{
"appname":"my-awesome-service",
"key": "unique-key-for-this-app"
}
```
### Remove all
HTTP POST to /cache/remove/all
```json
{
"appname":"all"
}
```
## Stats
* local (requested node)
HTTP GET to /cache/stats/local
* all (all cluster nodes)
HTTP GET to /cache/stats/all
# FILES
/etc/dcached.conf
/etc/default/dcached
# AUTHORS
Maintained by Diego Cena . Up-to-date sources and binaries
can be found at https://github.com/diegohce/dcached and bugs/issues
can be submitted there.