{"slug":"azure-reference-architecture","title":"Azure reference architecture","tags":["tailscale"],"agent_summary":"Last validated: Jan 5, 2026","trigger_phrases":[],"runnable":false,"markdown":"\r\n# Azure reference architecture\r\n\r\nLast validated: Jan 5, 2026\r\n\r\nThis document details best practices and a reference architecture for Tailscale deployments on Microsoft Azure. The following guidance applies for all Tailscale modes of operation—such as devices, exit nodes, and subnet routers.\r\n\r\n**Tailscale device**—for the purposes of this document Tailscale device can refer to a Tailscale node, exit node, subnet router, and the like. Refer to [Terminology and concepts](https://tailscale.com/docs/reference/glossary) for additional terms.\r\n\r\n## [High-level architecture](https://tailscale.com/docs/reference/reference-architectures/azure\\#high-level-architecture)\r\n\r\n![Potential deployments of Tailscale to access Azure resources](https://tailscale.com/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fazure-reference-architecture.98492d65.png&w=3840&q=75)\r\n\r\n## [Ways to deploy Tailscale to connect to and from Azure resources](https://tailscale.com/docs/reference/reference-architectures/azure\\#ways-to-deploy-tailscale-to-connect-to-and-from-azure-resources)\r\n\r\nTailscale provides a few options for connecting to resources within Azure. At a high-level they are:\r\n\r\n- **[Agent-to-Agent connectivity](https://tailscale.com/docs/reference/reference-architectures/azure#agent-to-agent-connectivity)**—connect to \"static\" resources such as virtual machines (VMs). This is recommended where you can install and run Tailscale directly on the resource you wish to connect to.\r\n- **[IP-based connectivity with a Tailscale subnet router](https://tailscale.com/docs/reference/reference-architectures/azure#ip-based-connectivity-with-subnet-router)**—connect to managed Azure resources (such as Azure SQL or Azure Cosmos DB). This is recommended where you cannot run Tailscale on the resource you are connecting to, or want to expose an existing [subnet](https://tailscale.com/docs/features/subnet-routers) or services in a virtual network to your tailnet.\r\n- **[DNS-based routing with a Tailscale app connector](https://tailscale.com/docs/reference/reference-architectures/azure#dns-based-routing-with-an-app-connector)**—connect to software as a service (SaaS) applications or other resources over your tailnet with DNS-based routing.\r\n- **[Kubernetes services and auth proxy with the Tailscale Kubernetes Operator](https://tailscale.com/docs/reference/reference-architectures/azure#kubernetes-services-and-api-server-proxy-with-tailscale-kubernetes-operator)**—expose services in your Azure Kubernetes Service (AKS) cluster and your AKS cluster control plane directly to your Tailscale network. This is recommended where you are connecting to resources running in a Kubernetes cluster, or to a Kubernetes cluster's control plane.\r\n- **[Azure Functions, Azure App Service, and other container solutions](https://tailscale.com/docs/reference/reference-architectures/azure#azure-functions-azure-app-service-and-other-container-solutions)**—access resources in your tailnet from Azure Functions, Azure App Service, and other container solutions.\r\n\r\n### [Agent-to-Agent connectivity](https://tailscale.com/docs/reference/reference-architectures/azure\\#agent-to-agent-connectivity)\r\n\r\nWe recommend [installing the Tailscale agent](https://tailscale.com/docs/install) wherever possible—for example, [setting up servers](https://tailscale.com/docs/how-to/set-up-servers) on Azure VMs. This generally provides the best and most scalable connectivity while enabling Tailscale agent-based functionality such as Tailscale SSH.\r\n\r\nRefer to [Access Azure Linux VMs privately using Tailscale](https://tailscale.com/docs/install/cloud/azure/linux) and [Access Azure Windows VMs privately using Tailscale](https://tailscale.com/docs/install/cloud/azure/windows) for general guides.\r\n\r\n### [IP-based connectivity with subnet router](https://tailscale.com/docs/reference/reference-architectures/azure\\#ip-based-connectivity-with-subnet-router)\r\n\r\nFor managed resources where you cannot install the Tailscale agent, such as Azure SQL or Azure Cosmos DB, you can run a [subnet router](https://tailscale.com/docs/features/subnet-routers) within your virtual network to access these resources from Tailscale.\r\n\r\n### [DNS-based routing with an app connector](https://tailscale.com/docs/reference/reference-architectures/azure\\#dns-based-routing-with-an-app-connector)\r\n\r\n[App connectors](https://tailscale.com/docs/features/app-connectors) let you route traffic bound for SaaS applications or managed services by proxying DNS for the target domains and advertising the subnet routes for the observed DNS results. This is useful for cases where the application has an allowlist of IP addresses which can connect to it; the IP addresses of the nodes running an app connector can be added to the allowlist, and all nodes in the tailnet will use that IP address for their traffic egress.\r\n\r\n### [Kubernetes services and API server proxy with Tailscale Kubernetes Operator](https://tailscale.com/docs/reference/reference-architectures/azure\\#kubernetes-services-and-api-server-proxy-with-tailscale-kubernetes-operator)\r\n\r\nThe [Tailscale Kubernetes Operator](https://tailscale.com/docs/features/kubernetes-operator) lets you expose services in your Kubernetes cluster to your Tailscale network, and use an API server proxy for secure connectivity to the Kubernetes control plane.\r\n\r\n### [Azure Functions, Azure App Service, and other container solutions](https://tailscale.com/docs/reference/reference-architectures/azure\\#azure-functions-azure-app-service-and-other-container-solutions)\r\n\r\nTailscale supports [userspace networking](https://tailscale.com/docs/concepts/userspace-networking) where processes in the container can connect to other resources on your Tailscale network by using a SOCKS5 or HTTP proxy. This lets [Azure Functions](https://azure.microsoft.com/en-us/products/functions), [Azure App Service](https://azure.microsoft.com/en-us/products/app-service), and other container-based solutions to connect to the Tailscale network with minimal configuration needed.\r\n\r\nRefer to [Using Tailscale on Azure App Service](https://tailscale.com/docs/install/cloud/azure/azure-app-service) for a general guide.\r\n\r\n## [Production best practices](https://tailscale.com/docs/reference/reference-architectures/azure\\#production-best-practices)\r\n\r\nBelow are general recommendations and best practices for running Tailscale in production environments. Much of what is listed below is explained in greater detail throughout this document:\r\n\r\n- When possible deploy [subnet routers](https://tailscale.com/docs/features/subnet-routers), [exit nodes](https://tailscale.com/docs/features/exit-nodes), [app connectors](https://tailscale.com/docs/features/app-connectors), and the like, to public subnets with public IP addresses to ensure [direct connections](https://tailscale.com/docs/reference/connection-types) and optimal performance.\r\n- Run subnet routers, exit nodes, app connectors, and the like, separately from the systems you are administering with Tailscale—for example, run your subnet routers outside of your Azure AKS clusters.\r\n- Deploy dynamically scaled resources (for example, containers or serverless functions) as [ephemeral nodes](https://tailscale.com/docs/features/ephemeral-nodes) to automatically clean up devices after they shut down.\r\n\r\n### [High availability and regional routing](https://tailscale.com/docs/reference/reference-architectures/azure\\#high-availability-and-regional-routing)\r\n\r\n- Run multiple [subnet routers](https://tailscale.com/docs/features/subnet-routers) and [app connectors](https://tailscale.com/docs/features/app-connectors) across multiple Azure availability zones to improve resiliency against zone failures with [high availability failover](https://tailscale.com/docs/how-to/set-up-high-availability) and deploy across multiple regions for [regional routing](https://tailscale.com/docs/how-to/set-up-high-availability#regional-routing).\r\n- Run multiple Tailscale SSH session recorder nodes across multiple Azure availability zones to improve resiliency against zone failures with [recorder node failover](https://tailscale.com/docs/reference/multiple-recorder-nodes) and deploy across multiple regions for [regional routing](https://tailscale.com/docs/how-to/set-up-high-availability#regional-routing).\r\n\r\n## [Performance best practices](https://tailscale.com/docs/reference/reference-architectures/azure\\#performance-best-practices)\r\n\r\nRefer to [Performance best practices](https://tailscale.com/docs/reference/best-practices/performance) for general recommendations.\r\n\r\n### [In-region load balancing](https://tailscale.com/docs/reference/reference-architectures/azure\\#in-region-load-balancing)\r\n\r\nDeploy multiple overlapping connectors within a [DERP](https://tailscale.com/docs/reference/derp-servers) region to take advantage of [in-region load balancing](https://tailscale.com/docs/how-to/set-up-high-availability#in-region-load-balancing-default) to evenly spread load across the connectors and provide in-region redundancy.\r\n\r\n### [Recommended VM sizing](https://tailscale.com/docs/reference/reference-architectures/azure\\#recommended-vm-sizing)\r\n\r\n#### [Normal usage](https://tailscale.com/docs/reference/reference-architectures/azure\\#normal-usage)\r\n\r\nWhen installing Tailscale on an Azure VM as a \"normal\" Tailscale device (for example, not a subnet router, exit node, and the like), you likely have already sized that VM to a suitable type for its workload and running Tailscale on it will likely add negligible resource usage.\r\n\r\n#### [Subnet routers, exit nodes, and app connectors](https://tailscale.com/docs/reference/reference-architectures/azure\\#subnet-routers-exit-nodes-and-app-connectors)\r\n\r\nThere are many variables that affect performance and workloads vary widely so we do not have specific size recommendations, but we do have general guidance for selecting a VM size for an Azure VM running as a [subnet router](https://tailscale.com/docs/features/subnet-routers), [exit node](https://tailscale.com/docs/features/exit-nodes), or [app connector](https://tailscale.com/docs/features/app-connectors):\r\n\r\n- In general, higher CPU clock speed is more important than more cores.\r\n- In general, VMs with Ampere Altra ARM–based processors are quite cost effective for packet forwarding.\r\n- Use a non-burstable VM type to achieve consistent CPU performance.\r\n  - Per [Azure documentation](https://learn.microsoft.com/en-us/azure/virtual-machines/sizes-b-series-burstable), burstable performance machine sizes (such as B-series VMs) use a CPU credit mechanism which can result in variable performance.\r\n- Tailscale will generally perform better on Linux than other operating systems due to additional optimizations that have been implemented.\r\n\r\n## [Using Tailscale with Azure](https://tailscale.com/docs/reference/reference-architectures/azure\\#using-tailscale-with-azure)\r\n\r\n### [Network security groups](https://tailscale.com/docs/reference/reference-architectures/azure\\#network-security-groups)\r\n\r\nTailscale uses various [NAT traversal techniques](https://tailscale.com/blog/how-nat-traversal-works) to safely connect to other Tailscale nodes without manual intervention. Nearly all the time, you do not need to open any [firewall ports](https://tailscale.com/docs/integrations/firewalls) for Tailscale. However, if your virtual network and network security groups are overly restrictive about internet-bound egress traffic, refer to [What firewall ports should I open to use Tailscale](https://tailscale.com/docs/reference/faq/firewall-ports).\r\n\r\n### [Public vs private subnets](https://tailscale.com/docs/reference/reference-architectures/azure\\#public-vs-private-subnets)\r\n\r\nTailscale devices deployed to a public subnet with a public IP address will benefit from [direct connections](https://tailscale.com/docs/reference/connection-types) between nodes for the best performance.\r\n\r\n#### [Azure NAT Gateway](https://tailscale.com/docs/reference/reference-architectures/azure\\#azure-nat-gateway)\r\n\r\nTailscale uses both [direct and relayed connections](https://tailscale.com/docs/reference/connection-types), opting for direct connections where possible. Azure NAT Gateway is a [Hard NAT](https://tailscale.com/docs/reference/device-connectivity#hard-nat) and will prevent direct connections causing connections to use [DERP relay servers](https://tailscale.com/docs/reference/derp-servers). This can lead to lower throughput and performance than direct connections.\r\n\r\nTailscale [Peer Relays](https://tailscale.com/docs/features/peer-relay) let you use devices in your tailnet as high-throughput relay servers when direct connections aren't possible due to network conditions such as being in a private subnet behind an Azure NAT Gateway. To bypass Azure NAT Gateway, follow the steps to deploy and [configure a peer relay](https://tailscale.com/docs/features/peer-relay#get-started) to a public subnet in your virtual network, with a public IP address, and allow incoming UDP traffic to the relay port.\r\n\r\n### [Virtual network DNS resolution](https://tailscale.com/docs/reference/reference-architectures/azure\\#virtual-network-dns-resolution)\r\n\r\nTo allow non-Azure devices in your tailnet to query Azure DNS private zones, create a [Azure DNS private resolver](https://learn.microsoft.com/en-us/azure/dns/dns-private-resolver-overview) for your virtual network and configure [split DNS](https://tailscale.com/docs/reference/dns-in-tailscale#tailscale-dns-settings) to forward queries for your virtual network's internal domain name suffix to the IP address of the DNS private resolver's inbound endpoint.\r\n\r\n### [Virtual network peering](https://tailscale.com/docs/reference/reference-architectures/azure\\#virtual-network-peering)\r\n\r\n[Virtual network peering](https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-peering-overview) is a common strategy for connecting multiple virtual networks together. You can deploy a subnet router (or a set for high availability) within a virtual network to allow access to multiple virtual networks.\r\n\r\nIf you have virtual networks or subnets with overlapping IPv4 addresses, use [4via6 subnet routers](https://tailscale.com/docs/features/subnet-routers/4via6-subnets) to access resources with unique IPv6 addresses for each overlapping subnet.\r\n\r\n### [Subnet routers](https://tailscale.com/docs/reference/reference-architectures/azure\\#subnet-routers)\r\n\r\n#### [Operating a subnet router within Azure AKS](https://tailscale.com/docs/reference/reference-architectures/azure\\#operating-a-subnet-router-within-azure-aks)\r\n\r\nOftentimes organizations are using Tailscale to connect to and administer their Azure AKS clusters. While Tailscale can [run within a container](https://tailscale.com/docs/concepts/userspace-networking) and be deployed to AKS, we recommend running your [subnet routers](https://tailscale.com/docs/features/subnet-routers) externally to these clusters to ensure connectivity is available in the event your cluster is having issues. In other words, run your subnet router on dedicated VMs or an AKS cluster separate from than the cluster you're administering.\r\n\r\n### [Tailscale SSH session recording](https://tailscale.com/docs/reference/reference-architectures/azure\\#tailscale-ssh-session-recording)\r\n\r\nDeploy [multiple session recorder instances](https://tailscale.com/docs/reference/multiple-recorder-nodes) across multiple availability zones to improve resiliency against zone failures. If your organization operates across multiple regions, consider deploying SSH session recording nodes in each region you operate and [configure SSH access rules](https://tailscale.com/docs/features/tailscale-ssh/tailscale-ssh-session-recording#turn-on-session-recording-in-acls) to send recording information to the local region for your nodes.\r\n\r\n## [Limitations](https://tailscale.com/docs/reference/reference-architectures/azure\\#limitations)\r\n\r\n- Azure NAT Gateway is a [hard NAT](https://tailscale.com/docs/reference/reference-architectures/azure#azure-nat-gateway). All devices and services behind an Azure NAT Gateway will connect using [DERP relay servers](https://tailscale.com/docs/reference/derp-servers). For best performance, put devices in a [public subnet](https://tailscale.com/docs/reference/reference-architectures/azure#public-vs-private-subnets) to facilitate direct connections.\r\n\r\n![Project Logo](https://cdn.brandfetch.io/tailscale.com/fallback/lettermark/theme/dark/h/256/w/256/icon?c=1bfwsmEH20zzEfSNTed)\r\n\r\nAsk AI\r\n\r\nreCAPTCHA\r\n\r\nRecaptcha requires verification.\r\n\r\nprotected by **reCAPTCHA**\r\n","html":"<h1>Azure reference architecture</h1>\n<p>Last validated: Jan 5, 2026</p>\n<p>This document details best practices and a reference architecture for Tailscale deployments on Microsoft Azure. The following guidance applies for all Tailscale modes of operation—such as devices, exit nodes, and subnet routers.</p>\n<p><strong>Tailscale device</strong>—for the purposes of this document Tailscale device can refer to a Tailscale node, exit node, subnet router, and the like. Refer to <a href=\"https://tailscale.com/docs/reference/glossary\">Terminology and concepts</a> for additional terms.</p>\n<h2><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#high-level-architecture\">High-level architecture</a></h2>\n<p><img src=\"https://tailscale.com/_next/image?url=%2F_next%2Fstatic%2Fmedia%2Fazure-reference-architecture.98492d65.png&#x26;w=3840&#x26;q=75\" alt=\"Potential deployments of Tailscale to access Azure resources\"></p>\n<h2><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#ways-to-deploy-tailscale-to-connect-to-and-from-azure-resources\">Ways to deploy Tailscale to connect to and from Azure resources</a></h2>\n<p>Tailscale provides a few options for connecting to resources within Azure. At a high-level they are:</p>\n<ul>\n<li><strong><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#agent-to-agent-connectivity\">Agent-to-Agent connectivity</a></strong>—connect to \"static\" resources such as virtual machines (VMs). This is recommended where you can install and run Tailscale directly on the resource you wish to connect to.</li>\n<li><strong><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#ip-based-connectivity-with-subnet-router\">IP-based connectivity with a Tailscale subnet router</a></strong>—connect to managed Azure resources (such as Azure SQL or Azure Cosmos DB). This is recommended where you cannot run Tailscale on the resource you are connecting to, or want to expose an existing <a href=\"https://tailscale.com/docs/features/subnet-routers\">subnet</a> or services in a virtual network to your tailnet.</li>\n<li><strong><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#dns-based-routing-with-an-app-connector\">DNS-based routing with a Tailscale app connector</a></strong>—connect to software as a service (SaaS) applications or other resources over your tailnet with DNS-based routing.</li>\n<li><strong><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#kubernetes-services-and-api-server-proxy-with-tailscale-kubernetes-operator\">Kubernetes services and auth proxy with the Tailscale Kubernetes Operator</a></strong>—expose services in your Azure Kubernetes Service (AKS) cluster and your AKS cluster control plane directly to your Tailscale network. This is recommended where you are connecting to resources running in a Kubernetes cluster, or to a Kubernetes cluster's control plane.</li>\n<li><strong><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#azure-functions-azure-app-service-and-other-container-solutions\">Azure Functions, Azure App Service, and other container solutions</a></strong>—access resources in your tailnet from Azure Functions, Azure App Service, and other container solutions.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#agent-to-agent-connectivity\">Agent-to-Agent connectivity</a></h3>\n<p>We recommend <a href=\"https://tailscale.com/docs/install\">installing the Tailscale agent</a> wherever possible—for example, <a href=\"https://tailscale.com/docs/how-to/set-up-servers\">setting up servers</a> on Azure VMs. This generally provides the best and most scalable connectivity while enabling Tailscale agent-based functionality such as Tailscale SSH.</p>\n<p>Refer to <a href=\"https://tailscale.com/docs/install/cloud/azure/linux\">Access Azure Linux VMs privately using Tailscale</a> and <a href=\"https://tailscale.com/docs/install/cloud/azure/windows\">Access Azure Windows VMs privately using Tailscale</a> for general guides.</p>\n<h3><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#ip-based-connectivity-with-subnet-router\">IP-based connectivity with subnet router</a></h3>\n<p>For managed resources where you cannot install the Tailscale agent, such as Azure SQL or Azure Cosmos DB, you can run a <a href=\"https://tailscale.com/docs/features/subnet-routers\">subnet router</a> within your virtual network to access these resources from Tailscale.</p>\n<h3><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#dns-based-routing-with-an-app-connector\">DNS-based routing with an app connector</a></h3>\n<p><a href=\"https://tailscale.com/docs/features/app-connectors\">App connectors</a> let you route traffic bound for SaaS applications or managed services by proxying DNS for the target domains and advertising the subnet routes for the observed DNS results. This is useful for cases where the application has an allowlist of IP addresses which can connect to it; the IP addresses of the nodes running an app connector can be added to the allowlist, and all nodes in the tailnet will use that IP address for their traffic egress.</p>\n<h3><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#kubernetes-services-and-api-server-proxy-with-tailscale-kubernetes-operator\">Kubernetes services and API server proxy with Tailscale Kubernetes Operator</a></h3>\n<p>The <a href=\"https://tailscale.com/docs/features/kubernetes-operator\">Tailscale Kubernetes Operator</a> lets you expose services in your Kubernetes cluster to your Tailscale network, and use an API server proxy for secure connectivity to the Kubernetes control plane.</p>\n<h3><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#azure-functions-azure-app-service-and-other-container-solutions\">Azure Functions, Azure App Service, and other container solutions</a></h3>\n<p>Tailscale supports <a href=\"https://tailscale.com/docs/concepts/userspace-networking\">userspace networking</a> where processes in the container can connect to other resources on your Tailscale network by using a SOCKS5 or HTTP proxy. This lets <a href=\"https://azure.microsoft.com/en-us/products/functions\">Azure Functions</a>, <a href=\"https://azure.microsoft.com/en-us/products/app-service\">Azure App Service</a>, and other container-based solutions to connect to the Tailscale network with minimal configuration needed.</p>\n<p>Refer to <a href=\"https://tailscale.com/docs/install/cloud/azure/azure-app-service\">Using Tailscale on Azure App Service</a> for a general guide.</p>\n<h2><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#production-best-practices\">Production best practices</a></h2>\n<p>Below are general recommendations and best practices for running Tailscale in production environments. Much of what is listed below is explained in greater detail throughout this document:</p>\n<ul>\n<li>When possible deploy <a href=\"https://tailscale.com/docs/features/subnet-routers\">subnet routers</a>, <a href=\"https://tailscale.com/docs/features/exit-nodes\">exit nodes</a>, <a href=\"https://tailscale.com/docs/features/app-connectors\">app connectors</a>, and the like, to public subnets with public IP addresses to ensure <a href=\"https://tailscale.com/docs/reference/connection-types\">direct connections</a> and optimal performance.</li>\n<li>Run subnet routers, exit nodes, app connectors, and the like, separately from the systems you are administering with Tailscale—for example, run your subnet routers outside of your Azure AKS clusters.</li>\n<li>Deploy dynamically scaled resources (for example, containers or serverless functions) as <a href=\"https://tailscale.com/docs/features/ephemeral-nodes\">ephemeral nodes</a> to automatically clean up devices after they shut down.</li>\n</ul>\n<h3><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#high-availability-and-regional-routing\">High availability and regional routing</a></h3>\n<ul>\n<li>Run multiple <a href=\"https://tailscale.com/docs/features/subnet-routers\">subnet routers</a> and <a href=\"https://tailscale.com/docs/features/app-connectors\">app connectors</a> across multiple Azure availability zones to improve resiliency against zone failures with <a href=\"https://tailscale.com/docs/how-to/set-up-high-availability\">high availability failover</a> and deploy across multiple regions for <a href=\"https://tailscale.com/docs/how-to/set-up-high-availability#regional-routing\">regional routing</a>.</li>\n<li>Run multiple Tailscale SSH session recorder nodes across multiple Azure availability zones to improve resiliency against zone failures with <a href=\"https://tailscale.com/docs/reference/multiple-recorder-nodes\">recorder node failover</a> and deploy across multiple regions for <a href=\"https://tailscale.com/docs/how-to/set-up-high-availability#regional-routing\">regional routing</a>.</li>\n</ul>\n<h2><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#performance-best-practices\">Performance best practices</a></h2>\n<p>Refer to <a href=\"https://tailscale.com/docs/reference/best-practices/performance\">Performance best practices</a> for general recommendations.</p>\n<h3><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#in-region-load-balancing\">In-region load balancing</a></h3>\n<p>Deploy multiple overlapping connectors within a <a href=\"https://tailscale.com/docs/reference/derp-servers\">DERP</a> region to take advantage of <a href=\"https://tailscale.com/docs/how-to/set-up-high-availability#in-region-load-balancing-default\">in-region load balancing</a> to evenly spread load across the connectors and provide in-region redundancy.</p>\n<h3><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#recommended-vm-sizing\">Recommended VM sizing</a></h3>\n<h4><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#normal-usage\">Normal usage</a></h4>\n<p>When installing Tailscale on an Azure VM as a \"normal\" Tailscale device (for example, not a subnet router, exit node, and the like), you likely have already sized that VM to a suitable type for its workload and running Tailscale on it will likely add negligible resource usage.</p>\n<h4><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#subnet-routers-exit-nodes-and-app-connectors\">Subnet routers, exit nodes, and app connectors</a></h4>\n<p>There are many variables that affect performance and workloads vary widely so we do not have specific size recommendations, but we do have general guidance for selecting a VM size for an Azure VM running as a <a href=\"https://tailscale.com/docs/features/subnet-routers\">subnet router</a>, <a href=\"https://tailscale.com/docs/features/exit-nodes\">exit node</a>, or <a href=\"https://tailscale.com/docs/features/app-connectors\">app connector</a>:</p>\n<ul>\n<li>In general, higher CPU clock speed is more important than more cores.</li>\n<li>In general, VMs with Ampere Altra ARM–based processors are quite cost effective for packet forwarding.</li>\n<li>Use a non-burstable VM type to achieve consistent CPU performance.\n<ul>\n<li>Per <a href=\"https://learn.microsoft.com/en-us/azure/virtual-machines/sizes-b-series-burstable\">Azure documentation</a>, burstable performance machine sizes (such as B-series VMs) use a CPU credit mechanism which can result in variable performance.</li>\n</ul>\n</li>\n<li>Tailscale will generally perform better on Linux than other operating systems due to additional optimizations that have been implemented.</li>\n</ul>\n<h2><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#using-tailscale-with-azure\">Using Tailscale with Azure</a></h2>\n<h3><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#network-security-groups\">Network security groups</a></h3>\n<p>Tailscale uses various <a href=\"https://tailscale.com/blog/how-nat-traversal-works\">NAT traversal techniques</a> to safely connect to other Tailscale nodes without manual intervention. Nearly all the time, you do not need to open any <a href=\"https://tailscale.com/docs/integrations/firewalls\">firewall ports</a> for Tailscale. However, if your virtual network and network security groups are overly restrictive about internet-bound egress traffic, refer to <a href=\"https://tailscale.com/docs/reference/faq/firewall-ports\">What firewall ports should I open to use Tailscale</a>.</p>\n<h3><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#public-vs-private-subnets\">Public vs private subnets</a></h3>\n<p>Tailscale devices deployed to a public subnet with a public IP address will benefit from <a href=\"https://tailscale.com/docs/reference/connection-types\">direct connections</a> between nodes for the best performance.</p>\n<h4><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#azure-nat-gateway\">Azure NAT Gateway</a></h4>\n<p>Tailscale uses both <a href=\"https://tailscale.com/docs/reference/connection-types\">direct and relayed connections</a>, opting for direct connections where possible. Azure NAT Gateway is a <a href=\"https://tailscale.com/docs/reference/device-connectivity#hard-nat\">Hard NAT</a> and will prevent direct connections causing connections to use <a href=\"https://tailscale.com/docs/reference/derp-servers\">DERP relay servers</a>. This can lead to lower throughput and performance than direct connections.</p>\n<p>Tailscale <a href=\"https://tailscale.com/docs/features/peer-relay\">Peer Relays</a> let you use devices in your tailnet as high-throughput relay servers when direct connections aren't possible due to network conditions such as being in a private subnet behind an Azure NAT Gateway. To bypass Azure NAT Gateway, follow the steps to deploy and <a href=\"https://tailscale.com/docs/features/peer-relay#get-started\">configure a peer relay</a> to a public subnet in your virtual network, with a public IP address, and allow incoming UDP traffic to the relay port.</p>\n<h3><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#virtual-network-dns-resolution\">Virtual network DNS resolution</a></h3>\n<p>To allow non-Azure devices in your tailnet to query Azure DNS private zones, create a <a href=\"https://learn.microsoft.com/en-us/azure/dns/dns-private-resolver-overview\">Azure DNS private resolver</a> for your virtual network and configure <a href=\"https://tailscale.com/docs/reference/dns-in-tailscale#tailscale-dns-settings\">split DNS</a> to forward queries for your virtual network's internal domain name suffix to the IP address of the DNS private resolver's inbound endpoint.</p>\n<h3><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#virtual-network-peering\">Virtual network peering</a></h3>\n<p><a href=\"https://learn.microsoft.com/en-us/azure/virtual-network/virtual-network-peering-overview\">Virtual network peering</a> is a common strategy for connecting multiple virtual networks together. You can deploy a subnet router (or a set for high availability) within a virtual network to allow access to multiple virtual networks.</p>\n<p>If you have virtual networks or subnets with overlapping IPv4 addresses, use <a href=\"https://tailscale.com/docs/features/subnet-routers/4via6-subnets\">4via6 subnet routers</a> to access resources with unique IPv6 addresses for each overlapping subnet.</p>\n<h3><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#subnet-routers\">Subnet routers</a></h3>\n<h4><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#operating-a-subnet-router-within-azure-aks\">Operating a subnet router within Azure AKS</a></h4>\n<p>Oftentimes organizations are using Tailscale to connect to and administer their Azure AKS clusters. While Tailscale can <a href=\"https://tailscale.com/docs/concepts/userspace-networking\">run within a container</a> and be deployed to AKS, we recommend running your <a href=\"https://tailscale.com/docs/features/subnet-routers\">subnet routers</a> externally to these clusters to ensure connectivity is available in the event your cluster is having issues. In other words, run your subnet router on dedicated VMs or an AKS cluster separate from than the cluster you're administering.</p>\n<h3><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#tailscale-ssh-session-recording\">Tailscale SSH session recording</a></h3>\n<p>Deploy <a href=\"https://tailscale.com/docs/reference/multiple-recorder-nodes\">multiple session recorder instances</a> across multiple availability zones to improve resiliency against zone failures. If your organization operates across multiple regions, consider deploying SSH session recording nodes in each region you operate and <a href=\"https://tailscale.com/docs/features/tailscale-ssh/tailscale-ssh-session-recording#turn-on-session-recording-in-acls\">configure SSH access rules</a> to send recording information to the local region for your nodes.</p>\n<h2><a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#limitations\">Limitations</a></h2>\n<ul>\n<li>Azure NAT Gateway is a <a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#azure-nat-gateway\">hard NAT</a>. All devices and services behind an Azure NAT Gateway will connect using <a href=\"https://tailscale.com/docs/reference/derp-servers\">DERP relay servers</a>. For best performance, put devices in a <a href=\"https://tailscale.com/docs/reference/reference-architectures/azure#public-vs-private-subnets\">public subnet</a> to facilitate direct connections.</li>\n</ul>\n<p><img src=\"https://cdn.brandfetch.io/tailscale.com/fallback/lettermark/theme/dark/h/256/w/256/icon?c=1bfwsmEH20zzEfSNTed\" alt=\"Project Logo\"></p>\n<p>Ask AI</p>\n<p>reCAPTCHA</p>\n<p>Recaptcha requires verification.</p>\n<p>protected by <strong>reCAPTCHA</strong></p>\n"}