All posts
Tag

multi-tenant

4 posts

Tutorial

Clean Code Python: Multi-Tenant Foundation — Context, Isolation, and the Data Boundary

Your BookStore API now has 200 customers who each want their own data. One missing WHERE clause leaks tenant data and kills the company. Here is how to make cross-tenant data leakage structurally impossible with context propagation, session events, and row-level isolation.

13 min read
Tutorial

Clean Code Python: Rate Limiting and Noisy Neighbor Prevention

Without rate limiting, one tenant's bulk import consumes all your database connections and API throughput. Here is how to build tiered, sliding-window rate limiting in Python with Redis — protecting every tenant from every other tenant.

11 min read
Tutorial

Clean Code Python: Multi-Tenant Migrations Without Downtime

A naive ALTER TABLE on a 100M-row table locks it for minutes. Multi-tenant makes it worse: one failed migration across 200 schemas leaves tenants on inconsistent versions. Here is the expand-contract pattern and the tooling to migrate safely.

14 min read