back to projects
preview coming soon
systemsfrom scratch

Helios

Distributed time-series database from scratch. LSM-tree storage, Raft replication, PromQL queries, streaming anomaly detection.

The problem

Understanding distributed systems requires building them. Helios is a from-scratch TSDB that implements LSM-trees, Raft consensus, and PromQL parsing.

Architecture

Write Path:  gRPC → WAL → MemTable → SSTable (LSM)
Read Path:   PromQL Parser → Query Planner → Storage Engine

Replication: Raft consensus (3-node cluster)
Compression: Gorilla encoding (timestamps + values)
Anomaly:     Streaming Z-score with sliding window

Key decisions

DecisionChoiceWhy
StorageLSM-treeWrite-optimized for time-series ingestion patterns.
ConsensusRaftUnderstandable consensus. Implemented from the paper.
QueryPromQL subsetIndustry standard. Good exercise in parser implementation.

Results

WRITE THROUGHPUT
100K
points/sec/node
COMPRESSION
12x
with Gorilla encoding
REPLICATION
3-node
Raft cluster