ElysianDB is a lightweight, fast key–value store written in Go. It speaks both HTTP and TCP:
- a minimal Redis‑style text protocol over TCP for max performance,
- a simple KV HTTP API, and now
- a zero‑configuration, auto‑generated REST API that lets you treat ElysianDB like an instant backend for your frontend.
One‑liner: You get an auto‑generated REST API (CRUD, pagination, sort) with no configuration; entities are inferred from the URL, and indexes are created automatically.
- See CONTRIBUTING.md if you’d like to help.
- Here is the documentation.
- Full documentation, benchmarks, and examples are available at elysiandb.com.
- For a distributed system, please look at ElysianGate
- Zero‑Config REST API — auto-generated CRUD endpoints per entity (
/api/<entity>) - Fast KV Engine — in-memory sharded store with optional TTL and on-disk persistence
- Multi‑Protocol — HTTP, TCP (Redis-style text protocol), and Instant REST
- Automatic Indexing — lazy-built indexes on first sort request
- Schema‑less JSON — store any structure; IDs generated automatically
- Schema validation if enabled — Inferred schema from POST and validate future POST
- Persistence — automatic periodic flush and graceful shutdown
- Nested Entity Creation — automatic creation and linking of sub-entities detected by @entity fields in JSON
- Migrations — perform global updates via /api//migrate endpoint with declarative actions like set
// Create an entity
await fetch("http://localhost:8089/api/articles", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({ title: "Hello", tags: ["go", "kv"], published: true }),
});
// Fetch with pagination & sorting
const res = await fetch("http://localhost:8089/api/articles?limit=20&offset=0&sort[title]=asc");
const articles = await res.json();No setup, no schema — just start and query.
| Scenario | Load | p95 Latency | RPS | Errors |
|---|---|---|---|---|
| Dev Local | 3 VUs / 100 keys | 0.20 ms | ~18.4k/s | 0% |
| Small App | 10 VUs / 500 keys | 0.48 ms | ~34.7k/s | 0% |
| Light Prod | 25 VUs / 1000 keys | 1.54 ms | ~38.0k/s | 0% |
| Heavy Load | 200 VUs / 5000 keys | 47.7 ms | ~23.3k/s | 0% |
Sub‑millisecond latency under realistic workloads — true instant REST APIs.
docker run --rm -p 8089:8089 -p 8088:8088 taymour/elysiandb:latestDefault config:
store:
folder: /data
shards: 512
flushIntervalSeconds: 5
crashRecovery: { enabled: true, maxLogMB: 100 }
server:
http: { enabled: true, host: 0.0.0.0, port: 8089 }
tcp: { enabled: true, host: 0.0.0.0, port: 8088 }
log:
flushIntervalSeconds: 5
stats:
enabled: false
api:
index:
workers: 4
cache:
enabled: true
cleanupIntervalSeconds: 10
POST /api/<entity>→ CreateGET /api/<entity>→ List (limit,offset,sort[field]=asc|desc,filter)GET /api/<entity>/<id>→ ReadPUT /api/<entity>/<id>→ UpdateDELETE /api/<entity>/<id>→ Delete
SET <key> <value>GET <key>/MGET key1 key2DEL <key>/RESET/SAVE/PING
- Automatic periodic persistence to disk
- Logged writes and crash replay
- Graceful flush on shutdown
/statsendpoint for runtime metrics (if enabled)
go build && ./elysiandb
# or
go run elysiandb.go