SaaS Laravel 11

Scaling a SaaS Platform from 200 to 12,000 Daily Users

Timeline: 6 Weeks

The Problem

A Singapore-based SaaS analytics platform was struggling to serve more than 200 concurrent users before page loads degraded to 8+ seconds. After a successful product launch, user acquisition accelerated but the infrastructure buckled under the load. The founding team faced pressure from investors to scale rapidly or risk losing early traction.

The Challenge

The application was querying the database on every page load without any caching layer. N+1 query patterns were rampant across the reporting module — a single dashboard page was generating over 900 SQL queries. The application server had no horizontal scaling strategy, and static assets were being served directly from the same server as PHP-FPM, consuming I/O bandwidth.

Our Solution

We performed a full architectural overhaul in two phases:

Phase 1 — Query Optimisation:
• Used Laravel Debugbar and Clockwork to map all N+1 violations
• Refactored dashboard queries to eager-load with with() and withCount()
• Reduced the heaviest dashboard page from 910 queries to 7
• Added Redis tag-based caching for all reporting aggregations (TTL: 5 minutes)

Phase 2 — Infrastructure Scaling:
• Migrated static assets to CloudFront CDN
• Deployed a horizontally scalable ECS Fargate cluster behind an ALB
• Configured read replicas on RDS Aurora for reporting queries
• Set up autoscaling from 2 to 20 containers based on CPU thresholds

The Result

After deployment, average dashboard load time dropped from 8.2 seconds to 340 milliseconds — a 96% improvement. The platform now comfortably handles 12,000+ daily active users with zero manual intervention. Infrastructure cost actually dropped by 18% due to efficient resource utilisation under the new autoscaling model.