Skip to content

Technology Choices & Exhaustive Trade-Off Comparisons ​

1. Backend Ingestion: FastAPI vs Go vs Rust vs Node.js ​

FactorFastAPI (Python) [Chosen]Go (net/http)Rust (Axum / Actix)Node.js (Express)
Throughput / LatencyHigh (uvloop async)Extremely High (goroutines)Maximum (zero cost)Moderate (single-threaded)
ML & AI IntegrationNative (NumPy, PyTorch, LLM APIs)Clunky (Cgo / Python microservice)Verbose (Candle / ONNX bindings)Moderate (JS SDKs)
Developer VelocityVery Rapid (Pydantic, automatic docs)RapidSlower (strict borrow checker)Rapid
Memory FootprintModerate (~80MB base)Very Low (~15MB)Minimal (~5MB)Moderate (~70MB)
  • Why I Used FastAPI: The distributed tracing platform requires deep coupling between high-speed ingestion and complex statistical machine learning (anomaly scoring, causal graph analysis, LLM incident postmortems). Python provides the richest ecosystem for these ML algorithms while FastAPI's async runtime delivers thousands of requests per second. [CONFIRM WITH DEVELOPER]
  • Trade-off Accepted: Slightly higher per-core memory usage than Go/Rust, mitigated by horizontal worker scaling.

2. Telemetry Storage: ClickHouse vs Elasticsearch vs PostgreSQL vs MongoDB ​

FactorClickHouse (Columnar) [Chosen Architecture]ElasticsearchPostgreSQLMongoDB
Data ModelColumn-oriented relationalDocument / Inverted IndexRow-oriented relationalDocument (JSON)
Compression Ratio5x - 10x (ZSTD / Gorilla)1.5x - 2x1.2x - 1.5x1.1x - 1.3x
Aggregation SpeedSub-second over billions of rowsFast for search, slow for mathSlow over 100M+ rowsSlow over 100M+ rows
Write Throughput1,000,000+ rows/sec bulk insertsHigh CPU overhead on Lucene mergeModerateModerate
  • Why ClickHouse: Distributed traces are append-only time-series records. Query patterns always aggregate specific columns (e.g., avg(duration) WHERE service_name = 'auth'). Columnar storage stores identical columns together, allowing extreme compression and vector instructions (SIMD) for aggregations.
  • Why Not Elasticsearch: Elasticsearch's inverted index consumes enormous RAM and storage overhead (often 2x the raw data size). ClickHouse achieves 5x-10x compression on trace data.