Microsoft Azure Services and Architecture Questions
Microsoft Azure's core service catalog and architectural patterns: Virtual Machines, managed Kubernetes (AKS), App Service and Azure Functions, Storage accounts and managed disks, Azure SQL and Cosmos DB, VNets with hybrid connectivity and global load balancing, Microsoft Entra ID and RBAC, and Key Vault secrets and encryption. Covers Azure service selection, infrastructure as code (ARM, Bicep, Terraform), observability with Azure Monitor and Kusto queries, cost governance and Azure Policy, the Azure Well-Architected design principles, and hybrid management via Azure Arc, common in enterprise Azure estates. For provider-agnostic trade-offs, see the cross-cloud entries.
Design a hub-and-spoke network architecture for a global enterprise with central security controls in the hub and multiple spoke VNets for apps across regions. Include ExpressRoute/VPN connectivity from on-prem, firewall placement (Azure Firewall vs NVA), VNet peering vs hub routing, and how to manage transitive routing and costs.
Sample Answer
Direct answer
Put shared security and connectivity services (a firewall, the ExpressRoute (a private, dedicated circuit connecting on-premises to Azure) or VPN gateway, and Azure Bastion, a managed service that gives browser-based remote access to virtual machines without exposing them via a public IP) in a central hub virtual network (VNet), connect each application or region's spoke VNet to the hub via VNet peering, and force all spoke-to-spoke and spoke-to-internet traffic through the hub's firewall using User-Defined Routes (UDRs), since VNet peering is non-transitive and spokes cannot reach each other directly without it.
Topology
flowchart TB
OnPrem[On-premises] --> GW[ExpressRoute or VPN Gateway]
subgraph Hub[Hub VNet]
GW
FW[Azure Firewall or NVA]
Bastion[Azure Bastion]
end
Hub <-->|VNet peering| Spoke1[Spoke VNet: App A, Region 1]
Hub <-->|VNet peering| Spoke2[Spoke VNet: App B, Region 2]
Spoke1 -. forced via UDR through firewall .-> Hub
Spoke2 -. forced via UDR through firewall .-> Hub
Because peering doesn't transit through the hub automatically, each spoke needs a UDR whose next hop is the firewall's private IP for any traffic destined for another spoke, the internet, or on-premises, and the hub-to-spoke peerings need "use remote gateways" and "allow gateway transit" configured correctly so on-premises traffic can actually reach the spokes through the hub's gateway.
Firewall placement: Azure Firewall versus a network virtual appliance (NVA)
Both live in a dedicated subnet in the hub (for Azure Firewall, a subnet named AzureFirewallSubnet sized at least /26 (CIDR notation for a block of 64 IP addresses) to leave room for the service's own autoscaling instances). Azure Firewall is a managed, autoscaling platform-as-a-service (PaaS) offering with no patching burden, billed on deployment and throughput, and it integrates natively with Azure Monitor and Firewall Manager for policy management across multiple hubs. A third-party NVA matches an existing on-premises firewall vendor's rule syntax and can cover an advanced feature (a specific intrusion detection and prevention signature set, for example) that Azure Firewall doesn't yet offer, at the cost of the team owning the NVA's own high availability (typically an active/active pair behind a load balancer), patching, and scaling.
Transitive routing and cost
Because all inter-spoke traffic hairpins through the hub, the firewall or NVA's throughput and cost scale with total inter-spoke traffic volume, not just north-south traffic (traffic to the internet or on-premises); this is easy to underestimate if spokes host microservices that talk to each other heavily. VNet peering itself bills per gigabyte transferred across the peering link in both directions, so a hub-and-spoke topology carries a real, volume-based networking cost layered on top of the firewall's own compute cost. If spoke-to-spoke traffic volume is high and latency-sensitive, that hairpin-through-the-hub cost and latency is worth surfacing as an explicit trade-off, not something the topology hides.
Worked example: a Payment Card Industry (PCI)-scoped spoke
For a spoke that must meet Payment Card Industry Data Security Standard (PCI DSS) scope requirements, route both its east-west traffic (to other spokes) and its north-south traffic (to the internet or on-premises) through the hub firewall, with logging retained specifically for that spoke's traffic to satisfy PCI DSS audit requirements, rather than relying on generic hub-wide logs alone. Use Azure Bastion, deployed once in the hub, for all administrative Remote Desktop Protocol (RDP) or Secure Shell (SSH) access into the PCI-scoped spoke's virtual machines (VMs), so no VM in that spoke ever needs a public IP address or a separately-managed jump box, centralizing both traffic inspection and administrative-access auditing at the hub boundary instead of duplicating firewall and bastion resources per spoke.
Trade-offs and pitfalls
- Forgetting that VNet peering is non-transitive is the most common hub-and-spoke design mistake; without explicit UDRs through the firewall, spokes simply cannot reach each other, full stop.
- A hub firewall that becomes a throughput bottleneck for heavy spoke-to-spoke traffic is a real, foreseeable failure mode; size it (or its autoscale ceiling) against actual east-west volume, not just expected internet-bound traffic.
- Placing Bastion or the firewall per-spoke instead of once in the hub duplicates cost and audit surface without adding real security; centralize shared services in the hub deliberately.
Design hybrid connectivity between an on-prem datacenter and Azure across two regions with stringent latency (<50ms) and high availability requirements. Compare ExpressRoute (private circuits) vs VPN Gateway (IPsec) for this scenario, explain BGP peering and route advertisement, failover strategies, and how to avoid asymmetric routing or single points of failure.
Sample Answer
Direct answer
Make ExpressRoute (Microsoft's private, non-internet circuit into Azure) the primary path for its predictable sub-50ms latency and service-level agreement (SLA), with a Site-to-Site VPN Gateway (an IPsec-encrypted tunnel over the public internet) as an active backup, both duplicated across two regions and two physically diverse circuits so no single carrier, router, or Azure gateway is a single point of failure. Use Border Gateway Protocol (BGP, the routing protocol that lets networks exchange reachability information) on every link, with route preference tuned so ExpressRoute always wins when it is healthy and the VPN takes over automatically, symmetrically, when it is not.
Structured elaboration
Why ExpressRoute over VPN Gateway here. ExpressRoute is a dedicated private circuit with predictable latency and a formal SLA, which is what a sub-50ms, high-availability requirement actually needs. A Site-to-Site VPN runs over the public internet (even if encrypted end to end), so its latency and jitter vary with internet conditions and it carries no comparable SLA. VPN's advantages are that it provisions in hours, not weeks, and costs far less, which is exactly why it is the right role for a backup path, not the primary.
Topology. Provision two ExpressRoute circuits terminating at physically diverse peering locations (different buildings, ideally different carriers), each connected into a regional Azure Virtual WAN hub or ExpressRoute gateway. Deploy active-active VPN gateways in both regions as the failover path. On-premises, terminate on at least two edge routers, each with its own physical uplink, both speaking BGP.
BGP peering and route advertisement. Every peering (ExpressRoute private peering and the VPN's BGP session) advertises prefixes in both directions: on-premises advertises its internal subnets to Azure, and Azure advertises the connected VNet prefixes back. Control which path wins with standard BGP attributes: a higher local preference or a shorter advertised AS-path on the ExpressRoute session makes routers prefer it over the VPN under normal conditions; when ExpressRoute fails, BGP simply stops hearing those routes and the VPN's routes become the best path automatically, with no manual re-routing.
Avoiding asymmetric routing and single points of failure. Asymmetric routing (traffic leaving over one path and returning over a different one) causes stateful devices like firewalls to drop return traffic they never saw the initial packet for. Prevent it by keeping route preference consistent on both ends: if on-premises prefers ExpressRoute outbound, Azure must also prefer the matching ExpressRoute path inbound, using the same BGP attributes on both sides rather than one side using static routes and the other using BGP. Redundant circuits on physically diverse paths, redundant gateways in active-active mode, and Bidirectional Forwarding Detection (BFD, a fast link-failure detection protocol that reacts in milliseconds instead of BGP's default tens of seconds) close the remaining single-point-of-failure gaps.
flowchart TD
OP1[On-prem router A] -- ExpressRoute circuit 1 --> AZ1[Azure region 1 hub]
OP2[On-prem router B] -- ExpressRoute circuit 2 --> AZ2[Azure region 2 hub]
OP1 -. VPN backup .-> AZ2
OP2 -. VPN backup .-> AZ1
AZ1 <--> AZ2
Validation before go-live. Integrate this into the hub-and-spoke design already in place for the workload's VNets: the ExpressRoute and VPN gateways terminate in the hub, and spoke VNets reach on-premises only through hub peering, so a single set of gateways serves every spoke. Before declaring the link production-ready, run a controlled failover test: withdraw the ExpressRoute route deliberately (not by physically cutting a cable) and confirm the VPN path takes over within the BFD detection window, traffic resumes without a duplicate or dropped-session storm, and route tables on both ends converge to the expected state.
Worked example
A workload like an SAP application landscape (used here only as an illustrative example of a genuinely latency-sensitive enterprise workload, not a prescription) typically needs application-tier-to-database-tier round trips well under the latency budget of a single user transaction. If the physical distance between the on-premises datacenter and the nearer Azure region is roughly 500 km, the one-way propagation delay in fiber (light travels at roughly two-thirds the speed of light in glass, so about 200,000 km per second) is 500 divided by 200,000 seconds, or 2.5 milliseconds, and a round trip is 5 milliseconds. That leaves roughly 45 of the 50ms budget for switching, queuing, and application-level processing at each hop, which is exactly why the design targets a private, low-jitter circuit like ExpressRoute instead of the public internet's much less predictable delay: the physics is not the constraint, the variance is.
Trade-offs & pitfalls
The pitfall this scenario is built to catch is treating BGP local preference as something you tune once and forget: if the two ends of the connection are configured by different teams (network engineering on-premises, cloud engineering in Azure) and they drift out of sync, asymmetric routing reappears silently and only shows up as intermittent, hard-to-reproduce connection resets. The second pitfall is skipping the failover rehearsal because the design "should" work; BGP convergence behavior under a real link failure is exactly the kind of thing that differs from the whiteboard, so test it before it is load-bearing.
Describe common Azure networking failure modes that can cause application outages: NSG misconfigurations, route table conflicts, DNS resolution failures, gateway/VPN outages, and Azure backbone incidents. Provide a prioritized runbook of diagnostic steps and automated checks (using Network Watcher, metrics, synthetic tests) you would implement to detect and remediate each failure quickly in production.
Sample Answer
Direct answer
Most Azure networking outages trace back to one of five failure modes: network security group (NSG) misconfigurations, route table conflicts, Domain Name System (DNS) resolution failures, gateway or VPN outages, and genuine Azure backbone incidents, and each needs a different first diagnostic step. Build a runbook ordered from fastest-to-check to slowest, backed by automated checks that catch most of these before a human ever gets paged.
Structured elaboration
The five failure modes, and their signature.
- NSG misconfiguration: a rule change (often a priority reordering or an overly broad deny) blocks traffic that was working a moment before; the signature is a sudden, complete failure that started at a known change time.
- Route table conflict or blackholing: a user-defined route (UDR) sends traffic toward a next hop that no longer exists or drops it, which looks like connectivity working at the network layer but packets simply vanishing.
- DNS resolution failure: clients get no answer or a stale/wrong answer from Azure DNS or a custom resolver; the signature is that the application is reachable by IP but not by name.
- Gateway or VPN outage: a Site-to-Site tunnel or ExpressRoute (a private, dedicated network connection from an on-premises network into Azure that bypasses the public internet) circuit flaps; the signature is hybrid connectivity failing while pure intra-Azure traffic keeps working.
- Azure backbone incident: multiple, unrelated resources in a region degrade simultaneously with no recent customer-side change; the signature is that Azure Service Health shows an active advisory.
Prioritized runbook.
- Check Azure Service Health first (1 to 2 minutes): if there is an active regional advisory, this is likely a backbone incident, and the response shifts to communicating impact and tracking Microsoft's status rather than chasing a local misconfiguration.
- Confirm scope from a jump box (3 to 5 minutes): is this one virtual machine, one subnet, or the whole region? Run a basic reachability test to the affected IP and port.
- Check effective NSG rules and effective routes on the affected network interface (5 to 8 minutes): Azure Network Watcher's "effective security rules" and "effective routes" views show the actual merged rule set, not just what one NSG object says, which is what catches a conflict between multiple NSGs applied at different scopes.
- Check DNS resolution (2 to 5 minutes, can run in parallel with step 3): resolve the affected name against Azure DNS and any custom conditional forwarder, and compare the answer to what is expected.
- Run Network Watcher's IP flow verify and connection troubleshoot tools (5 to 10 minutes): these simulate a specific packet's path and report exactly which rule or route would block it, which is faster than manually tracing hop by hop.
- Check gateway and VPN health (5 to 15 minutes): confirm tunnel status and BGP (Border Gateway Protocol, the routing protocol VPN and ExpressRoute connections use to exchange network routes) session state in Azure Monitor; if a redundant circuit exists, fail over to it as an immediate mitigation while root-causing the primary.
- Remediate: roll back the specific NSG rule or route that changed, restart the affected network interface if it is in a bad state, flush stale DNS caches, or re-establish the VPN tunnel, based on what steps 3 through 6 actually found, not a guess.
Automated checks to catch these before a human is needed. Alert on NSG deny-rule counts spiking, on route next-hop changes to any route table, and on VPN Gateway or ExpressRoute circuit availability metrics dropping. Run Network Watcher's connectivity checks on a schedule between key resource pairs so a broken path is detected by a synthetic probe before a real user hits it. Run synthetic HTTP availability tests (through Azure Monitor Application Insights availability tests, run from multiple global points of presence) against the application's public endpoint, since this is the check that most directly reflects what a real user experiences. Where safe, automate the fix: a Logic App or Azure Automation runbook that re-enables an NSG rule matching a known-good baseline, or that triggers gateway failover to a secondary circuit, both cut mean time to repair without waiting for a human to run the manual steps.
Worked example
Suppose synthetic availability tests start failing from three of five global test locations at 14:02, while the other two locations stay healthy. That asymmetry is itself diagnostic: a true regional backbone incident or a single gateway failure would typically affect all external probes uniformly, whereas a partial, location-dependent failure pattern points toward something route- or DNS-related that only some resolver paths hit. Following the runbook in order: Service Health shows no active regional advisory by 14:03, ruling out a backbone incident; confirming scope from a jump box by 14:07 shows the failure is limited to one subnet rather than the whole region. Checking Network Watcher's effective routes for the affected subnet at 14:13 shows a UDR was changed at 13:58 by an automated pipeline deploy, redirecting default traffic toward a network virtual appliance that was not yet provisioned in the target region. Rolling back that specific route change resolves the incident by 14:17, a fix that direct log correlation reached in about fifteen minutes by following the runbook's own steps in order, versus the much longer path of guessing at NSGs or DNS first.
Trade-offs & pitfalls
The recurring pitfall is skipping the Service Health check and spending the first ten minutes of an incident trying to fix a local configuration when the actual cause is a Microsoft-side event nothing on the customer side can remediate. The second is over-automating remediation for a fast-moving deploy pipeline: an automatic route or NSG rollback is safe for a known-bad pattern, but blindly reverting the most recent change during a genuine backbone incident can undo a legitimate, unrelated deployment and add a second outage on top of the first.
An e-commerce site requires OWASP Top 10 protections, end-to-end TLS, cookie affinity, and HTTP/2 support. Design a solution using Application Gateway v2 with WAF, discuss autoscaling settings, certificate management (Key Vault integration), and how to validate WAF rules without causing false positives.
Sample Answer
Direct answer
Use Application Gateway v2 in WAF_v2 SKU mode (WAF: Web Application Firewall, a layer that inspects and blocks malicious HTTP requests before they reach your app): it terminates TLS (with certificates pulled live from Key Vault so rotation doesn't require redeploying the gateway), natively supports HTTP/2 between client and gateway, and runs the OWASP Core Rule Set (CRS) against every request before it reaches your backend pool. Cookie affinity is a backend-pool setting on the gateway (session affinity using a gateway-managed cookie), not something you build yourself. The part teams get wrong is deploying the WAF straight into Prevention mode; the safe rollout is Detection mode first, tune against real traffic, then flip to Prevention.
Design
- SKU and scale: WAF_v2, with autoscaling enabled (set a minimum instance count of 2 for availability across zones, and a maximum based on expected peak; v2 scales on CPU/throughput automatically, unlike v1 which required manual instance counts). Deploy across availability zones for zone resilience at the gateway layer itself.
- TLS: end-to-end TLS means the gateway terminates the client's TLS session (cert from Key Vault, referenced by the gateway's user-assigned managed identity so it can read the secret without a stored credential) and re-encrypts to the backend pool using either the backend's own cert or a gateway-trusted internal CA. Key Vault integration means a cert renewal in the vault is picked up automatically (App Gateway polls periodically), so you don't hand-rotate a cert on the gateway itself.
- HTTP/2: enabled on the listener between client and gateway; App Gateway itself always speaks HTTP/1.1 to the backend pool, so don't assume HTTP/2 end-to-end, only client-to-gateway.
- Cookie affinity: enabled on the backend HTTP settings; the gateway injects its own affinity cookie so a user's session sticks to one backend instance, which matters if the app keeps in-memory session state (the better long-term fix is externalizing session state to Redis so affinity becomes an optimization rather than a correctness requirement, but that's a separate migration).
- WAF policy: attach a WAF policy running OWASP CRS (current major version) in Detection mode initially, scoped to this listener. Add custom rules only for things CRS won't catch on its own (rate limiting on the login endpoint, geo-blocking if relevant).
graph LR
C[Client, HTTP/2 + TLS] --> AGW[Application Gateway v2 + WAF]
KV[Key Vault] -.cert via managed identity.-> AGW
AGW -->|TLS re-encrypt, HTTP/1.1, affinity cookie| B1[Backend instance 1]
AGW --> B2[Backend instance 2]
AGW -->|logs + blocked/matched rules| LA[Log Analytics]
Worked example: validating WAF rules without false positives
The rollout sequence that actually avoids blocking real customers:
- Deploy the WAF policy in Detection mode attached to production traffic. Detection mode logs every rule match to the WAF logs in Log Analytics but does not block anything, so you get a real false-positive signal without any customer impact.
- Run for a representative window (at minimum a full business cycle, ideally 1 to 2 weeks to catch weekly patterns like batch jobs or partner integrations that only run on certain days) and query the WAF logs for the rules with the highest match counts.
- For each frequently-matching rule, look at the actual matched request. A rule that fires on
' OR '1'='1in a search box that gets%and quote characters from legitimate product names is a real false positive; a rule that fires on an actual SQL injection attempt in the same field is not. Common genuine false-positive sources: CRS's SQLi rules over-triggering on legitimate apostrophes (product names, addresses), file-upload size/type rules blocking legitimate large uploads, and request-header rules tripping on legitimate but unusual user-agent strings from internal tooling. - For confirmed false positives, add a narrowly-scoped exclusion (exclude a specific rule ID for a specific request argument or header, not a blanket disable of the rule everywhere) rather than turning the rule off globally, which would reopen the exact attack class it was catching for every other field.
- Only after the false-positive rate on real traffic is at or near zero, flip the policy to Prevention mode. Keep monitoring afterward: attackers adapt payloads over time, and CRS itself gets updated, so this isn't a one-time exercise.
Trade-offs and pitfalls
The most damaging mistake is going straight to Prevention mode on day one "because that's what WAF is for," which reliably blocks some fraction of real users (commonly checkout forms with special characters, or file uploads) with no warning before launch. The second common mistake is disabling entire rule categories to make the false positives stop, rather than scoping a narrow per-field exclusion, which quietly removes real protection. Cost-wise, WAF_v2 with autoscaling bills for the minimum instance count continuously plus consumption above that, so an autoscale minimum set too high "just to be safe" is a real, recurring cost, not a one-time one; size the minimum from actual off-peak traffic, not a guess.
Describe Azure Virtual Network fundamentals: address spaces, subnets, Network Security Groups (NSGs), User-Defined Routes (UDRs), service tags, and Azure-provided DNS. Provide an example CIDR allocation for production with three subnets (web, app, db) and explain how NSGs can isolate tiers while allowing required connectivity.
Sample Answer
Direct answer
A Virtual Network (VNet) is a private address space you carve into subnets, each of which can carry its own Network Security Group (NSG) for allow/deny packet filtering and its own User-Defined Route (UDR) to override Azure's default routing. Service tags let those rules reference a named group of Microsoft-maintained IP prefixes (like "Storage" or "Internet") instead of hardcoded addresses, and Azure-provided Domain Name System (DNS) resolves VM names inside the VNet automatically without you running your own DNS server.
The building blocks
- Address space: the VNet's overall private Classless Inter-Domain Routing (CIDR) range, typically drawn from the private ranges reserved by RFC 1918 (
10.0.0.0/8,172.16.0.0/12,192.168.0.0/16). - Subnets: subdivisions of that address space; every subnet lives entirely within one VNet and one region, and cannot span multiple VNets or regions.
- Network Security Groups (NSGs): a stateful, priority-ordered list of allow/deny rules for layer 3/4 traffic (source, destination, port, protocol), attached to a subnet or a network interface. Azure adds default rules at the lowest priority, including
AllowVnetInBound,AllowAzureLoadBalancerInBound, andDenyAllInBound, so anything you don't explicitly allow above those is denied by default. - User-Defined Routes (UDRs): override Azure's automatic system routes, most commonly used to force a subnet's traffic through a firewall or network virtual appliance (NVA) by setting a route's next hop type to "Virtual appliance" instead of the internet directly.
- Service tags: named, Microsoft-maintained groups of IP prefixes (
Storage,Sql,Internet,VirtualNetwork,AzureLoadBalancer, and others) that NSG and UDR rules can reference directly, so a rule keeps working as the underlying IP ranges for a service change over time. - Azure-provided DNS: a platform-managed resolver (at the well-known address
168.63.129.16) that resolves VM names within the VNet and forwards internet lookups, with no DNS server to deploy or patch; cross-VNet name resolution or custom domains typically move to Azure Private DNS zones or your own DNS servers instead.
Worked example: CIDR allocation for a three-tier production network
A 10.0.0.0/16 VNet (65,536 addresses) split into three /24 subnets:
| Subnet | CIDR | Usable addresses |
|---|---|---|
| Web | 10.0.1.0/24 | 251 |
| App | 10.0.2.0/24 | 251 |
| DB | 10.0.3.0/24 | 251 |
Azure reserves 5 addresses per subnet regardless of size (the network address, .1 for the default gateway, .2 and .3 for Azure's internal DNS mapping, and the broadcast address), so a /24's usable count is:
For p = 24: 28−5=251, verified directly (10.0.1.0/24 has 256 total addresses; 256 minus the 5 Azure reserves leaves 251).
Isolating tiers with NSGs while allowing required connectivity
| Subnet | Inbound allow | Inbound deny (default) | Outbound |
|---|---|---|---|
Web (10.0.1.0/24) | Port 443/80 from Internet (or narrower, from a load balancer's subnet only) | Everything else | To App subnet on the app's port |
App (10.0.2.0/24) | App port, from Web subnet's prefix only | Everything else, including direct Internet | To DB subnet on the database port |
DB (10.0.3.0/24) | Database port (for example, 1433 for SQL), from App subnet's prefix only | Everything else | Deny to Internet explicitly |
The database tier's explicit outbound deny to the internet matters as much as its inbound restriction: a compromised database tier reaching out to the internet is a common data-exfiltration path, and NSGs are stateful but don't stop an allowed inbound connection's application from opening its own outbound one.
Trade-offs and pitfalls
- Sizing subnets too tightly (a
/28for a tier expected to autoscale) is a common planning mistake; leave headroom, since resizing a subnet with resources already in it is disruptive. - Referencing a service tag instead of a hardcoded IP range is almost always the right call for anything Microsoft manages (
Storage,Sql), since the underlying addresses do change over time and a hardcoded rule silently goes stale. - A UDR forcing traffic through a firewall or NVA adds a real network hop and a potential single point of failure; plan its own high availability before making it mandatory for every subnet's egress (its outbound traffic).
Unlock Full Question Bank
Get access to all 17 Microsoft Azure Services and Architecture interview questions and detailed answers.
Sign in to ContinueJoin thousands of developers preparing for their dream job.