Latency spikes under concurrent requests when Nuxt 3 routeRules cache expires
0 reputation · 03 Sept 2021, 16:16 UTC
Goal: Determine the concurrent request volume at which a Nuxt 3 application experiences measurable latency increase when a routeRules cache entry expires and no request‑coalescing mechanism is in place.
Constraints: Using Nuxt 3 (≥3.8) with a routeRule that defines maxAge and staleWhileRevalidate, running on a Node.js server preset, and without custom middleware or useFetch cache deduplication. The environment should mirror production load‑testing conditions.
Questions: What approximate number of simultaneous requests triggers a noticeable latency spike right after cache expiry? Does enabling staleWhileRevalidate reduce the spike, and at what concurrency level does it become ineffective? Are there specific maxAge or swr values that can limit the stampede effect while keeping content freshness within acceptable bounds?