Respan (formerly Keywords AI), an AI gateway with built-in LLM observability, outgrew Postgres at 50-100 writes per second as traffic scaled to 50 million daily events. The team migrated to ClickHouse Cloud, redesigning their schema for compact, structured logs and leveraging incremental materialized views with minute-level and hourly rollups to keep dashboards fast. Refreshable materialized views handle user metadata on a 10-minute cadence, avoiding expensive GROUP BY operations. For distributed tracing, spans encode parent relationships resolved at query time, and aggregate functions like argMax replace the costly FINAL modifier. The result is a scalable, operationally simple observability stack handling billions of rows without constant architectural rework.

7m read timeFrom clickhouse.com
Post cover image
Table of contents
From Postgres to ClickHouse #Designing logs for sustained ingestion #

Sort: