title: optimal architecture for multitenant application on django
body: <p>I've been brooding over the right/optimal way to create a multitenancy application based
  on Django.</p>
  
  <p>Some explanation:</p>
  
  <ul>
  <li><p>Application can be used by several tenants (tenant1, tenant2, ...,). </p></li>
  <li><p>All tenant-individual data has to be secured against access of other tenants (and their users).</p></li>
  <li><p>Optionally tenants can create additional custom-fields for application-objects.</p></li>
  <li><p>Of course, underlying hardware limits number of tenants on one "system".</p></li>
  </ul>
  
  <p>1) Separating each tenant by e.g. sub-domain and using tenant-specific databases in the underlying layer</p>
  
  <p>2) Using some tenant-ID in the model to separate the tenant-data in the database</p>
  
  <p>I am thinking about deployment-processes, performance of the system-parts (web-server(s), database-server(s), working-node(s),...)</p>
  
  <p>What would be the best setup ?  Where are the pro's and con's?</p>
  
  <p>What do you think?</p>