Azure Databricks · Networking & Security · Stage 1

Networking & Cloud Foundations

The address book and toolbox the whole track is written in — for the FDE/RSA who has to speak the customer's network language before talking Databricks: how addresses are written, where they live, what allows and steers them, how a name becomes a private IP, and the shape every secure deployment lands in.
Azure-first 1.1 IP & CIDR 1.2 VNets & Subnets 1.3 NSG / UDR / NAT 1.4 DNS & Endpoints 1.5 Topologies

Build the city before you install the locks

Stage 1 is the foundation that comes before any Databricks-specific control. Five primitives: CIDR (how addresses are written), the VNet/subnets (the streets addresses live in), NSG/UDR/NAT (whether a packet may travel, where it goes, how it gets out), DNS (how a name becomes an IP), and hub-and-spoke (the city plan). Get these right and every Stage 2+ control is just "harden one hop on a map you already own."

🧠 Mental model — hold this in your head

The address book, the streets, the bouncer-GPS-dock, the phonebook, and the city plan. CIDR is the address book you allocate once on paper (you can't renumber after move-in). The VNet is the gated estate you own; subnets are its streets. The NSG decides whether, the UDR decides where, the NAT gives a stable way out. DNS is the phonebook; a Private DNS Zone is the internal directory that makes a public name resolve to a private IP. Hub-and-spoke is the plan everything plugs into.

The five primitives — and what each becomes in Databricks

SubtopicWhat it isBecomes (Stage 2+)
1.1 CIDRAddress vocabulary; sizing mathSubnet sizing for VNet injection (immutable)
1.2 VNet/subnetsThe container controls attach toHost + container subnets, delegated
1.3 NSG/UDR/NATAllow / route / egressSCC posture, DEP firewall, stable egress IP
1.4 DNSName → IPPrivate Link & private ADLS resolution
1.5 TopologyHub-and-spoke shapeTransit VNet (hub) + workspace VNet (spoke)

Static topology (zoom-crisp, reusable in slides)

Azure networking foundations: on-prem via ExpressRoute/VPN into a hub/transit VNet
      (GatewaySubnet, AzureFirewallSubnet, front-end Private Endpoint, DNS resolver), peered to a Databricks workspace
      spoke VNet with host/container subnets sized by CIDR, NSG/UDR/NAT controls, back-end PE; compute reaching ADLS Gen2;
      and the DNS resolution chain turning the workspace name into a private IP.
The five foundations composed into one map — CIDR-sized VNet/subnets, NSG/UDR/NAT controls, the DNS resolution chain, and the hub-and-spoke the workspace plugs into.

The line a network team wants to hear

"We size the address space once — off your IPAM, for peak nodes plus headroom — because subnet CIDR can't change after deploy. The compute runs in your VNet so your NSGs, routes, and Private Link apply, and it drops straight into the hub-and-spoke you already run."

Terms used here (Stage 1 owns most; forward-refs noted)

CIDR
Shorthand for an IP range, e.g. 10.179.0.0/16; bigger /n = smaller block. → 1.1
Subnet delegation
Handing a subnet to Microsoft.Databricks/workspaces so it auto-manages NSG rules. → 1.2
NIC
Network Interface Card: the VM's virtual network adapter. Each Databricks classic node uses one host NIC/IP and one container NIC/IP, so subnet capacity directly limits node count.
Service tag
Microsoft-maintained named bucket of IP ranges (e.g. AzureDatabricks) used in rules instead of raw IPs. → 1.3
Private DNS Zone
A phonebook only linked VNets read — overrides a public name to a private IP. → 1.4
SCC / NCC / Private Link
Databricks controls hardening the three paths — built on these foundations. → Stage 2+

1.1 · IP Addressing & CIDR

CIDR is the address book. You allocate it once, before any Databricks resource exists, and you size for peak because a subnet's CIDR is frozen the day the workspace deploys. Switch the diagram between the VNet CIDR plan and the node → IP math; click any box for the what + why.

TipClick any component to see what it is and why it's there.

The math that matters

Total addresses = 2^(32 − n); bigger /n = smaller block. Azure reserves 5 IPs per subnet, so usable = total − 5 (a /26 is 59, not 64). Databricks uses 2 IPs per node (1 host + 1 container), so max nodes ≈ usable IPs in one subnet.

Verified limits & sizing

RuleValue
VNet CIDR/16 to /24
Each subnet≥ /26 (technical min /28, not recommended); same size for both
IPs per cluster node2 (one host + one container)
Max nodes (≈)/26 ~59 · /24 ~251 · /22 ~1,019

Illustrative config — sizing is the whole point

resource "azurerm_virtual_network" "adb" {
  address_space = ["10.179.0.0/16"]   # /16 VNet: room for big subnets + a future Private Link subnet
}
resource "azurerm_subnet" "container" {
  address_prefixes = ["10.179.64.0/18"]   # ~16k usable; MUST match host subnet size; CIDR is PERMANENT
  delegation { name = "adb"; service_delegation { name = "Microsoft.Databricks/workspaces" } }
}
# 10.179.128.0/17 left FREE in the /16 — headroom for a /27 Private Link subnet (Stage 4).

Portal: Create a resource → Virtual network → IP addresses (10.179.0.0/16) → + Add subnet twice (host + container, each ≥ /26, non-overlapping).

Why it breaks

A too-small subnet → "cluster failed to start, insufficient IP addresses" on scale-out; the fix is a CIDR increase / Update-network-config (Public Preview), not instant because subnet CIDR is immutable. Overlapping CIDR with on-prem/peered ranges → silent routing blackhole.

1.2 · VNets, Subnets & the Cloud Network Model

The VNet is the gated estate you own; subnets are its streets, and they're where every control attaches. A VNet-injected workspace rents two same-sized delegated subnets. Switch between VNet injection and the managed (default) VNet; click any box for the what + why.

TipClick any component to see what it is and why it's there.

The two-subnet model

A workspace needs exactly two delegated subnets — a host subnet (1 host NIC/node) and a container subnet (1 container NIC/node, runs the Databricks Runtime). Both delegated to Microsoft.Databricks/workspaces; 2 IPs/node; CIDR + delegation immutable; can't be shared. A NIC is the VM's virtual network adapter, and each NIC consumes an IP from its subnet. Under SCC both are private — the old "public subnet" label is historical.

Managed VNet vs VNet injection

DimensionManaged (default)VNet injection
Who owns the VNetDatabricks (managed RG)You (your RG)
NSG / UDR controlNoneFull
Private Link / peering / on-premNot supportedSupported
When to useQuick dev/testAny production / regulated

Illustrative config — the delegated subnet

resource "azurerm_subnet" "host" {
  address_prefixes = ["10.179.0.0/18"]
  delegation {
    name = "adb"
    service_delegation { name = "Microsoft.Databricks/workspaces" }   # hands subnet mgmt to Databricks
  }
}
# Container subnet identical shape, same size, no overlap — runs the Databricks Runtime.

Verify: VNet → Subnets → both show NSG attached and Delegation = Microsoft.Databricks/workspaces.

Why it breaks

A /26 + scale-out → IP exhaustion (~59 nodes). VNet in the wrong region/subscription → it won't appear in the deployment dropdown. Service Endpoint Policies won't attach to the delegated subnets (immutable network intent) — pivot to Private Endpoint / NCC.

1.3 · Firewalls, NSGs & Routing

Every packet leaving a cluster passes a bouncer (NSG — whether), a GPS (UDR — where), and a loading dock (NAT — stable way out). Switch the diagram between the three controls; the highlighted arrow shows the active flow. Click any box for the what + why.

TipPick a control above, then click a box to see what it does and why.

The Databricks-managed NSG rules (don't edit them)

Outbound TCP to AzureDatabricks on 443, 3306, 8443-8451 (control plane / SCC relay / metastore), 443 to Storage, 9093 to EventHub. Inbound 22 / 5557 exist only if SCC is disabled. NSG is stateful — replies are auto-allowed, which is why SCC works with zero inbound rules.

NSG vs UDR vs NAT vs Firewall

NSGUDRNATFirewall
DecidesWhetherWhere (next hop)Outbound IPAllow + inspect (FQDN)
DirectionIn + outEgress routingOutbound onlyBoth
CostFreeFreeHourly + per-GBHighest

Illustrative config — force-tunnel WITHOUT blackholing the control plane

resource "azurerm_route" "dep_default" {       # DEP catch-all → Azure Firewall
  address_prefix = "0.0.0.0/0"
  next_hop_type  = "VirtualAppliance"; next_hop_in_ip_address = "10.10.0.4"  # firewall PRIVATE IP
}
resource "azurerm_route" "bypass_adb" {        # WITHOUT this, the control plane is blackholed
  address_prefix = "AzureDatabricks"           # service tag (OMIT if Private Link on)
  next_hop_type  = "Internet"                  # repeat for "Storage" and "EventHub"
}

Portal: route table → Routes → 0.0.0.0/0 → Virtual appliance + bypass routes per service tag (next hop Internet) → associate to both subnets. NAT gateway → assign a Standard public IP (= stable egress IP).

Why it breaks · two deadlines

A 0.0.0.0/0 → firewall UDR with no bypass routes blackholes SCC/metastore/logs → clusters won't launch (#1 DEP mistake). A 0.0.0.0/0 → VirtualAppliance UDR overrides the NAT gateway. And after 2026-03-31, new Azure VNets have no default outbound — a NAT gateway is now mandatory.

1.4 · DNS, Endpoints & Name Resolution

DNS is the phonebook; a Private DNS Zone is the internal company directory that makes the same name resolve to a private IP. Switch between public resolution and private (Private Link) resolution; click any box for the what + why.

TipSwitch resolution mode, then click a box to see how the name resolves.

Service Endpoint ≠ Private Endpoint (the DNS distinction)

A Service Endpoint does NOT change DNS — the name still resolves to the public IP; only the route + source identity change. A Private Endpoint requires a DNS change to a private IP via the Private DNS Zone privatelink.azuredatabricks.net (Gov: privatelink.databricks.azure.us; ADLS: privatelink.dfs.core.windows.net). The workspace URL never changes — only its answer.

The resolution chain (private deployment)

adb-….azuredatabricks.net                  (URL — UNCHANGED)
   └─ public DNS → CNAME →
adb-….privatelink.azuredatabricks.net      (CNAME into the privatelink zone)
   └─ your Private DNS Zone → A record →
10.10.4.5                                  (PRIVATE IP of the databricks_ui_api endpoint)

Illustrative config — the DNS half of Private Link

resource "azurerm_private_dns_zone" "adb" {
  name = "privatelink.azuredatabricks.net"   # EXACT name or auto-registration won't fire
}
resource "azurerm_private_dns_zone_virtual_network_link" "adb" {
  virtual_network_id = azurerm_virtual_network.adb.id   # without this, the VNet never sees the private A record
}
# Verify from a VM inside the VNet: nslookup adb-….azuredatabricks.net
#   ✓ a 10.x private IP   ✗ a public 20.x/40.x = zone not linked or custom DNS not forwarding

Why it breaks

Custom DNS not forwarding the privatelink zone → workspace resolves public and Private Link "doesn't work" (the most common incident). Misnamed zone → auto-registration silently skips. Long TTL during cutover → "we fixed DNS but it's still broken." DNS controls where the name points, not whether access is allowed — pair it with Allow Public Network Access = Disabled.

1.5 · Common Network Topologies

Every secure deployment lands in hub-and-spoke: shared services in one central hub, each workload in its own spoke, all routed through the hub. Switch between the generic hub-and-spoke and the Databricks mapping (hub = transit VNet, spoke = workspace VNet); click any box for the what + why.

TipSwitch the view, then click a box to see what it is and why it's there.

Peering is non-transitive — a feature

Spoke A → hub and spoke B → hub does not chain; A can't reach B automatically. That forces inter-spoke traffic through the hub firewall for inspection. To allow A↔B: a UDR via the hub NVA, or a direct A↔B peering. Two settings make it work: Allow gateway transit (hub) + Use remote gateway (spoke), and Allow forwarded traffic (both).

Topology shapes & on-prem connectivity

TopologyProsCons
Hub-and-spokeCentral firewall/gateway/DNS; scales to 100s; enterprise defaultHub is a shared bottleneck & SPOF
Full meshLowest latency everywhereN² peerings; no central inspection
VPN vs ExpressRouteVPN: cheap/quick (dev/test/backup)ExpressRoute: private circuit, SLA (production/regulated)

Illustrative config — peering with gateway transit

resource "azurerm_virtual_network_peering" "hub_to_spoke" {
  allow_forwarded_traffic = true     # let hub forward spoke-origin traffic
  allow_gateway_transit   = true     # share the hub's on-prem gateway
}
resource "azurerm_virtual_network_peering" "spoke_to_hub" {
  allow_forwarded_traffic = true
  use_remote_gateways     = true     # use hub's VPN/ExpressRoute gateway (must exist first)
}
# Plus a spoke UDR: 0.0.0.0/0 → VirtualAppliance (hub firewall private IP) to force-tunnel egress.

Why it breaks

Expecting transitive peering → spoke A can't reach spoke B (check effective routes on the NIC). Overlapping CIDR → peering refuses to create. A spoke with both its own gateway and use_remote_gateways → apply fails. And the browser_authentication SPOF: one per region+zone — deleting its host workspace breaks web SSO region-wide.

Decision guide — what an architect recommends

Always / baseline

  • Size CIDR off central IPAM, for peak + headroom (10/8, /16 VNet, equal /18–/22 subnets)
  • VNet injection for any production / regulated workload
  • NAT gateway on both subnets (stable egress + mandatory post-2026-03-31)
  • NSG hardening deny rules (free) + a unique NSG per workspace
  • Service Endpoint for compute→storage when there's no "no-public-IP" mandate (free, no DNS change)

Step up when mandated

  • RFC 6598 (100.64.0.0/10) when RFC 1918 is exhausted
  • UDR → Azure Firewall (DEP) when the regulatory profile demands egress inspection
  • Private Endpoint + Private DNS Zone for private workspace / private ADLS
  • Hub-and-spoke for multi-workspace / on-prem (reuse the customer's landing-zone hub)
  • ExpressRoute for steady high-volume loads into ADLS; VPN for dev/test/backup

Rule of thumb

Start free, step up only when mandated. Right-sizing, VNet injection, NSG deny rules, Service Endpoints, and SCC cost nothing and are backbone-private. Add NAT (now mandatory), then Private Endpoints / DEP firewall / hub-and-spoke only when a regulator or on-prem reach demands it.

FDE field notes — what the network/security team actually asks

The one-liner
"Stage 1 is the foundation we get right before we touch Databricks: we size the address space once — off your IPAM, for peak — because subnet CIDR can't change after deploy. We put compute in your own VNet so your NSGs, routes, and Private Link apply; the NSG decides whether, the UDR decides where, and a NAT gateway gives a stable egress IP. Going private changes nothing in your apps — the Private DNS Zone just makes the same name resolve to a private IP. And it all drops into the hub-and-spoke you already run."

Common asks & the answer

Customer asks…Architect answers…
"How big do we size the VNet/subnets — can we change it later?"/16–/24 VNet, subnets ≥ /26, sized for peak. No — subnet CIDR is immutable after deploy.
"We're short on 10/8 — can Databricks live in a smaller / CGNAT block?"Yes: /16–/24, and RFC 6598 100.64.0.0/10 is supported when RFC 1918 is exhausted.
"If we force all egress through our Azure Firewall, will it break the workspace?"Only if you forget the control-plane bypass UDRs (AzureDatabricks / Storage / EventHub).
"Can you give us a stable egress IP to allowlist?"Yes — a NAT gateway Standard public IP.
"If we turn on Private Link, does the workspace URL change?"No — the FQDN is unchanged; only its DNS answer flips to a private IP.
"We already run an Azure Landing Zone hub — is the workspace just a spoke?"Yes; reuse your hub, firewall, gateway, and DNS — nothing net-new to govern.

What breaks in the field — and the FIRST check

"Cluster failed to start — insufficient IPs"

2 IPs/node against a too-small subnet.First check: container subnet free IPs vs 2×nodes (remember −5 reserved).

Clusters stuck "Pending" on a fresh VNet

Post-2026-03-31 VNets have no default outbound.First check: NAT gateway (or UDR→firewall) on both subnets.

Clusters won't launch / no logs after DEP

A 0.0.0.0/0 → firewall UDR with no bypass routes.First check: effective routes on the subnet NIC; add the bypass UDRs.

Workspace won't load over Private Link

Custom DNS not forwarding the privatelink zone.First check: nslookup from inside the VNet — public IP = zone not linked / not forwarded.

Spoke A can't reach spoke B / on-prem

Peering is non-transitive.First check: effective routes; need a UDR via the hub NVA or a direct peer.

Web SSO breaks region-wide

The single browser_authentication host workspace was deleted.First check: the browser-auth host workspace for the region.

Three questions to ask before designing the network

  1. What's the peak node count, and which CIDR block does central IPAM allocate (and does it overlap on-prem/hub)?
  2. Is there a regulatory mandate for no public-IP hop / egress inspection, or is backbone-private enough?
  3. Is there an existing landing-zone hub and on-prem connectivity (ExpressRoute/VPN) to reuse, or is this a standalone dev VNet?