Documentation
Ember
An in-memory key-value store with durable persistence.
Ember keeps your keys in memory for fast access and persists them to disk in the background. Reads and writes go through a small HTTP API, so any language can use it without a client library.
Keys can carry a time-to-live and are grouped into logical namespaces. When memory runs low, a configurable eviction policy decides what to drop first.
#Installation
Ember ships as one static binary. Place it on your host and start it:
# download and start $ curl -sSL get.rainyblack.space/install | sh $ ember serve --data /var/lib/ember → listening on :6100 · api ready
By default Ember binds to 127.0.0.1:6100. Put it behind your own reverse proxy to expose it over TLS.
#Quickstart
# set a key $ curl -X PUT :6100/v1/kv/session -d 'abc123' → ok # read it back $ curl :6100/v1/kv/session abc123 # delete it $ curl -X DELETE :6100/v1/kv/session
#Configuration
Configure with flags, environment variables, or a small YAML file. Flags take precedence.
# ember.yaml
data: /var/lib/ember
listen: 127.0.0.1:6100
log: info
memory:
eviction: lrudata— directory for the persistence log and snapshots.listen— address the HTTP interface binds to.memory.eviction— policy used when memory is full (lru, lfu, none).
#API reference
Every route lives under /v1/kv. Requests without a valid token return 401.
| Method & path | Description |
|---|---|
GET /v1/kv/{key} | Read a value. |
PUT /v1/kv/{key} | Set a value (optional ttl header). |
DELETE /v1/kv/{key} | Delete a key. |
GET /v1/kv/_scan | Stream keys matching a prefix. |
GET /health | Liveness probe. Returns 200 when the store is ready. |
#CLI
The ember binary is both the server and the client.
| Command | Description |
|---|---|
ember serve | Start the store. |
ember get <key> | Read a value. |
ember set <key> <value> | Set a value. |
ember status | Show memory use and hit rate. |