Storage
LiteJoin uses SQLite as its primary data store, with optional tiered storage for long-term retention.SQLite Sharding
Data is distributed across multiple SQLite databases using FNV hashing on the message key:.db file in WAL mode with a single writer connection and a configurable pool of reader connections.
Retention
Data older than the retention duration is periodically deleted:Tiered Storage (Optional)
When enabled, LiteJoin compacts expired data into Parquet files before deleting from SQLite. These files are queryable via an embedded DuckDB instance and can optionally be uploaded to cloud storage.How It Works
- Retention fires — rows older than the TTL are eligible for compaction.
- Compactor reads rows from SQLite, writes them to Parquet files with Snappy compression.
- Rows are deleted from SQLite, reclaiming space.
- DuckDB queries Parquet files for historical data.
- Uploader (optional) copies Parquet files to S3/GCS/Azure Blob Storage.
Configuration
Archive Config Reference
Cloud Config Reference
Data Lifecycle Example
Givenretention: 1h and archive.local_retention: 168h:
Querying Historical Data
Historical data is queryable via the Snapshot API. When afrom parameter extends beyond the retention window, the snapshot handler automatically queries Parquet files via DuckDB.
The hot path (real-time joins) has zero overhead from tiered storage. DuckDB is only used for historical queries.