Performance
Tracera is designed for high-throughput, low-latency data processing. Every layer is optimized.Batch Inserts
Price points are inserted viapgx.CopyFrom (PostgreSQL COPY protocol) in configurable chunks. This minimizes database round-trips and achieves significantly higher throughput than individual INSERT statements.
Continuous Aggregates
TimescaleDB pre-computes aggregated views for common query windows:| Window | Bucket | Metrics |
|---|---|---|
| 1 hour | time_bucket('1 hour', time) | avg, min, max, stddev, total volume |
| 24 hours | time_bucket('24 hours', time) | avg, min, max, stddev, total volume |
| 7 days | time_bucket('7 days', time) | avg, min, max, stddev, total volume |
Redis Caching
Sub-millisecond reads for hot data:- Latest prices — cached on every ingestion cycle
- Volatility rankings — sorted sets for instant “most volatile” queries
- Session data — no database hit for session lookups
- Rate limits — atomic increment counters
Connection Pooling
pgxpool— TimescaleDB connection pool avoids connection-per-request overhead- Pooled Redis clients — shared connections for cache and pub/sub operations