Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create monolith-vs-microservices.md #10403

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions contents/handbook/engineering/monolith-vs-microservices.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: Monolith vs Microservices
sidebar: Handbook
showTitle: true
---

## Monolith vs Microservices

Ah, the age old argument. We have a simple rule of thumb:

> Our customers should talk to our Django monolith. Our customers' customers should talk to independently scalable services with their own data stores.

That means, everything that happens when you log into PostHog, all CRUD operations, should happen in our Django monolith. We have in the order of magnitude of 10s of thousends of DAUs. That's a level of scale that Django can very easily handle with a few web pods and a single postgres database.

Our customers have hundreds of millions of users, and we have a lot of independent products that could and should scale independently of each other (and more importantly, not take each other down). Some examples of this are [capture-rs](https://github.com/PostHog/posthog/tree/master/rust/capture) or [feature flags calling](https://github.com/PostHog/posthog/tree/master/rust/feature-flags).

Loading