Skip to content

Commit 94b53bd

Browse files
committed
configure behavior
1 parent 7315f12 commit 94b53bd

File tree

1 file changed

+20
-3
lines changed

1 file changed

+20
-3
lines changed

articles/app-service/overview-name-resolution.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,11 @@ Your app uses DNS when making calls to dependent resources. Resources could be A
1313

1414
## How name resolution works in App Service
1515

16-
If your app isn't integrated with a virtual network and you haven't configured custom DNS, your app will use [Azure DNS](../virtual-network/virtual-networks-name-resolution-for-vms-and-role-instances.md#azure-provided-name-resolution). If your app is integrated with a virtual network, your app will use the DNS configuration of the virtual network. The default for virtual network is also to use Azure DNS, but through the virtual network it's also possible to link to [Azure DNS private zones](../dns/private-dns-overview.md) and use that for private endpoint resolution or private domain name resolutions. From your virtual network, you would also inherit any custom DNS servers configured. If your virtual network is using custom DNS servers and you're using private endpoints, you should read [this article](../private-link/private-endpoint-dns.md) carefully.
16+
If your app isn't integrated with a virtual network and you haven't configured custom DNS, your app will use [Azure DNS](../virtual-network/virtual-networks-name-resolution-for-vms-and-role-instances.md#azure-provided-name-resolution). If your app is integrated with a virtual network, your app uses the DNS configuration of the virtual network. The default for virtual network is also to use Azure DNS, but through the virtual network it's also possible to link to [Azure DNS private zones](../dns/private-dns-overview.md) and use that for private endpoint resolution or private domain name resolution.
1717

18-
The individual app will also allow you to override the DNS configuration by specifying the `dnsServers` property in the `dnsConfiguration` site property object. You can specify up to five custom DNS servers. Custom DNS servers can be configured using the Azure CLI.
18+
If your virtual network is configured with a list of custom DNS servers, name resolution will use these servers. If your virtual network is using custom DNS servers and you're using private endpoints, you should read [this article](../private-link/private-endpoint-dns.md) carefully. You'll also need to consider that your custom DNS servers will have to resolve any public DNS records need for your app either by forwarding requests to a public DNS server including Azure DNS in the list of custom DNS servers.
19+
20+
The individual app allows you to override the DNS configuration by specifying the `dnsServers` property in the `dnsConfiguration` site property object. You can specify up to five custom DNS servers. Custom DNS servers can be configured using the Azure CLI.
1921

2022
```azurecli-interactive
2123
az resource update --resource-group <group-name> --name <app-name> --resource-type "Microsoft.Web/sites" --set properties.dnsConfiguration.dnsServers="['168.63.169.16','1.1.1.1']"
@@ -43,10 +45,25 @@ az resource show --resource-group <group-name> --name <app-name> --resource-type
4345

4446
If you require fine-grained control over name resolution, App Service allows you to modify the default behavior. We allow you to modify retry attempts, retry timeout and cache timeout. Default timeout for retry attempts is 3 seconds, and you can configure it from 1-30 seconds. Default retry count is 1, but you can configure up to five retry attempts. DNS Cache timeout can be configured from 0-60 seconds. Default is 30 seconds and 0 means caching is disabled. Disabling or lowering cache duration may impact performance.
4547

48+
>[!NOTE]
49+
> Windows Container apps currently does not support changing the name resolution behavior.
50+
51+
Configure the name resolution behavior by using these CLI commands:
52+
4653
```azurecli-interactive
47-
az resource update --resource-group <group-name> --name <app-name> --set properties.dnsConfiguration. --resource-type "Microsoft.Web/sites"
54+
az resource update --resource-group <group-name> --name <app-name> --set properties.dnsConfiguration.dnsMaxCacheTimeout=[0-60] --resource-type "Microsoft.Web/sites"
55+
az resource update --resource-group <group-name> --name <app-name> --set properties.dnsConfiguration.dnsRetryAttemptCount=[1-5] --resource-type "Microsoft.Web/sites"
56+
az resource update --resource-group <group-name> --name <app-name> --set properties.dnsConfiguration.dnsRetryAttemptTimeout=[1-30] --resource-type "Microsoft.Web/sites"
4857
```
4958

59+
Validate the settings by using this CLI command:
60+
61+
```azurecli-interactive
62+
az resource show --resource-group <group-name> --name <app-name> --query properties.dnsConfiguration --resource-type "Microsoft.Web/sites"
63+
```
64+
65+
66+
5067
## Next steps
5168

5269
- [Configure virtual network integration](./configure-vnet-integration-enable.md.md)

0 commit comments

Comments
 (0)