---
title: "Scaling SaaS security: Reco’s migration from Postgres to ClickHouse Cloud"
description: "Reco, a SaaS security platform ingesting 10-12 billion JSON events weekly, moved over 90% of its workload from Postgres to ClickHouse Cloud."
url: "https://swe.quest/articles/scaling-saas-security-reco-s-migration-from-postgres-to-clickhouse-cloud-644c039f853be147"
canonical: "https://clickhouse.com/blog/reco-postgres-to-clickhouse-cloud"
source: "ClickHouse"
published: "2025-11-17"
difficulty: "medium"
kind: "Case study"
reading_minutes: 6
tags: ["analytics","postgres","stream-processing","performance","cost-optimization"]
---

# Scaling SaaS security: Reco’s migration from Postgres to ClickHouse Cloud

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2025-11-17, 6 min read, Case study. Original: [https://clickhouse.com/blog/reco-postgres-to-clickhouse-cloud](https://clickhouse.com/blog/reco-postgres-to-clickhouse-cloud)

## Summary

Reco, a SaaS security platform ingesting 10-12 billion JSON events weekly, moved over 90% of its workload from Postgres to ClickHouse Cloud. Running both databases synced via CDC had made schema migrations, updates, deletes and VACUUM painful. Reco replaced RDBMS features with ReplacingMergeTree and CollapsingMergeTree for upserts and deletes, idempotency and eventual consistency instead of transactions, and tenant-level atomic materialized view refreshes via REPLACE PARTITION. Further gains came from compute-compute separation, spill-to-disk settings, parallel\_distributed\_insert\_select=2 (cutting resource needs by a third) and data-skipping indexes, plus using the EmbeddedRocksDB engine as a streaming state store in place of Spark state and Redis.

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)
- [PostgreSQL](https://swe.quest/tags/postgres.md) (Data & databases)
- [Stream processing](https://swe.quest/tags/stream-processing.md) (Data & databases)
- [Performance engineering](https://swe.quest/tags/performance.md) (Reliability & operations)
- [Cost optimization](https://swe.quest/tags/cost-optimization.md) (Reliability & operations)

## Prerequisites

- columnar databases ([easy posts on Databases](https://swe.quest/tags/databases.md?difficulty=easy))
- PostgreSQL basics ([easy posts on PostgreSQL](https://swe.quest/tags/postgres.md?difficulty=easy))
- Kafka and Spark streaming ([easy posts on Queues & messaging](https://swe.quest/tags/messaging.md?difficulty=easy))

## Keywords

ClickHouse Cloud, PostgreSQL, ReplacingMergeTree, EmbeddedRocksDB, Kafka, Spark, Reco

## Related posts

- [How Seemplicity scaled real-time security analytics with Postgres CDC and ClickHouse](https://swe.quest/articles/how-seemplicity-scaled-real-time-security-analytics-with-postgres-cdc-and-c80fc0ac79e77c01.md): ClickHouse · 2025-05-29 · Easy · 6 min read · Event-driven architecture, Analytics & OLAP, PostgreSQL, Multi-tenancy, Data pipelines
  Seemplicity, a security remediation platform aggregating findings from 150+ tools, outgrew a Postgres-only design as heavy upserts, table bloat and multi-table joins across ~16 per-tenant tables slowed customer dashboards.
- [“Just OLAP it”: How Ramp rebuilt its analytics platform on ClickHouse Cloud](https://swe.quest/articles/just-olap-it-how-ramp-rebuilt-its-analytics-platform-on-clickhouse-cloud-36298842faab88cc.md): ClickHouse · 2026-01-20 · Medium · 5 min read · Analytics & OLAP, Event-driven architecture, Data pipelines, PostgreSQL, Queues & messaging
  Ramp moved customer-facing spend analytics off its Postgres monolith after enterprise customers' reports on a single card-transactions table began taking 40+ seconds, and now serves them in milliseconds from ClickHouse Cloud.
- [98% faster queries, 50% lower cloud costs: Verihubs’ journey from Postgres to ClickHouse](https://swe.quest/articles/98-faster-queries-50-lower-cloud-costs-verihubs-journey-from-postgres-to-f6535061aff525b1.md): ClickHouse · 2026-07-06 · Medium · 6 min read · Analytics & OLAP, Data pipelines, PostgreSQL, Event-driven architecture
  Verihubs replaced a Postgres warehouse fed by daily Airflow batch pulls with a ClickHouse-based real-time OLAP stack.
- [Vantage's Journey from Redshift and Postgres to ClickHouse](https://swe.quest/articles/vantage-s-journey-from-redshift-and-postgres-to-clickhouse-3bbe2f8581aa24cf.md): ClickHouse · 2023-07-13 · Easy · 5 min read · Analytics & OLAP, PostgreSQL, Databases, Cost optimization
  Vantage, a cloud cost platform handling billions of billing records, outgrew Postgres when constant deletes and reinserts kept vacuum running and pushed indexes out of memory.
- [How Physical Intelligence unified its robotics data stack with Postgres managed by ClickHouse](https://swe.quest/articles/how-physical-intelligence-unified-its-robotics-data-stack-with-postgres-managed-31d6ee7aad1b24a5.md): ClickHouse · 2026-08-06 · Medium · 16 min read · Analytics & OLAP, PostgreSQL, Data pipelines, Model training
  Physical Intelligence, a robotics foundation-model lab, split its data into raw petabyte-scale training data, transactional data needing ACID guarantees (under 100M rows), and high-cardinality metadata and annotations (10 to 100 billion rows).

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)
