title: saas architecture for lamp based crm application
body: <p>This will look like range of questions but all are related to SaaS and PHP based application we have been building. We are conscious about our application architecture and studying it so that we ensure to encounter all essential techniques before we move to production and do not face any failure.!</p>
  
  <p>To support SaaS we have decided to make our database multi-tenant where each customer will have its own database.  My mind is boggling around following list of questions further.</p>
  
  <ul>
  <li><p>How to provide ability to customize a SaaS multi-tenant application to suit individual tenant needs?</p></li>
  <li><p>How to ensure security of each tenant database so that they do not access each other's data accidently?</p></li>
  <li><p>What are clusters and how do we add new instances of application and database to them in case of increasing no. of customers?</p></li>
  <li><p>What do we do to ensure performance and scalability of SaaS website?</p></li>
  <li><p>How do we handle failures of SaaS application, especially when we launch new versions and updates, (continuous integration)?</p></li>
  <li><p>Any special solutions for handling subscribers/customers and permissions of activated and deactivated modules in SaaS application?</p></li>
  </ul>
  
  <p><a href="http://i.stack.imgur.com/micgQ.png" rel="nofollow">I have attached block diagram of DB we have decided to go with</a></p>