Why do request timeouts belong at nginx and in Node?
PICTURE THIS: JAVASCRIPT EVENT LOOP
Simple meaning
A proxy timeout stops hung clients from holding sockets forever.
WHY — Express instead of guessing?
Why interviewers care about Express:
on Express.
the situation, the default choice, and one exception - that reads as experience.
Name the idea, why it exists, then one short example.
End with when you use it and one common pitfall.
STEPS — What happens step by step?
Before you speak the answer, walk the interviewer through these steps:
- 1A proxy timeout stops
hung clients from holding sockets forever.
- 2An application timeout stops
a stuck MongoDB query from tying up the event loop indefinitely.
- 3How it works
They should be aligned
- 4a 60s nginx timeout
with no Node timeout still wastes worker capacity.
- 5Common mistake
What juniors usually get wrong.
- 6Close
When you pick this over the alternative.
EXAMPLE — See it in action
Here's a short line you can speak, broken into clear beats:
Note: Adapt this scaffold to your own project — keep it under 60–90 seconds.
Key takeaway
A proxy timeout stops hung clients from holding sockets forever. An application timeout stops a stuck MongoDB query from tying up the event loop indefinitely.