Skip to content

Commit 82ec361

Browse files
idle timeout
1 parent 9af5d5c commit 82ec361

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

articles/virtual-network/nat-gateway-resource.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ ms.devlang: na
1313
ms.topic: overview
1414
ms.tgt_pltfrm: na
1515
ms.workload: infrastructure-services
16-
ms.date: 03/14/2020
16+
ms.date: 03/30/2020
1717
ms.author: allensu
1818
---
1919

@@ -35,7 +35,7 @@ Configuring and using NAT gateway is intentionally made simple:
3535
NAT gateway resource:
3636
- Create regional or zonal (zone-isolated) NAT gateway resource,
3737
- Assign IP addresses,
38-
- Modify TCP idle timeout (optional).
38+
- If necessary, modify TCP idle timeout (optional). Review [timers](#timers) <ins>before</ins> you change the default.
3939

4040
Virtual network:
4141
- Configure virtual network subnet to use a NAT gateway.
@@ -180,21 +180,23 @@ Even without availability zones, NAT is resilient and can survive multiple infra
180180
<img src="media/nat-overview/az-directions.svg" width="425" title="Virtual Network NAT with availability zones">
181181
</p>
182182

183-
*Figure: Virtual Network NAT with availability zones*
183+
*Figure: Virtual Network NAT with zone isolation*
184184

185185
A zone-isolated NAT gateway requires IP addresses to match the zone of the NAT gateway. NAT gateway resources with IP addresses from a different zone or without a zone are unsupported.
186186

187187
Virtual networks and subnets are regional and not zonal aligned. A VM must be in the same zone as NAT gateway for a zonal promise of outbound connections. Zone isolation is created by creating a zonal "stack" per availability zone. A zonal promise won't exist when crossing zones of a zonal NAT gateway or using a regional NAT gateway with zonal VMs.
188188

189-
When you deploy virtual machine scale sets to use with NAT, you deploy a zonal scale set on its own subnet and attach the matching zone NAT gateway to that subnet. If you use zone-spanning scale sets (a scale set in two or more zones), NAT won't provide a zonal promise. NAT doesn't support zone-redundancy. Only regional or zone-isolation is supported.
190189

191190
<p align="center">
192191
<img src="media/nat-overview/az-directions2.svg" width="425" title="zone-spanning Virtual Network NAT">
193192
</p>
194193

195-
*Figure: Zone-spanning Virtual Network NAT*
194+
*Figure: Virtual Network NAT not compatible with zone-spanning subnet*
196195

197-
The zones property isn't mutable. Redeploy NAT gateway resource with the intended regional or zone preference.
196+
Virtual Network NAT is unable to provide a zonal promise with a zone-spanning subnet. NAT doesn't support zone-redundancy and does not replicate flow state across zones. Use zone-isolation instead.
197+
198+
>[!NOTE]
199+
>The zones property of a NAT gateway resource isn't mutable. Redeploy NAT gateway resource with the intended regional or zone preference.
198200
199201
>[!NOTE]
200202
>IP addresses by themselves aren't zone-redundant if no zone is specified. The frontend of a [Standard Load Balancer is zone-redundant](../load-balancer/load-balancer-standard-availability-zones.md#frontend) if an IP address isn't created in a specific zone. This doesn't apply to NAT. Only regional or zone-isolation is supported.
@@ -265,6 +267,9 @@ NAT gateway resources interact with IP and IP transport headers of UDP and TCP f
265267

266268
### Timers
267269

270+
>[!IMPORTANT]
271+
>Long idle timers can unnecessarily increase likelihood of SNAT exhaustion. The longer of a timer you specify, the longer NAT will hold on to SNAT ports until they eventually idle timeout. If your flows are idle timed out, they will fail eventually anyway and unnecessarily consume SNAT port inventory. Flows that fails at 2 hours would have failed at the default 4 minutes as well. Increasing the idle timeout is a last resort option that should be used sparingly. If a flow never does go idle, it will not be impacted by these timers.
272+
268273
TCP idle timeout can be adjusted from 4 minutes (default) to 120 minutes (2 hours) for all flows. Additionally, you can reset the idle timer with traffic on the flow. A recommended pattern for refreshing long idle connections and endpoint liveness detection is TCP keepalives. TCP keepalives appear as duplicate ACKs to the endpoints, are low overhead, and invisible to the application layer.
269274

270275
The following timers are used for SNAT port release:
@@ -290,7 +295,7 @@ A SNAT port is available for reuse to the same destination IP address and destin
290295

291296
## Feedback
292297

293-
We want to know how we can improve the service. Propose and vote on what we should build next at [UserVoice for NAT](https://aka.ms/natuservoice).
298+
We want to know how we can improve the service. Are missing a capability? Make your case for what we should build next at [UserVoice for NAT](https://aka.ms/natuservoice).
294299

295300
## Next steps
296301

@@ -310,9 +315,9 @@ We want to know how we can improve the service. Propose and vote on what we shou
310315
- [REST API](https://docs.microsoft.com/rest/api/virtualnetwork/natgateways)
311316
- [Azure CLI](https://docs.microsoft.com/cli/azure/network/nat/gateway?view=azure-cli-latest)
312317
- [PowerShell](https://docs.microsoft.com/powershell/module/az.network/new-aznatgateway)
313-
314318
* Learn about [availability zones](../availability-zones/az-overview.md).
315319
* Learn about [standard load balancer](../load-balancer/load-balancer-standard-overview.md).
316320
* Learn about [availability zones and standard load balancer](../load-balancer/load-balancer-standard-availability-zones.md).
321+
* [Tell us what to build next for Virtual Network NAT in UserVoice](https://aka.ms/natuservoice).
317322

318323

0 commit comments

Comments
 (0)