---
title: "How Langfuse is scaling LLM observability for the agentic era with ClickHouse Cloud"
description: "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."
url: "https://swe.quest/articles/how-langfuse-is-scaling-llm-observability-for-the-agentic-era-with-clickhouse-f7eb3fab8bbd30ed"
canonical: "https://clickhouse.com/blog/langfuse-llm-analytics"
source: "ClickHouse"
published: "2026-02-03"
difficulty: "medium"
kind: "Case study"
reading_minutes: 8
tags: ["analytics","observability","llms","postgres","scalability"]
---

# How Langfuse is scaling LLM observability for the agentic era with ClickHouse Cloud

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2026-02-03, 8 min read, Case study. Original: [https://clickhouse.com/blog/langfuse-llm-analytics](https://clickhouse.com/blog/langfuse-llm-analytics)

## Summary

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. The new pipeline routes SDK and OTel events through Redis queues and S3 to async workers, with ClickHouse as the analytical engine, and query latency fell from minutes to near real-time. Lessons from running it at scale include passing primary keys such as timestamps through frontend state, testing alternative data models against production data, and using compute-compute separation to protect UI queries from ingestion spikes. Because mutable span updates with ReplacingMergeTree and heavy trace/span joins became costly, Langfuse is moving to a wide, immutable events table that cut memory use about 3x and made queries up to 20x faster, with legacy data backfilled in the background.

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)
- [LLMs](https://swe.quest/tags/llms.md) (AI & ML)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Scaling](https://swe.quest/tags/scalability.md) (Distributed systems)

## Prerequisites

- columnar databases ([easy posts on Databases](https://swe.quest/tags/databases.md?difficulty=easy))
- distributed tracing basics ([easy posts on Observability](https://swe.quest/tags/observability.md?difficulty=easy))

## Keywords

Langfuse, ClickHouse Cloud, ReplacingMergeTree, PostgreSQL, Redis, OpenTelemetry

## Related posts

- [How Respan is scaling LLM observability with ClickHouse Cloud](https://swe.quest/articles/how-respan-is-scaling-llm-observability-with-clickhouse-cloud-a4578d78266aa225.md): ClickHouse · 2026-04-06 · Medium · 6 min read · Analytics & OLAP, Observability, PostgreSQL, LLMs
  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.
- [LangChain - Why we Choose ClickHouse to Power LangSmith](https://swe.quest/articles/langchain-why-we-choose-clickhouse-to-power-langsmith-5117f6fe7184a57a.md): ClickHouse · 2024-04-23 · Medium · 9 min read · Analytics & OLAP, Observability, LLMs, PostgreSQL, Databases
  LangSmith, LangChain's LLM observability and evaluation platform, began fully on Postgres but outgrew it as users logged most of their production traces: ingestion lagged, precomputed materializations were rigid and costly, and lock contention grew.
- [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.
- [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)
