A batch-processing service makes thousands of simultaneous outbound API calls from a fleet of VMs that have no external IP addresses, and some calls fail with port exhaustion errors. Which Cloud NAT setting should the team adjust so each VM receives more source ports?
Show answer and explanation
Answer: D
Cloud NAT allocates source ports to each VM from the NAT IP addresses. The minimum ports per VM sets the baseline allocation, and raising it gives busy VMs more concurrent translations. The default is 64 ports per VM. Adding NAT IP addresses increases the shared pool, but it does not change the per-VM baseline. Idle timeout controls how long unused translations remain, and Endpoint-Independent Mapping affects how mappings are reused, so neither directly increases a VM's port allotment.
Why the other options are wrong
- A. Adding NAT IP addresses expands the shared pool, but the per-VM port baseline is a separate setting. The symptom described is a per-VM allocation limit, which the minimum ports parameter controls.
- B. Idle connection timeout decides how long inactive translations are kept. Changing it affects how ports are reused over time, not the baseline number of ports each VM is given.
- C. Endpoint-Independent Mapping governs how NAT maps a source port to remote endpoints. It affects connection behavior for some protocols but not how many ports each VM receives.