The compute domain in the AZ-104 exam accounts for 20–25% of all questions. That means one in every five questions comes from this area. Among those, VM (Virtual Machine) management and deployment automation are the key topics. It may sound difficult at first, but when you think of it through everyday analogies, it's much simpler than you'd expect.
Virtual Machines
What Is a VM?
A VM is a virtual computer in the cloud. You don't need to buy or install a physical computer — you can simply rent one as needed. It's similar to booking a hotel room. A hotel offers various room sizes — single, double, suite — and you check out after using it for however long you need. VMs work the same way: they come in sizes from small to very large, and you can change or delete them as needed.
VM Sizes and Disks
What Is a VM Size (SKU)?
The VM size (SKU) determines the performance specifications of the VM. Simply put, it's choosing "how fast a computer to rent." The size determines the number of CPUs, memory (RAM), and storage disk performance all at once.
For example, just as the computer for an employee who only does office work and the computer for a designer doing 3D rendering need different specs, you need to choose the right size for your workload (the actual tasks being performed) to use resources efficiently without wasting costs.
Managed Disk Types
VMs need storage space, much like a hard disk. In Azure, this storage space is called a "managed disk," and you can choose from three types depending on your purpose.
| Disk Type | Summary | Primary Use Case | |-----------|---------|------------------| | Premium SSD | Fastest and most reliable | Production services | | Standard SSD | Mid-range performance, reasonable cost | Development and test environments | | Standard HDD | Slow but inexpensive | Backups, logs, and other non-critical data |
Premium SSD is suitable for live services such as banking or e-commerce that must respond quickly 24 hours a day. Its high IOPS (input/output operations per second) allows it to process large volumes of data requests quickly.
Standard SSD is suitable for environments where developers create new features or run tests. Since it's not exposed to real customers, cost efficiency is more important than speed.
Standard HDD is suitable for data where the goal is inexpensive storage rather than speed — like old log files or backup data that's only occasionally retrieved.
Exam Tip: When you see "production workload," think Premium SSD. When you see "development/test," think Standard SSD.
Availability Options
Why Is Availability Important?
Imagine the server for your online shopping mall suddenly goes down. Customers can't make purchases, revenue drops, and you lose trust. Azure provides ways to distribute VMs across multiple locations to prevent this. Even if one goes down, the others keep running.
Availability Set
An Availability Set is a method of physically separating and distributing VMs within the same data center. There are two key concepts.
Fault Domain (FD) is a group of VMs that share the same power supply and network switch. Like devices connected to the same electrical circuit in a building, if that circuit trips, they all go down. So Azure places VMs in different fault domains so that if one power supply fails, other VMs remain alive.
Update Domain (UD) is a group of VMs that restart at the same time when Azure performs maintenance (updates). Azure doesn't restart all VMs at once — it processes them in order by update domain. This ensures the service is not interrupted during maintenance.
| Option | Protection Against | How It Works | |--------|-------------------|--------------| | Availability Set | Hardware failures, maintenance | Separated using Fault Domains (FD) + Update Domains (UD) | | Availability Zone | Entire data center failure | Placed in physically separate buildings within a region |
!Availability Set versus Availability Zone
Availability Zone
If an Availability Set is "dividing rooms within the same building," an Availability Zone is "placing them in entirely different buildings." A region like East Asia has multiple physical data centers, each called an Availability Zone. Even if a fire or power outage strikes one data center, VMs in other zones continue to operate normally.
Availability Set: Protects against hardware failures within a single data center Availability Zone: Protects against full data center failures (natural disasters, power outages, etc.)
VM Scale Sets (VMSS)
What Is VMSS?
VM Scale Sets automatically increases or decreases the number of identical VMs. Instead of manually adding VMs one by one in the portal, scaling happens automatically according to defined rules.
For example, suppose employees use the internal system heavily from 9 AM to 6 PM. You can schedule the VM count to scale up to 10 during business hours and scale down to 2 after hours. This allows you to use more resources only when needed and reduce costs when they're not.
Automatic Scaling
Scaling rules can be configured based on various criteria.
CPU-based: "If CPU usage exceeds 80%, add 2 more VMs" Memory-based: "If memory usage exceeds 70%, scale out" Schedule-based: "Maintain a minimum of 5 VMs every Monday at 8 AM"
With these settings in place, the system automatically responds when traffic spikes and automatically scales down when idle — saving costs.
Upgrade Policy
The upgrade policy determines how VM images are updated to a new version in VM Scale Sets.
Automatic: Azure automatically updates all instances on its own. Fast, but may temporarily affect the service. Manual: The administrator manually runs the update at the desired time. Provides the most control. Rolling: Instances are updated sequentially starting with a subset. Used when you want to update safely without service interruption.
ARM Templates and Bicep
What Is Deployment Automation?
Imagine having to click through the Azure portal one by one to create VMs, networks, databases, and storage every time you open a new online store. Each time, settings might differ slightly, and mistakes can happen. Deployment automation means "writing the required infrastructure configuration as code in advance and repeatedly creating the same setup with a single click." Like cooking from a recipe — once you have a good recipe, anyone can produce the same result.
ARM Templates
ARM templates are files that declaratively define Azure resources in JSON format. "Declarative" means you describe "what to create" rather than "how to create it." As a cooking analogy, it's describing the final dish rather than the process.
Key Sections
ARM templates are divided into four main sections.
parameters: Values entered from outside when the template is executed. For example, the VM name or location (region) can be specified differently each time. variables: A place to consolidate values used multiple times within the template. Changing it once applies to the entire template. resources: Defines the actual Azure resources to create (VMs, networks, disks, etc.). The most critical section. outputs: Outputs information needed after deployment completes (e.g., the VM's IP address).
Useful Features
Export template is a feature that automatically extracts an ARM template from resources already created in Azure. Useful when you want to save an environment built directly in the portal as code.
What-if is a feature that lets you check in advance "what changes will happen if I run this template?" before actually deploying. It's like checking for side effects before filling a prescription. You can detect unexpected resource deletions or changes in advance.
Bicep
What Is Bicep?
Bicep is a language that makes ARM templates easier to read. The JSON of ARM templates can look complex with many brackets and quotation marks. Bicep expresses the same content with a much more concise and intuitive syntax.
As an analogy, if ARM templates are a legal document in English, Bicep is like a plain-language guide that expresses the same content in simple terms. The content is the same, but it's much easier to read.
Relationship with ARM Templates
An important point is that even if you write in Bicep, it is automatically converted to an ARM template (JSON) when deployed to Azure. In other words, the ARM template is what actually executes, and Bicep is simply a language that's easier for humans to write.
Additionally, ARM templates and Bicep support bidirectional conversion. You can convert an existing ARM template to Bicep, or export Bicep to an ARM template.
!ARM Templates versus Bicep
Exam Key Summary