Volume 8 · Chapter 3 — Azure Cloud Architecture & Enterprise DevOps for .NET Engineers

Azure Networking for Enterprise Applications

Goutham Mayaluri 9 min read .NETC#Azure

3.1 Introduction

Networking is where security architecture becomes concrete. In an enterprise Azure estate, the network defines what can talk to what, keeps sensitive services off the public internet, and connects the cloud to on-premises systems. A common mistake is treating networking as an afterthought; in regulated environments like banking it is foundational, because a private, segmented, defense-in-depth network is often a compliance requirement, not a nicety.

3.2 Virtual Networks and Subnets

A Virtual Network (VNet) is your private address space in Azure; subnets divide it into segments you can secure and route independently. Segmenting by tier - web, application, data, management - lets you apply different security rules per tier and contain lateral movement if one segment is compromised.

flowchart TB
  subgraph VNet["VNet 10.0.0.0/16"]
      Web["Web subnet 10.0.1.0/24\n(App Gateway / ingress)"]
      App["App subnet 10.0.2.0/24\n(App Service / AKS)"]
      Data["Data subnet 10.0.3.0/24\n(Private Endpoints: SQL, Key Vault)"]
      Mgmt["Mgmt subnet 10.0.4.0/24\n(Bastion / jumpbox)"]
  end
  Web --> App
  App --> Data
  Mgmt -.-> App

3.3 Network Security Groups

Network Security Groups (NSGs) are stateful firewalls attached to subnets or NICs. Each rule allows or denies traffic by source, destination, port, and protocol, evaluated by priority. Applied per tier, they enforce that, for example, only the web subnet may reach the app subnet on port 443, and nothing but the app subnet may reach the data subnet - the essence of network segmentation.

3.4 Private Endpoints - Keeping PaaS Off the Internet

By default, PaaS services like Azure SQL and Key Vault have public endpoints. A Private Endpoint projects the service into your VNet with a private IP, so traffic never traverses the public internet, and you can disable public access entirely. This is one of the most important security controls in a regulated environment, paired with Private DNS zones so the service’s hostname resolves to the private IP.

sequenceDiagram
  autonumber
  participant App as App Service (VNet-integrated)
  participant DNS as Private DNS Zone
  participant PE as Private Endpoint (private IP)
  participant SQL as Azure SQL
  App->>DNS: resolve sqlsrv.database.windows.net
  DNS-->>App: 10.0.3.5 (private IP, not public)
  App->>PE: connect to 10.0.3.5
  PE->>SQL: private link (never touches internet)
  SQL-->>App: result

3.5 Hybrid Connectivity: VPN and ExpressRoute

Enterprises rarely run purely in the cloud. A Site-to-Site VPN Gateway provides encrypted connectivity over the internet - quick and inexpensive. ExpressRoute provides a dedicated private circuit from the corporate network to Azure, offering predictable latency, higher bandwidth, and traffic that never touches the public internet - the standard for banks connecting core systems to Azure.

3.6 Load Balancing and Traffic Management

Azure offers layered traffic services for different needs. The Azure Load Balancer distributes Layer-4 (TCP/UDP) traffic within a region. Application Gateway is a Layer-7 (HTTP) load balancer with path/host routing, TLS termination, and a built-in Web Application Firewall. Azure Front Door adds global, edge-based routing, caching, and cross-region failover. A typical enterprise stack combines Front Door (global) with Application Gateway + WAF (regional).

flowchart TB
  User["Users (global)"] --> FD["Azure Front Door\n(global routing + WAF + cache)"]
  FD --> AGW1["App Gateway + WAF\n(Region 1)"]
  FD --> AGW2["App Gateway + WAF\n(Region 2, failover)"]
  AGW1 --> B1["Backend pool (App Service / AKS)"]
  AGW2 --> B2["Backend pool (App Service / AKS)"]

3.7 The Hub-Spoke Topology

At enterprise scale, the hub-spoke model centralizes shared services - firewall, VPN/ExpressRoute gateway, DNS, and shared identity - in a hub VNet, with each workload in its own spoke VNet peered to the hub. This gives consistent security inspection and connectivity while isolating workloads from each other, and it scales cleanly as new applications are added.

3.8 DNS Architecture

DNS ties private networking together. Private DNS zones ensure that PaaS hostnames resolve to private-endpoint IPs inside the VNet, and custom domains and name resolution must be planned so hybrid and cross-VNet communication works reliably. Misconfigured private DNS is the most common reason private endpoints “don’t work.”

Senior Interview Question

How do you design a secure Azure network for a sensitive workload?

I apply defense in depth. I segment a VNet into tiered subnets (web, app, data, management) and use NSGs so each tier only accepts the traffic it must - the data tier reachable only from the app tier, and so on. I keep PaaS services off the public internet with Private Endpoints and Private DNS, disabling their public access. Inbound web traffic passes through Application Gateway with a WAF (and Front Door globally), and management access goes through Bastion rather than public RDP/ SSH. Hybrid connectivity uses ExpressRoute or VPN so on-prem traffic stays private. At scale I centralize inspection and shared services in a hub-spoke topology. The result is that no sensitive service is directly internet-reachable, traffic is segmented and inspected, and lateral movement is contained.

Senior Interview Question

What problem do Private Endpoints solve, and what must accompany them?

PaaS services like Azure SQL, Storage, and Key Vault expose public endpoints by default, which is unacceptable for sensitive data. A Private Endpoint gives the service a private IP inside your VNet via Azure Private Link, so traffic flows over the Microsoft backbone and never the public internet, and you can turn public access off entirely. The essential companion is Private DNS: the service’s public hostname must resolve to the private-endpoint IP for clients in the VNet, otherwise they still try the public endpoint. Missing or misconfigured Private DNS zones are the number-one cause of private endpoints appearing not to work, so the two are always designed together.

Senior Interview Question

When do you use ExpressRoute versus a VPN Gateway?

Both connect on-premises networks to Azure, but they differ in performance, security, and cost. A Site-to-Site VPN Gateway tunnels encrypted traffic over the public internet - fast to set up, inexpensive, and fine for lower-bandwidth or non-latency-critical connectivity, though it inherits internet variability. ExpressRoute provides a dedicated private circuit through a connectivity provider, bypassing the public internet for predictable low latency, higher bandwidth, and stronger isolation - the choice for banks and enterprises moving core-system or high-volume traffic, or where regulations forbid the public internet. Many enterprises use ExpressRoute as primary with a VPN as encrypted backup.

Senior Interview Question

Compare Azure Load Balancer, Application Gateway, and Front Door.

They operate at different layers and scopes. Azure Load Balancer is a regional Layer-4 (TCP/UDP) distributor - fast and protocol-agnostic but with no HTTP awareness. Application Gateway is a regional Layer-7 (HTTP) load balancer offering URL path and host-based routing, TLS termination, session affinity, and an integrated Web Application Firewall. Azure Front Door is a global, edge-based Layer-7 service adding worldwide routing, latency-based traffic steering, caching/ CDN, and cross-region failover. A common enterprise pattern layers them: Front Door for global entry, WAF, and failover; Application Gateway for regional L7 routing and WAF; and Load Balancer where raw L4 distribution is needed. You pick by whether you need global vs regional, and L7 features vs simple L4.

Principal Engineer Question

How do you design network topology for an enterprise with dozens of workloads and on-prem integration?

I use a hub-spoke topology as the backbone. The hub VNet centralizes shared, expensive-to-duplicate services - the ExpressRoute/VPN gateway, Azure Firewall or NVA for egress inspection, DNS, and shared identity/management - while each workload lives in its own spoke VNet peered to the hub. This gives every workload consistent, centrally governed connectivity and security inspection, isolates workloads from one another to contain blast radius, and scales cleanly because onboarding a new application is just adding a peered spoke. I standardize address planning to avoid overlaps (critical for on-prem routing), enforce segmentation with NSGs and the firewall, keep PaaS on private endpoints with centralized Private DNS, and codify the whole thing as reusable IaC modules so spokes are provisioned to a governed template. Centralized connectivity with isolated workloads is what keeps a large estate both secure and manageable.

Principal Engineer Question

An application intermittently fails to reach Azure SQL over its private endpoint. How do you diagnose it?

Private-endpoint connectivity problems are almost always DNS or NSG/routing, so I work systematically. First DNS: from the app’s subnet, resolve the SQL hostname and confirm it returns the private IP, not a public one - if it returns public, the Private DNS zone is missing, not linked to the VNet, or overridden by custom DNS that does not forward correctly, which is the most common cause. Next connectivity: check that the private endpoint’s subnet and the app’s NSGs/route tables allow the traffic and that any forced-tunneling firewall rules are not blocking it. I use Connection Troubleshoot / NSG flow logs to see whether packets are dropped and where. Intermittency specifically points me at DNS caching or a mix of instances using different resolvers, or an NSG rule that only some paths hit. The fix is usually to correct Private DNS zone linkage and DNS forwarding so every instance consistently resolves to the private IP.

3.9 Banking Enterprise Scenario

A bank builds its Azure network as a hub-spoke topology. The hub hosts an ExpressRoute gateway to the corporate datacenter, Azure Firewall for egress inspection, and centralized Private DNS. Each application - payments, lending, customer - runs in its own spoke VNet with tiered subnets and NSGs enforcing that only the app tier can reach the data tier. Azure SQL and Key Vault are exposed only through Private Endpoints with public access disabled, resolved via the hub’s Private DNS zones. Internet-facing traffic enters through Front Door and regional Application Gateways with WAF, while administrators connect via Bastion. No sensitive service is ever reachable from the public internet, satisfying the bank’s regulatory obligations.

Chapter Revision Notes

  • Segment VNets into tiered subnets with NSGs to contain lateral movement.
  • Use Private Endpoints + Private DNS to keep PaaS off the public internet.
  • ExpressRoute for private, predictable hybrid connectivity; VPN for cheaper/backup.
  • Layer Front Door (global) with App Gateway + WAF (regional) for web traffic.
  • Adopt hub-spoke to centralize shared services and isolate workloads at scale.
  • Private DNS misconfiguration is the top cause of private-endpoint failures.