---
title: "How Respan is scaling LLM observability with ClickHouse Cloud"
description: "Respan, an AI gateway with built-in LLM observability processing about 50 million events per day, moved ingestion and analytics from Postgres to ClickHouse Cloud after per-request transactional inserts began contending at 50-100 writes per second."
url: "https://swe.quest/articles/how-respan-is-scaling-llm-observability-with-clickhouse-cloud-a4578d78266aa225"
canonical: "https://clickhouse.com/blog/respan-ai-llm-observability"
source: "ClickHouse"
published: "2026-04-06"
difficulty: "medium"
kind: "Case study"
reading_minutes: 6
tags: ["analytics","observability","postgres","llms"]
---

# How Respan is scaling LLM observability with ClickHouse Cloud

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2026-04-06, 6 min read, Case study. Original: [https://clickhouse.com/blog/respan-ai-llm-observability](https://clickhouse.com/blog/respan-ai-llm-observability)

## Summary

Respan, an AI gateway with built-in LLM observability processing about 50 million events per day, moved ingestion and analytics from Postgres to ClickHouse Cloud after per-request transactional inserts began contending at 50-100 writes per second. The ClickHouse design keeps rows small by storing typed metric columns and truncating prompt and output text. Incremental materialized views cascade minute-level rollups into hourly rollups per dimension, while refreshable materialized views update user-metadata joins every 10 minutes. Trace spans arrive asynchronously and are linked to parents at query time, and argMax-style aggregates replace the expensive FINAL modifier so trace analytics stay memory-efficient at billions of rows.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [Observability](https://swe.quest/tags/observability.md) (Reliability & operations)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)

## Prerequisites

- SQL aggregation ([easy posts on SQL](https://swe.quest/tags/sql.md?difficulty=easy))
- columnar databases ([easy posts on Databases](https://swe.quest/tags/databases.md?difficulty=easy))
- materialized views

## Keywords

ClickHouse Cloud, Respan, PostgreSQL, MergeTree, materialized views, argMax, Django

## Related posts

- [How Langfuse is scaling LLM observability for the agentic era with ClickHouse Cloud](https://swe.quest/articles/how-langfuse-is-scaling-llm-observability-for-the-agentic-era-with-clickhouse-f7eb3fab8bbd30ed.md): ClickHouse · 2026-02-03 · Medium · 8 min read · Analytics & OLAP, Observability, LLMs, PostgreSQL, Scaling
  Langfuse moved its LLM tracing data from a single-node Postgres instance to ClickHouse after ingestion growth caused timeouts, high IOPS costs and slow SDK ingestion.
- [How Mercado Libre rebuilt its observability platform on ClickHouse Cloud with 75x faster trace queries](https://swe.quest/articles/how-mercado-libre-rebuilt-its-observability-platform-on-clickhouse-cloud-with-a3245c05609a41cc.md): ClickHouse · 2026-08-04 · Medium · 8 min read · Observability, Analytics & OLAP, Scaling, Performance engineering
  Mercado Libre moved the storage layer of its OpenTelemetry-based tracing platform, O11y events, to ClickHouse Cloud.
- [How we used ClickHouse to store OpenTelemetry Traces and up our Observability Game](https://swe.quest/articles/how-we-used-clickhouse-to-store-opentelemetry-traces-and-up-our-observability-b78dc8bc485a8f13.md): ClickHouse · 2023-04-14 · Medium · 13 min read · Observability, Analytics & OLAP, SQL, Cost optimization
  Resmo stores over 300 million unsampled OpenTelemetry spans per day in a self-hosted ClickHouse node, after dropping S3/Parquet/Athena because of its 2-3 second query startup and delayed data.
- [Goodbye limitations, hello data: How Qonto is rethinking observability with ClickHouse Cloud](https://swe.quest/articles/goodbye-limitations-hello-data-how-qonto-is-rethinking-observability-with-756d9cefa803d826.md): ClickHouse · 2026-05-01 · Easy · 8 min read · Observability, Analytics & OLAP, AI agents, Cost optimization
  Qonto, a European digital bank, moved trace storage from Grafana Tempo to ClickHouse Cloud, extending query windows from 2-3 hours to two weeks without sampling and adopting a wide-events model instead of the logs/metrics/traces pillars.
- [How ClickHouse Cloud enabled LaunchDarkly to build and ship features faster](https://swe.quest/articles/how-clickhouse-cloud-enabled-launchdarkly-to-build-and-ship-features-faster-0e4ac03aed14f7e6.md): ClickHouse · 2026-01-22 · Medium · 10 min read · Analytics & OLAP, Data pipelines, Observability, Multi-tenancy, Cloud platforms
  LaunchDarkly replaced Kinesis/Flink/Lambda streaming pipelines and an S3/Parquet/Athena batch warehouse with ClickHouse Cloud.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
