Appearance
System Architecture & High-Scale Design
System Overview
100x Scale Strategy & First Bottlenecks
At 100x volume (100,000 spans/second):
- First Bottleneck: In-memory ring buffer exhaustion in the single FastAPI worker.
- Mitigation: Introduce Apache Kafka or Redis Streams as an external durable buffer between collectors and storage writers.
- Second Bottleneck: Database insert latency.
- Mitigation: Increase batch size from 5,000 to 50,000 spans, flushing every 5 seconds, utilizing ClickHouse partitioned MergeTree tables.
- Third Bottleneck: Tail-sampling state memory.
- Mitigation: Partition tail-sampling nodes using consistent hashing on
trace_id.
- Mitigation: Partition tail-sampling nodes using consistent hashing on