How it works
How Chronix works inside: the storage engine, the codecs, query execution, forecasting and anomaly detection, and why each design was chosen.
The design behind the engine: what each part does, why it is built that way, and what was rejected.
- ArchitectureHow the Chronix workspace is laid out: the published crates, the one seam between engine and server, and what each crate owns.
- Storage engineThe Chronix LSM write path and read path: WAL, memtable, time-sharded .csx segments, the catalog and the on-disk format generation.
- Write-ahead logHow the Chronix WAL makes acknowledged writes durable: record format, fsync policies, group commit, sealing of encrypted columns and replay.
- Memtable and segmentsThe in-memory memtable and the columnar .csx segment format: row groups, column blocks, blooms, zone maps and flush.
- CompactionHow Chronix merges segments in the background: tiered compaction, deduplication, tombstones and what a reader sees mid-compaction.
- EncodingHow Chronix compresses columns: pcodec first, ALP and the XOR codecs behind it, and per-block adaptive selection by trial encoding.
- Float encodingWhy pcodec and ALP beat XOR codecs on metric data: recovering the decimal behind a double, with measured ratios on real meter data.
- Integer, timestamp and dictionary encodingHow Chronix encodes integers, timestamps and strings: delta-of-delta, frame-of-reference bit packing, pcodec timestamps and dictionaries.
- Query executionHow a Chronix query runs: layered pruning with blooms and zone maps, the inverted tag index, bounded-memory scans, caches and DataFusion.
- Forecasting modelsThe forecasting models inside Chronix — exponential smoothing, Holt-Winters, ARIMA and SARIMA — how each is fitted and when it wins.
- Intervals and model selectionHow Chronix builds prediction intervals and picks a forecasting model by rolling-origin cross-validation, and what coverage to expect.
- Anomaly detectionThe anomaly detectors in Chronix — z-score, MAD, IQR, CUSUM, forecast residual and seasonal thresholds — how each works and when to use it.
- Multivariate analysisCorrelation, VAR, Mahalanobis distance, PCA and isolation forests in Chronix: detecting anomalies across several series at once.
- Preprocessing, models and computePreprocessing pipelines, the model registry and lifecycle, drift detection, and the compute engine and its parallelism budget.
- Streaming and triggersThe Chronix change-data-capture bus, subscriptions, the trigger DSL and webhook delivery: how events flow from a write to an alert.
- Server architectureHow chronixd is put together: the HTTP, gRPC and Flight SQL surfaces, wire-protocol decoding, ingestion connectors and tracing.
- Object storageThe Chronix cold tier: Hive-partitioned Parquet on S3, GCS or Azure, how segments are archived, and how SQL and other engines read it.
- Security internalsHow Chronix enforces security: request authentication, Cedar evaluation per route, namespace scoping, column encryption and the audit chain.
- TestingHow Chronix is tested: property tests, crash tests with a child that aborts mid-write, deterministic simulation, fuzzing and conformance suites.