Scaling a Last-Mile Delivery Platform's Node.js APIs to 5× Traffic With Lower Latency
Nevix Technologies re-architected the Node.js backend of a UAE-based last-mile delivery startup. By restructuring a strained monolith into well-bounded services with caching, a GraphQL gateway, and tuned database access, the platform now handles roughly 5× peak traffic with 63% lower p95 latency and 35% lower infrastructure cost.
5×
Peak traffic capacity without degradation
−63%
p95 latency on critical endpoints
−35%
Infrastructure cost at higher load
99.95%
API uptime post-launch
The challenge
The startup's backend had been built fast to reach the market, and it worked — until it didn't. During promotions and peak delivery windows, response times climbed, the database became a bottleneck, and timeouts cascaded across the customer app, courier app, and merchant dashboard. The team was firefighting instead of shipping.
- Single monolithic API where one slow endpoint degraded everything
- Database overload during peak windows and marketing pushes
- p95 latency above 1.2s on critical order and tracking endpoints
- No clear API contract, making the mobile and web teams slower
Our approach
- 1
Architecture and bottleneck review
We profiled production traffic, identified the hot paths and slow queries, and agreed clear service boundaries around orders, tracking, couriers, and merchants.
- 2
Refactor into bounded Node.js services
We incrementally extracted high-load domains into focused Node.js services with clean responsibilities, so traffic spikes in one area no longer took down the rest.
- 3
Caching and database tuning
We added Redis caching for hot reads, introduced read replicas, and rewrote the worst queries with proper indexing and pagination to take sustained load off the primary database.
- 4
GraphQL gateway and API contracts
A GraphQL gateway gave the mobile and web teams a single, well-documented contract, reducing over-fetching and the number of round trips the apps had to make.
- 5
Authentication, observability, and handoff
We hardened authentication and authorization, added metrics, tracing, and alerting so issues are caught before customers feel them, and handed over full source, schema, and documentation.
Technology stack
The tools and technologies we used to deliver this engagement.
- Node.js
- TypeScript
- GraphQL
- REST
- PostgreSQL
- Redis
- Docker
- OpenTelemetry
The outcome
Promotions stopped being a source of dread. The platform now absorbs peak-hour and campaign traffic smoothly, the apps feel faster for couriers and customers alike, and the engineering team ships features against clean API contracts instead of patching production fires. The startup retained full ownership of the source code and documentation.
“Before, a big promo meant someone watching dashboards at midnight. Now we run them without thinking twice. The platform just holds.”
Representative project. The client identity is anonymized to respect confidentiality; details illustrate our typical approach and results.
FAQ
Frequently asked questions.
Common questions about this engagement. Have something else? Reach out.
We split the strained monolith into bounded Node.js services, added Redis caching and read replicas, tuned the heaviest database queries, and introduced a GraphQL gateway — so peak and promotional traffic no longer overloaded a single point.
Related service
Scalable Node.js Backend APIs
More case studies