Embeddable timeseries database with a Rust core, CLI shell, and server.
- Columnar, append-only segments with per-table chunk + TTL.
- Single-file WAL with rotation and replay.
- SQL-ish query language with time expressions and windowing.
- Tag predicates with LIKE/ILIKE/starts_with/contains.
- Influx line protocol ingest (HTTP + TCP).
cargo buildStart the shell:
cargo run -p tiz --Run a single query:
cargo run -p tiz -- -c "SELECT avg(*) FROM sys WHERE ts BETWEEN now(1h) AND now() GROUP BY time('1m')"Run the server:
cargo run -p tiz-serverHTTP endpoints:
POST /ingestJSON rowsGET /query?q=...GET /query/stream?q=...(SSE)POST /writeInflux line protocol
Defaults live in tiz.toml. You can override with env vars using
double-underscore nesting, for example:
TIZ__STORAGE__DATA_DIR=/var/lib/tiz \
TIZ__WAL__ROTATION_INTERVAL_MS=1000 \
TIZ__MEMTABLE__FLUSH_MAX_POINTS=50000 \
TIZ__AUTH__TOKEN=secret \
cargo run -p tiz-serverCREATE TABLE sys (
ts TIMESTAMP,
cpu_pct FLOAT,
mem_gb FLOAT,
region STRING CODEC dict
) WITH (chunk='10s', ttl='60s');INSERT INTO sys (ts, cpu_pct, mem_gb, region)
VALUES (now(), 42.0, 3.1, 'us-east');Line protocol:
curl -X POST http://127.0.0.1:8181/write \
--data-binary "sys,region=us-east cpu_pct=0.82,mem_gb=4.1 1736342140000000000"docker build -t tiz .
docker run --rm -p 8181:8181 -p 8182:8182 tiz