Tech stack
Contents
Note: This page refers to our main product repository, not our website.
Frontend
- Web framework/library: React
- State management: Redux + Kea
- Layout/components: Ant Design
Backend
- Framework: Django
- High scale services: Rust
- Databases: PostgreSQL and ClickHouse
- Task queue/event streaming: Redis and Apache Kafka
- Task Worker: Celery, Temporal and Dagster
Testing
- Frontend E2E tests: Cypress
- Backend tests: Pytest and Django's built-in test suite
Additional tools
- CI/CD: GitHub Actions
- Containerization: Docker and Docker Compose
- Linter (frontend): ESLint
- Formatter (backend): Black
Workflow orchestration
We historically used Celery as our task worker. At PostHog’s current scale Celery can be unreliable for larger or long-running workflows, but it remains a practical fit for small, low-latency background tasks (e.g. sending emails or other quick async side-effects). New medium- and large-scale jobs should use Temporal or Dagster instead.
We use both Temporal and Dagster for more complex orchestration, each chosen for their specific strengths.
When to use each tool
We tend to use Celery for lightweight ad-hoc tasks, Dagster for internal data jobs, and Temporal for user-facing workflows. You can look at the problem from the requirements for your jobs:
- Is it a tiny, low-latency, fire-and-forget task (e.g. send email)? → Celery
- Is it mission-critical with complex failure scenarios? → Temporal
- Do you need exactly-once guarantees? → Temporal
- Do you need complex retry policies or long-running workflows? → Temporal
- Is it primarily about scheduled data transformation? → Dagster
- Do you need rich data lineage and testing? → Dagster
Where do we use each?
These are examples of where we use Temporal and Dagster at PostHog. Hopefully, these can serve as anecdotal examples to help you pick between Temporal and Dagster for your application. This list is not exhaustive.
Celery: Small, fast background tasks (e.g. sending email, minor async operations) Temporal: Batch exports, data warehouse source syncing, AI platform task generation Dagster: Exchange rate tracking, one-off production management commands (better monitoring than Django's management commands), web analytics data pre-processing