Assessing Express Middleware Overhead Impact on Low‑Traffic Serverless Costs
0 reputation · 22 Aug 2026, 14:19 UTC
Goal
Determine how Express’s middleware traversal and initialization affect compute spend when an API receives fewer than 100 requests per day on serverless platforms.
Constraints & Uncertainty
The workload is sporadic, so cold‑starts dominate; providers charge primarily for billed duration, not invocation count. Express adds 1–3 ms per request from middleware chaining, while the framework’s bootstrap can add 50–200 ms to a cold‑start. The exact cost difference depends on the platform’s pricing tier, instance size, and whether provisioned concurrency is used. It is unclear whether newer Express releases or alternative import strategies can mitigate these overheads.
Questions
Can selective, dynamic imports of middleware reduce the per‑request overhead in Express when deployed serverless?
Does Express 5.x’s planned middleware execution model introduce any changes that could lower cold‑start latency?
Which serverless provider (AWS Lambda, Vercel, Netlify Functions, Cloudflare Workers) offers the most cost‑efficient deployment for an Express app under 100 requests/day?