Real-time AI isn’t a future ambition. It’s today’s business necessity. But powering fast, intelligent experiences in production takes more than just a good model. You need the right data infrastructure behind it.
In a recent webinar, "Powering Real-Time AI with ClickHouse and CockroachDB," product leaders from Cockroach Labs and ClickHouse explained how teams are combining distributed SQL and high-performance analytics to build AI-powered applications that scale easily and never go dark.
This post recaps the core ideas, architecture, and demo shared during the session.
Two Databases, One Purpose
The modern data stack demands specialization. CockroachDB and ClickHouse each serve a different purpose, and that’s exactly why they work so well together.
CockroachDB is a distributed SQL database built to handle high-throughput transactional workloads with strong consistency, global availability, and zero downtime. CockroachDB has also brought vector capabilities into its core product, allowing users to bring together their vector data and transactional data in one unified place. It is ideal for powering mission-critical systems that require resilience and correctness.
ClickHouse is a high-performance, distributed OLAP database designed for lightning-fast analytics on massive datasets. It specializes in real-time aggregations, observability, and advanced features like vector search.
Together, they support architectures where operational systems remain responsive and consistent, while analytical systems deliver real-time insights over billions of rows.
Why Real-Time AI Needs Real-Time Data
Today’s AI systems don’t just need data. They need data that is fresh, consistent, and available instantly at scale. That’s especially true in production environments, where delays or inconsistencies can break experiences or introduce risk.
Sai Srirampur, Director of Product at ClickHouse, outlined four characteristics required by modern real-time AI systems:
Data freshness: As soon as new data is created, it should be queryable. No lag.
Performance: Queries need to respond in milliseconds, even under high concurrency.
Availability: These systems need to be always on, because AI agents don’t sleep.
Scale: They must handle millions of users or events without failure.
CockroachDB and ClickHouse were both built to support this kind of architecture. CockroachDB handles write-heavy transactional workloads, while ClickHouse manages fast analytical queries on massive datasets. They complement each other cleanly and powerfully.
How It All Works
Here’s how a typical integration looks in practice.
CockroachDB’s changefeed feature emits every row-level change—insert, update, or delete—as a stream of events. These events are pushed in real time to a message broker like Kafka or Redpanda.
ClickHouse then uses its native ingestion service, ClickPipes, to consume this stream and populate tables. It can auto-detect schemas from the Kafka topic, ingest data continuously, and make it available for querying in seconds.
This architecture lets you sync your transactional data from CockroachDB into ClickHouse with minimal latency. It also gives you clean separation between systems of record and systems of insight, allowing each to scale independently.
A Real-World Example: Kami
This pattern isn’t theoretical. It’s already live at companies like Kami, an AI-powered learning platform used by 50 million users across 180 countries. During the pandemic, Kami saw usage increase 20x. Their original PostgreSQL setup couldn’t handle the load, especially when it came to combining transactional consistency and analytics performance.
They migrated to CockroachDB for high-throughput transactions and ClickHouse for analytics. Queries that once took minutes now finish in under a second. More importantly, their system can now scale with confidence, without sacrificing performance or reliability.
Built for Teams That Build
For developers, this setup means fewer moving parts and less time spent worrying about infrastructure. You can build and ship with familiar SQL, skip fragile ETL jobs, and trust that your database will keep up.
For architects, it reduces complexity. You no longer need to overload your operational systems with analytical queries or rely on nightly batch jobs. You get decoupled systems that scale independently and deliver on both availability and performance.
For operators, it’s about observability and control. You can monitor the health of every component, tune ingestion performance, and trust that failures won’t bring everything down.
When to Choose This Architecture
This approach is ideal for any team building a real-time, AI-powered system where speed, scale, and correctness matter. If your application needs fast decisions on fresh data, this stack is a fit.
It’s especially useful for:
AI agents and assistants
Recommendation engines
Transactional analytics
High-volume event processing
Real-time personalization
Get Started
You can try this architecture today with credits from both providers.
Want to dive deeper? The full webinar recording includes a detailed walkthrough, live Q&A, and a working demo of CockroachDB + ClickHouse powering real-time AI.







