Microsoft Azure

Core Compute — Virtual Machines & Scale Sets

Run Windows/Linux VMs and scale them elastically with VM Scale Sets behind a load balancer.

Azure VMs are the rented servers. The interview is about the fleet around one, not the one.

Leasing identical machines from a depot that automatically adds or removes machines as the workload changes and instantly swaps any that fail — and gives a loyalty discount (hybrid benefit) if you already own the software licences.

Key Concepts

1
The series are named for what they are tuned for.
    B   burstable        cheap, accrues credits while idle. Dev,
                         low-traffic sites. Runs out under load.
    D   general purpose  web and application servers
    E   memory optimised caches, in-memory databases
    F   compute optimised CPU-bound work
    N   GPU              inference, training, rendering
2
B-series is the one that bites. It is cheap because it banks credits when idle and spends them when busy. A sustained load exhausts them and the VM is throttled to its baseline — which can be a fraction of a core.
3
Scale Sets manage the fleet. A VMSS keeps an identical group at a target size, spread across zones, replacing anything that fails its health probe:
4
    autoscale   CPU > 70% for 5 min -> add 2, max 20
                CPU < 30% for 10 min -> remove 1, min 3
    schedule    scale up before a known peak
5
Zones versus sets is the Azure-specific availability question:
6
    Availability Zone  separate DATACENTRES in the region
    Availability Set   fault and update domains inside ONE datacentre
7
Zones are the stronger guarantee and the modern default.
8
Flexible orchestration is now the default VMSS mode — it can mix sizes and handle VMs more like individual machines, where Uniform mode required them identical.
9
Pricing is a lever, not a footnote.
    pay-as-you-go     no commitment
    Reserved / Savings Plan   1 or 3 years, up to ~72%
    Spot              deep discount, evicted with 30 seconds' notice
    Hybrid Benefit    reuse owned Windows and SQL licences --
                      often the largest single saving on Azure
10
What stays yours. The operating system, patching and the image pipeline. Choosing VMs over App Service, Container Apps or Functions should be a decision about needing that control, not a default.
11
What the interviewer is probing.1. "Your B-series VM is fast in testing and slow in production. Why?" Probing: burst credits, which is an Azure-specific trap. Stalls: "It needs a bigger size." Moves up: B-series banks credits while idle and spends them under load; sustained traffic exhausts them and throttles the VM to a baseline that can be a fraction of a core.
12
2. "Availability Set or Availability Zone?" Probing: the difference in what they protect against. Stalls: "They are the same thing." Moves up: a set spreads across fault and update domains inside one datacentre; zones are separate datacentres, so only zones survive a datacentre failure.
13
3. "What is Azure Hybrid Benefit?" Probing: the biggest Azure-specific saving. Stalls: "A discount." Moves up: applying Windows Server and SQL licences you already own to cloud compute, often halving the cost — and most migrating organisations already hold them.
14
4. "How does a scale set replace a failed instance?" Probing: auto-healing. Stalls: "Someone restarts it." Moves up: the health probe marks it unhealthy and the scale set terminates and relaunches from the template, keeping the target count.