Scaling a PHP ERP from 80 to 1,000+ Concurrent Users
Client: Enterprise Client — Onest Tech LLC · Industry: Enterprise Software / Manufacturing · Role: Tech Lead · Duration: 6 weeks
The Challenge
The flagship ERP product was hitting a ceiling at ~80 concurrent users. Response times degraded sharply under load, and the instinct from stakeholders was to rewrite the entire system in microservices — a 12-month project. As Tech Lead, I pushed back and proposed a profiling-first approach before any architectural changes.
The Solution
Three weeks of profiling with EXPLAIN ANALYZE and APM tooling revealed that 80% of latency came from N+1 query patterns in the inventory module — not the architecture. We addressed this in four phases: (1) fixed N+1 queries with eager loading and query batching, (2) added Redis caching at two layers with appropriate TTLs, (3) moved PHP session storage from disk to Redis to enable stateless horizontal scaling, (4) added a second app server behind Nginx load balancer. The entire effort took 6 weeks.
Results & Impact
- Scaled from 80 to 1,000+ concurrent users without a rewrite
- p95 response time reduced from 3.2s to under 400ms
- Database load reduced by 40% through caching and query optimization
- Zero downtime during migration — all changes deployed incrementally
- Saved an estimated 10+ months of rewrite effort