You have deployed Azure NAT Gateway and during peak hours, you realized that some of your users are getting connection errors due to failed SNAT connections. How will you resolve this?
Answer
Add a public IP address. This way more connections can be created.
With each new connection to the same destination IP and port, a new source port is used. A new source port is necessary so that each connection can be distinguished from one another. SNAT port exhaustion is an all too easy issue to encounter with recurring connections going to the same destination endpoint since a different source port must be used for each new connection.
NAT gateway solves the problem of SNAT port exhaustion by providing a dynamic pool of SNAT ports, consumable by all virtual machines in its associated subnets. This means that customers don’t need to worry about knowing the traffic patterns of their individual virtual machines since ports are not pool-based in fixed amounts to each virtual machine. By providing SNAT ports on-demand to virtual machines, the risk of SNAT exhaustion is significantly reduced, which in turn helps prevent connection failures.
Customers can ensure that they have enough SNAT ports for connecting outbound by scaling their NAT gateway with public IP addresses. Each NAT gateway public IP address provides 64,512 SNAT ports, and NAT gateway can scale to use up to 16 public IP addresses. This means that NAT gateway can provide over one million SNAT ports for connecting outbound.
Related Azure Cloud job interview questions
What VPN types does Azure VPN Gateway support?
Azure CloudAzure virtual network gateway JuniorWhat gateway types does Azure VPN Gateway support?
Azure CloudAzure virtual network gateway JuniorHow bot protection feature helps in Azure Application Gateway Web Application Firewall (WAF)?
Azure Application Gateway JuniorWhat SKUs does Azure Application Gateway Web Application Firewall (WAF) have?
Azure Application Gateway JuniorWhat is the detection policy mode in Application Gateway Web Application Firewall (WAF)?
Azure Application Gateway Junior