RANGER GAMEZ

Microsoft Azure Fundamentals (AZ-900) · chapter 2 of 14

Paying by the scoop

Objective 1.1

The consumption-based model

CapEx vs OpEx

Capital expenditure (CapEx) is up-front spending on physical infrastructure: servers, network gear, datacenter space. Operational expenditure (OpEx) is ongoing spending on services over time. Because you pay for cloud services as you consume them, cloud computing is classified as an operational expense. Kibble & Co.'s server room was CapEx. Pawsome's monthly Azure bill is OpEx.

Two bar charts of spending over twelve months. Top, in orange, CapEx, capital expenditure: one very tall bar in month one, when the servers are bought up front, then small bars for power and upkeep; a note says you own the gear and keep paying for it even when it sits idle. Bottom, in green, OpEx, operational expenditure: bars that rise and fall each month with how much you use, with no up-front cost. A card underneath explains the cloud's consumption-based model: no up-front cost, pay only for what you use, and when you stop using something you stop paying for it.
CapEx: buy the servers up front and own them. OpEx: pay as you go each month. The cloud is consumption-based: pay only for what you use.

Exam tip Exam pattern: "no up-front costs" or "pay for what you use" points to OpEx and the consumption-based model.

Pay for what you use, nothing more

Under the consumption-based model you rent compute power and storage and release it when you're done. Microsoft lists these benefits:

  • No upfront costs for hardware or datacenter infrastructure
  • No need to buy and manage capacity that may sit unused
  • Add resources when demand increases
  • Release resources (and stop paying for them) when demand decreases

The guessing game you stop playing

In a traditional datacenter you estimate future needs in advance. Guess high and you pay for idle servers; guess low and the shop crawls until new hardware arrives. In the cloud you match resources to real demand: add virtual machines (VMs) for the holiday rush, remove them in January, and pay only for what ran. The provider handles power, cooling, hardware and networking.

Gus: So the "big server for the future" I almost bought...

Dev: ...would be sitting idle in the back room right now, still costing money.

Check yourself 1Pawsome Pets wants to avoid buying servers up front and pay only for the resources it uses each month. Which kind of spending is this?

  1. Capital expenditure (CapEx)
  2. Operational expenditure (OpEx)
  3. Fixed asset purchasing
  4. Prepaid hardware leasing
Show the answer

Answer: B. Operational expenditure (OpEx)

Paying as you consume services is an operational expense. That's how the consumption-based cloud model is classified.

Objective 1.1

Comparing cloud pricing models

Pay-as-you-go

Pay-as-you-go is the standard cloud pricing model: you pay for the services you consume, often metered per second, per hour or per gigabyte, with no long-term commitment. It's ideal for variable or unpredictable workloads, short projects and test environments. It's the most flexible option, but not the cheapest per hour for something that runs all day, every day.

Commit and save: reservations and savings plans

If usage is steady, a commitment pays off. With Azure Reservations you commit to a specific resource type (for example, one VM size in one region) for one or three years, for up to 72% off pay-as-you-go prices. With an Azure savings plan for compute you commit to a fixed hourly spend on compute for one or three years, across sizes and regions, for up to 65% off.

Exam tip Stable workload that never changes = reservation (deepest savings). Steady spend, but sizes or regions change = savings plan. Spiky or short = pay-as-you-go.

Spot pricing: cheap, but it can be taken back

Azure Spot Virtual Machines run on Azure's unused capacity at a big discount. The catch: when Azure needs that capacity back, it evicts the Spot VM with about 30 seconds' notice, and there's no service-level agreement (SLA) promising uptime. Use Spot only for work that can be interrupted and restarted, such as batch jobs or dev/test. Never for the cash registers.

Rosa: So the warehouse's overnight label batch could use the cheap ones?

Dev: Exactly. If it gets kicked off, it just runs again.

Check yourself 2Pawsome Pets' inventory VM runs 24/7, at the same size, in the same region, and will for the next three years. Which pricing option gives the biggest savings?

  1. Pay-as-you-go
  2. Azure savings plan for compute
  3. Azure Spot Virtual Machines
  4. An Azure Reservation
Show the answer

Answer: D. An Azure Reservation

A steady workload that won't change size or region is the classic case for a reservation: a one- or three-year commitment with the deepest discount.

Objective 1.1

Serverless

Servers you never see

Serverless computing doesn't mean there are no servers. It means you never manage them. The cloud provider automatically provisions, scales and maintains the infrastructure; you supply only the code. Serverless code is event-driven: it wakes up when something happens (a web request, a timer, a new message), does its job, and goes back to sleep.

Billed only while it runs

Nothing sits running between events, so you don't pay for idle time. With Azure Functions, Azure's main serverless compute option, the code runs when triggered, its resources are released when it finishes, and Azure charges for the compute time used while it runs. Functions also scale automatically: one order or ten thousand, Azure adds capacity as the events arrive.

Gus: Ours texts customers "your order is ready for pickup". It runs maybe forty times a day.

Dev: A perfect serverless job: short, event-driven, idle the rest of the time.

When serverless fits

Serverless sits at the most managed end of compute. You trade control for convenience: no operating system to patch, no capacity to plan. It fits short tasks triggered by events and workloads with unpredictable demand. It's a poor fit when you need full control of the operating system or custom software installed on the server; that's a virtual machine's job.

Exam tip Keywords: "event-driven", "no infrastructure to manage", "pay only when the code runs" = serverless (Azure Functions).

Check yourself 3Which statement about serverless computing is true?

  1. No physical servers are involved at any point
  2. You patch the operating system that the code runs on
  3. The provider provisions and scales the infrastructure for you
  4. You must reserve its capacity for one or three years in advance
Show the answer

Answer: C. The provider provisions and scales the infrastructure for you

Serverless still runs on servers, but the provider provisions, scales and maintains them. You supply code, and it runs when events trigger it.

Practice questions

Answer in your head, then open the answer. Ranger's Sky Desk has 482 questions like these for Azure Fundamentals, with mock exams.

Question 1Kibble & Co. plans to sell pet food online in Europe. Dev wants the web app to run near European shoppers for low latency, but nobody wants to build a datacenter there. Which cloud computing benefit applies?

  1. Vertical scaling: give the existing US server more CPUs and more memory
  2. Private cloud: host the app in Kibble & Co.'s head office
  3. SaaS: move the staff email system to a hosted service
  4. Global reach: deploy in a provider region close to those users
Show the answer

Answer: D. Global reach: deploy in a provider region close to those users

Cloud platforms offer global reach: you can place services in regions close to your users without building your own datacenters. A larger server in the wrong place does not fix latency.

Question 2Dev tells Mr. Barkley that the cloud lets teams "test faster and recover faster." What makes this possible?

  1. Cloud hardware never fails, so recovery is never needed
  2. Every cloud resource includes unlimited free backups
  3. Resources can be created and removed in minutes when they are needed
  4. The provider runs all of your tests for you as part of the standard service
Show the answer

Answer: C. Resources can be created and removed in minutes when they are needed

Because resources are provisioned on demand, teams can spin up test environments or replacement capacity quickly and delete them when done. The cloud does not promise hardware that never fails.

Question 3Pawsome Pets runs its web app in Azure. Under the shared responsibility model, which task is always Microsoft's, whatever cloud service type is used?

  1. Physical security of the datacenter
  2. Classifying the shop's customer data
  3. Deciding which staff accounts exist
  4. Securing the phones that connect to the app
Show the answer

Answer: A. Physical security of the datacenter

Physical datacenter, physical network and physical hosts are always the provider's job in IaaS, PaaS and SaaS. Data, accounts and connecting devices stay with the customer.

Question 4Maya is explaining the shared responsibility model to new staff. Which responsibility stays with Pawsome Pets in IaaS, PaaS and SaaS alike?

  1. Patching the hypervisor on the host servers
  2. The information and data stored in the cloud
  3. Replacing failed physical disks
  4. Power and cooling for the servers
Show the answer

Answer: B. The information and data stored in the cloud

Whatever the service type, the customer always owns its data, the devices allowed to connect, and its accounts and identities. Physical infrastructure is always the provider's.

Question 5Sam runs SQL Server that he installed on an Azure virtual machine. Priya's team uses Azure SQL Database, a managed service, for another app. Who applies the database engine patches in each case?

  1. Microsoft patches both, because both run in Azure
  2. Sam's team patches both database engines
  3. Sam patches it on the VM; Microsoft patches Azure SQL Database
  4. Microsoft patches the VM copy; Priya's team patches Azure SQL Database
Show the answer

Answer: C. Sam patches it on the VM; Microsoft patches Azure SQL Database

With software installed on a VM (IaaS), the customer handles its patches and updates. With a managed database (PaaS), the provider maintains the database itself, while the customer still owns the data in it.

Practice it in Ranger's Sky DeskThe same lessons as a story, with drills, hands-on labs and mock exams. Free, in your browser.
Play free

Microsoft, Azure, Intune and Windows are trademarks of the Microsoft group of companies. Ranger Gamez is not affiliated with or endorsed by Microsoft. The practice questions are written to the published exam objectives; they are not real exam questions.