Skip to content
Back to projects
Systems & Architecture
In development

VMageste — High-Volume Marketing Analytics SaaS

~3 million events a day, multi-tenant

Key metrics

~3M events/day
Multi-tenant SaaS
Kafka + ClickHouse
Team leadership
VMageste — High-Volume Marketing Analytics SaaS — ~3 million events a day, multi-tenant

Context

Agencies and performance teams live switching between Meta, Google and TikTok dashboards, reconciling numbers that never quite match. The platform brings those sources into one place.

The challenge

Ingest ~3 million daily events from Meta, Google, and TikTok APIs into a multi-tenant platform while keeping OLTP latency under control and real-time dashboards responsive without bottlenecks.

The architecture

I led the redesign from a Node.js monolith to an event-driven microservices architecture. Kafka decouples ingestion from processing; Golang consumers handle stream processing at scale; ClickHouse absorbs analytics queries so PostgreSQL handles only transactional workloads. Strangler Fig pattern for zero-downtime migration.

Architecture flow

  1. Traffic sources

    • Meta
    • Google
    • TikTok
  2. Ingestion

    • Apache Kafka
    • Decouples ingestion from processing
  3. Processing

    • Golang consumers
    • Lead enrichment and deduplication
  4. Storage

    • ClickHouse — analytical queries
    • PostgreSQL — transactional
  5. Product

    • Real-time dashboards
    • Alerts and reports

Engineering decisions

Migrating without stopping the product

The Strangler Fig pattern allowed replacing the monolith piece by piece, keeping the old system running while each slice migrated — instead of a big-bang rewrite, which is where this kind of project usually dies.

Splitting writes from analytical reads

Asynchronous ingestion over Kafka and analytical querying on a columnar store. The two workloads stopped competing for the same resource, which was the real cause of the slowness.

Clean leads at the door

Enrichment and deduplication happen in the ingestion pipeline, not in a report. The sales team receives an already-cleaned base instead of discovering duplicates while dialling.

Full stack

Golang
Apache Kafka
ClickHouse
NestJS
PostgreSQL
Redis
Docker
DDD
Full articleFrom monolith to Kafka + ClickHouse: how I redesigned analytics for millions of events a day9 min readRead the article