PostHog's architecture

This section covers PostHog's data model, ingestion pipeline, ClickHouse setup and data querying. This page provides an overview of how PostHog is structured.

Broad overview

PostHog has a few main systems:

  • Web app and API – Django serves the UI and REST API for users
  • Rust microservices – High-throughput services for event capture, feature flag evaluation, and session replay ingestion
  • Kafka – Central message bus connecting ingestion to storage
  • Background workers – Celery (short tasks), Temporal (reliable workflows), and Dagster (scheduled data pipelines)
  • CDP (Customer Data Platform) – Processes events on ingestion and exports to destinations

Zooming closer

Adding detail reveals the individual services and how data flows between them.

Infrastructure view

On PostHog Cloud, the application services run in an EKS (Kubernetes) cluster on AWS, while the data stores are managed separately.

Community questions

Was this page useful?

Questions about this page? or post a community question.