Skip to content
Aditya Bhalsod

Journal / Topic

Web articles

Next.js, React, Django and FastAPI: fast websites and the APIs behind them.

Articles
11
Topics
1
Language
EN

/blog/topics/web

All Web articles

Browse every topic

Featured

Web4 minNewAdvanced

Routing Read Replicas in a Schema-Per-Tenant Django App

How django-multi-tenant sends tenant reads to PostgreSQL replicas safely, by syncing the replica's schema, pinning writes to the primary and routing migrations.

Key takeaway. In schema-per-tenant PostgreSQL the tenant lives in the connection's search_path, so every connection that serves a request, replicas included, has to be switched to the same schema.

  • #django
  • #postgresql
  • #multi-tenancy
Read article