Most SaaS architecture decisions that cause pain three years in were made in the first three weeks. The choices feel low-stakes when you have 10 users. They become load-bearing walls when you have 10,000.
Multi-Tenancy: Shared Database vs Separate Schemas
The shared database approach (all tenants in one schema, distinguished by tenant_id) is simpler to build and cheaper to run at scale. Separate schemas or databases per tenant provide stronger isolation and easier per-tenant backups, but dramatically increase operational complexity. For most B2B SaaS products, shared database with row-level security is the right default — migrate to schema-based isolation only if you have enterprise customers with hard compliance requirements.
Queues From Day One
Every long-running or potentially-failing operation — sending emails, generating reports, processing uploads, calling third-party APIs — should go into a queue. This is non-negotiable. The cost of retrofitting a queue-based architecture onto a synchronous codebase is enormous. Laravel Horizon on Redis is our default recommendation: it's production-ready, visible, and easy to reason about.
Caching Strategy
Cache at the right layer. Don't cache everything — cache the things that are expensive to compute and frequently accessed. For SaaS dashboards, this typically means: aggregate metrics (recomputed on a schedule), permission checks (invalidated on role changes), and rendered partials (invalidated on entity updates). Use cache tags to enable granular invalidation.
API Design for Frontend Teams
If your frontend and backend are separate teams (or will be), invest in your API contract early. Document with OpenAPI, version from day one (/api/v1/), and treat breaking changes with the same seriousness as database migrations. The 30 minutes spent designing an endpoint well saves days of debugging miscommunication.
Observability Is Not Optional
You can't optimise what you can't see. From the first day in production, you should have structured logging (Papertrail or Logtail), error tracking (Sentry), and performance monitoring (Telescope in dev, New Relic or Datadog in production). The cost is low; the insight is invaluable.