PostHog's architecture

Last updated:

|Edit this page

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

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.

Questions? Ask Max AI.

It's easier than reading through 585 docs articles.

Community questions

Was this page useful?

Next article

Data model: fields

Here's a look at the fields on each data type. To learn more about how to think about data in PostHog, see understanding PostHog . Event fields Each event contains the following base fields within ClickHouse: Column Type Description uuid UUID ID of the event team_id Int64 Foreign key which links to the team event VARCHAR Name of the event distinct_id VARCHAR The unique or anonymous ID of the user that triggered the event. properties VARCHAR Any key: value pairs in a dict. - $current_url - we…

Read next article