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.

For PostHog staff, you can see the very detailed diagram at https://runbooks.posthog.com/architecture

Broad overview

There are only a few systems to consider.

  • A website and API for users
  • An API for client apps
  • A plugin service for processing events on ingestion
  • A worker service for processing events in response to triggers

Zooming closer

Adding detail reveals the flow between parts of the system.

Zoomed right in

No communication is needed into or out of this namespace other than the ingress controller for the app and collecting data.

PostHog is an all-in-one developer platform for building successful products. We provide product analytics, web analytics, session replay, error tracking, feature flags, experimentation, surveys, LLM analytics, data warehouse, a CDP, and an AI product assistant to help debug your code, ship features faster, and keep all your usage and customer data in one stack.

Community questions

Was this page useful?

Questions about this page? or post a community question.