From 7f2ea9873d2b22e3caf7731cbd2e95f9b73752ca Mon Sep 17 00:00:00 2001 From: timgl Date: Tue, 21 Jan 2025 00:28:27 +0000 Subject: [PATCH] Create monolith-vs-microservices.md --- .../engineering/monolith-vs-microservices.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 contents/handbook/engineering/monolith-vs-microservices.md diff --git a/contents/handbook/engineering/monolith-vs-microservices.md b/contents/handbook/engineering/monolith-vs-microservices.md new file mode 100644 index 000000000000..02d55fa6d575 --- /dev/null +++ b/contents/handbook/engineering/monolith-vs-microservices.md @@ -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). +