The following pages in this section cover Data model, Ingestion pipeline, ClickHouse and Querying data. This document gives an overview of the general architecture. How our cloud or a deployed PostHog Helm chart works on Kubernetes.

Zooming right out

There are only a few systems to consider. A Website and API is presented for users. An API for Client Apps. A plugin service for processing events on ingestion. And a worker service for processing events in response to triggers (e.g. timers)

User
Client Apps/SDKs
Export Sink
Web/API
plugin/worker service
Celery
Data stores

Zooming closer

Starts to reveal the flow between parts of the system

plugin/worker service
Web/API
views insights and more
send events
read
write events
onEvent
save events
onTimer
export events
e.g. read flags
read events
start task
on schedule
Ingestion
Async
timer
Web
Capture API
Decide API
cron
Celery
User
Client Apps/SDKs
Export Sink
Data stores

Zoomed right in

K8s PostHog namespace
K8s Services
K8s Services
Other traffic
Events endpoint
Write path
Read path
Optional Utilization telemetry
Ingress
Postgres Stateful service
Kafka Stateful Service
Kafka Stateful Service
Redis SS
Service Load Balancer
Service Load Balancer
K8s Services
PGBouncer
ClickHouse Cluster (Operator Managed)
Replica 1 Shard 1
Replica 1 Shard 2
Replica 2 Shard 1
Replica 2 Shard 2
K8s ZooKeeper cluster
ZK1
ZK2
ZK3
Plugin Service
Worker Service
Events Service
Web Service
Client Apps
Posthog License Telemetry service

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

Note that the specifics of this may vary:

Questions?

Was this page useful?

Next article

Data model

This document provides a high-level overview of the various objects and primitives that make up the PostHog data model. For more information on exactly how data is stored in our database, check out the ClickHouse overview . The two most-basic entities in PostHog are the Event and Person objects, and represent the core of our analytics functionalities. Event An event is the most important object in PostHog, and represents a single action that a user performed at a specific point in time…

Read next article