Day 16: One Shared Exit to the Internet Runs Out of Ports
Illustrative interview practice. Generic company names and hostnames do not represent any specific organization.
Scenario
Interviewer Your servers sit in a private network and reach outside services through a NAT gateway. At busy times their outgoing calls time out while connecting. Processor and memory look normal, and a restart helps for a few minutes. What is going on, and why do retries make it worse?
In plain words
Many servers are kept off the public internet for safety. When one of them needs to call something outside, such as a payment provider, the call leaves through one shared exit.
The question asks what can run short at that exit when the servers themselves are fine. It also asks why trying again, which feels helpful, adds to the trouble. You are expected to name what to measure and two or three fixes.
Words you need
| Word | What it means |
|---|---|
| Private network | A group of servers with addresses that the public internet cannot reach directly. |
| NAT gateway | The shared exit. It sends each outgoing call on under its own public address, and passes the reply back to the right server. |
| Port | A number attached to each connection so replies can be matched to it. There are about 65,000 of them per address. |
| Retry | Sending a request again after it failed or took too long. |
| Connection pool | A small set of connections a program keeps open and reuses, so it does not open a new one for every call. |
Your answer
2:00
Observe → Hypothesise → Investigate → Mitigate → Prevent. The timer is optional; your answer is not auto-submitted.
0 / 20,000 characters · Not saved