Jump to ratings and reviews
Rate this book

Building Multi Tenant Applications with Django

Rate this book
Are you building SaaS app? If you are, you are probably looking to add multi tenancy to your apps.

This book will teach you about the various multi tenancy architectures, the trade offs involved, and how to build a multi tenant app the right way.


Table of Contents:

Introduction to multi tenant applications
- What are multi tenant apps?
- The structure of this book
- The various approached to multi tenancy

Shared database with shared schema
- The base single-tenant app
- Adding multi tenancy to models
- Identifying tenants
- Extracting tenant from request
- A detour to /etc/hosts
- Using tenant_from_request in the views
- Isolating the admin

Shared database with isolated schema
- Limitations of shared schema and our current method
- What are database schemas?
- Managing database migrations
- Tenant separation in views
- A middleware to set schemas
- Beyond the request-response cycle

Isolated database with a shared app server
- Multiple database support in Django
- Database routing in Django
- Per tenant database routing using middlewares
- Outside the request response cycle

Completely isolated tenants using Docker
- Tools we will use
- Building a docker image from our app code
- Using docker-compose to run multi container, multi-tenant apps
- The final docker-compose.yaml

Tying it all together
- Launching new tenants
- A comparison of trade-offs of various methods
- What method should I use?

Third party apps
- Open source Django multi tenancy apps
- A tour of django-tenant-schemas

45 pages, Kindle Edition

Published July 29, 2018

1 person is currently reading
4 people want to read

About the author

Shabda Raaj

13 books9 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
1 (50%)
4 stars
1 (50%)
3 stars
0 (0%)
2 stars
0 (0%)
1 star
0 (0%)
No one has reviewed this book yet.

Can't find what you're looking for?

Get help and learn more about the design.