Performance: Request size limits
HIGH IMPACT
This affects how quickly the server can process incoming requests and prevents large payloads from slowing down or crashing the server.
app.use(express.json({ limit: '100kb' }));app.use(express.json()); // no size limit set| Pattern | Memory Usage | Event Loop Blocking | Response Time Impact | Verdict |
|---|---|---|---|---|
| No size limit on request body | High (unbounded) | High (can block event loop) | Increases with payload size | [X] Bad |
| Request size limit set (e.g., 100kb) | Controlled and low | Minimal blocking | Stable and fast | [OK] Good |