Frontend
A 180 KB gzipped monolith parsed slowly on mid-range mobile, then generated more API calls while users waited.
Case study / 01
A 48-hour global campaign, three traffic peaks and a checkout that could not fail. This is the architecture, the trade-offs and the measured result — without the client name, which is under NDA.
The campaign had a 48-hour activation window with three 30-minute peaks every 12 hours. The original stack was Laravel 9 + Vue 2, MySQL and synchronous payments.
The estimate was ~2,000 req/min. The real peak was 15,000 req/min — 7.5× the plan — with 1,200 payments per minute and 65% of traffic on mobile.
The failure was a cascade. Fixing only PHP-FPM would have moved the outage, not removed it.
A 180 KB gzipped monolith parsed slowly on mid-range mobile, then generated more API calls while users waited.
Every request hit campaign config, catalog and stock. The data changed, but not every second.
Synchronous provider calls blocked PHP-FPM workers. At 1,200 payments/min, the pool exhausted in seconds.
Vue 3 route chunks on the client; Redis layers in front of read-heavy data; payments move to dedicated queues with idempotency keys.
The campaign shell stayed in the initial bundle; admin, analytics and secondary routes became lazy chunks. Suspense handled loading states without blocking first paint.
FCP 3.2 → 1.8 s · TTI 5.1 → 2.9 s · Lighthouse 58 → 92
Config 300 s, catalog 120 s, live results deliberately uncached. Invalidation on stock changes; no blanket cache.
p95 52 → 4 ms and 84 → 6 ms · API p95 180 → 120 ms
The request creates a pending payment and returns 202; a dedicated queue calls the provider with retries and backoff. Status polling keeps the UI responsive.
API p95 2.8 s → 180 ms · PHP-FPM workers 100% → <15%
Build and migrate in the inactive environment, run tests and health checks, switch Nginx atomically, verify, roll back if the post-switch check fails.
Deploy is not the risky part; an unverified deploy is.
Dashboards tracked p95 by endpoint, queue depth, payment status and CDN behaviour. Alerts were tied to user impact, not CPU.
CDN · API p95 · queue depth · payment failure rate
| Metric | Result | Context |
|---|---|---|
| Peak traffic | 15,000 req/min | 7.5× the original estimate |
| p95 latency | 118 ms | critical path |
| Uptime | 99.9% | 48-hour campaign |
| Critical incidents | 0 | during the campaign |
| Failed payments | 0.3% | down from 12% |
| Bundle size | 95 KB | gzip, down 47% |
I worked on the backend architecture, the Vue 3 migration, the payment queue and the deployment path. The client name and commercial details are under NDA. I can discuss the technical decisions and the parts that transfer to your team.
I am available for remote Laravel/PHP/Vue roles, contracts and team augmentation from Barcelona.