/mcd

memcached API compatible server (meta, text and binary) and client

Primary LanguageErlangApache License 2.0Apache-2.0


Test Coverage Test Results edoc Erlang/OTP 25+ Apache-2.0

What is MCD?

mcd is a memcached compatible API server written in Erlang/OTP 25 using ETS to maintain the cache of data.

It has a TCP memcached compatible API on port 11211 offering:

main

Build

mcd uses erlang.mk with Erlang/OTP 25 to build:

make

Run

To run mcd with an Erlang Shell listening on port 11211:

make shell

Docker

To run mcd as a docker container:

docker run \
    --pull always \
    --detach \
    --publish 11211:11211 \
    --rm \
    ghcr.io/shortishly/mcd:latest

API Example

The text based API is the easiest to try out from the command line with a simple set and get:

telnet localhost 11211
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.

set foo 0 0 6 
fooval
STORED
get foo
VALUE foo 0 6
fooval
END

The implementation uses some recently introduced features of Erlang/OTP: