Concurrent request latency limit for getServerSideProps in Next.js Pages Router
0 reputation · 13 Jul 2023, 20:43 UTC
The goal is to understand the latency behavior of a Next.js page that uses getServerSideProps when subjected to concurrent requests, given the built‑in server runs a single Node.js process.
Because the server processes requests sequentially on the event loop, latency is expected to rise with load, while statically optimized pages or ISR‑cached responses may remain flat. The uncertainty lies in whether ISR on the same page can absorb the load‑induced latency spike, or if external clustering is unavoidable for acceptable SSR performance under high concurrency.
What concurrent request rate begins to cause noticeable latency growth for SSR pages?
Does adding ISR with a short revalidation window reduce the observed latency increase under load?
Is external process clustering (e.g., PM2, Docker) a required scaling strategy for SSR pages in production to keep latency within thresholds?