SaaS
Lessons learned from architecting and maintaining large-scale B2B SaaS platforms handling millions of requests.
Building a CRM for a single business is a solved problem. Building one that serves dozens of enterprise clients simultaneously, with their own data isolation requirements, integration landscapes, and performance expectations — that is where things get genuinely interesting.
We chose a shared database, separate schema approach which gave us the right balance of isolation and operational simplicity for our scale. This would have been the wrong call at either extreme of the tenant count spectrum.
The most impactful optimisation across the project was not algorithmic — it was query analysis. Laravel's query log in development and slow query logging in production revealed N+1 problems and missing indices that were costing hundreds of milliseconds per request. Systematic attention to the database layer returned more than any application-level optimisation.