Tech stack

Note: This page refers to our main product repository, not our website.

Frontend

Backend

Testing

Additional tools

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:

  1. Is it a tiny, low-latency, fire-and-forget task (e.g. send email)? → Celery
  2. Is it mission-critical with complex failure scenarios? → Temporal
  3. Do you need exactly-once guarantees? → Temporal
  4. Do you need complex retry policies or long-running workflows? → Temporal
  5. Is it primarily about scheduled data transformation? → Dagster
  6. 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

Community questions

Was this page useful?

Questions about this page? or post a community question.