Hosting an application: web apps, containers and virtual machines
Choosing where an application runs in Azure: what App Service manages that you would otherwise build yourself, when a container platform is the right shape, and where the responsibility for patching the operating system actually lands.
Lesson 5 of 11 in objective architecture-and-services. Azure architecture and services, part of Microsoft Certified: Azure Fundamentals (AZ-900).
A continuum of control against effort
Hosting options in Azure are not a list of alternatives so much as a line. App Service manages the platform and leaves you the least to run; container platforms give portability and density, with orchestration as a separate decision; virtual machines give total control and, inseparably, total responsibility. The general rule for this exam and for real designs is the same: choose the highest-level option the application's requirements still fit inside.
The corollary is the sentence that resolves most of these questions. The more a platform manages for you, the less it lets you change. So a requirement about scaling, patching, certificates or release mechanics is an argument for the platform, and a requirement about anything underneath the application is an argument against it.
What App Service gives you that you would otherwise build
App Service is the managed host for web applications and APIs written in the supported runtimes. Out of the box it gives managed certificates and HTTPS, autoscaling rules, and deployment slots — a slot is a second copy of the application you can deploy to, warm up, and then swap into production, with the previous version left in the slot so a bad release can be swapped straight back. Building that release choreography by hand on a virtual machine is a project; here it is a feature.
What you give up is the box. You do not get remote desktop or SSH access to the instance, and that is the bargain rather than a limitation: giving up the machine is precisely what buys you a platform somebody else maintains. App Service can also run containers, which is worth knowing because it makes "we containerised it" a weaker signal than candidates expect — a single web application in a container is still a web application.
Containers: one of them, or a fleet
Azure Container Instances is the fastest way to get a container running with nothing to operate: no cluster, no scheduler, no node pool. Azure Kubernetes Service exists for the case where something has to keep deciding where workloads run, restart them when they fail, upgrade them without downtime and let them find each other by name. Azure runs the control plane; you run and pay for the nodes and the workloads on them.
The tell in a question is vocabulary rather than scale. Scheduling, self-healing, rolling upgrades and service discovery are the definition of orchestration, and any stem using two or three of them has named Kubernetes Service. A stem that says one job, one container, no cluster to manage has named Container Instances just as clearly.
Where the responsibility boundary lands
The shared responsibility model is easiest to hold as a stack. The physical datacentre, the hosts and the network under them are always Microsoft's. Your data, your identities and who has access to them are always yours, in every service type. The operating system, the runtime and the middleware in between move: on infrastructure as a service they are yours, on a platform service they are Microsoft's, and choosing a hosting option is therefore also choosing how much of that middle you are volunteering to own.
The guest operating system is the clearest example, and the one the exam uses. On App Service and Azure Functions the platform is maintained for you. On a virtual machine it is yours — and Azure's automatic guest patching does not change that. It is a feature you enable and then verify, which moves the labour rather than the responsibility.
Worth carrying in
- Azure App Service
- Managed hosting for web applications and APIs. Certificates, scaling and slots included.
- Deployment slot
- A second copy of the app you warm up and swap into production — and swap back.
- Azure Container Instances
- One container, running, with no orchestrator to operate.
- Azure Kubernetes Service
- A managed orchestrator. Azure runs the control plane; you run the workloads.
- Orchestration
- Scheduling, self-healing, rolling upgrades and service discovery across a fleet.
- Shared responsibility model
- Who owns which layer. The middle of the stack moves with the service type.
- Static website hosting
- Files served from blob storage. No server-side code runs.
What the exam does with this
- "Warm up a build and swap it into production" is a deployment slot, and naming it names App Service on its own.
- Guest operating system patching is yours on a virtual machine and Microsoft's on App Service and Functions. Automatic guest patching moves the work, not the responsibility.
- The orchestration words — scheduling, self-healing, rolling upgrades, service discovery — point at Kubernetes Service every time they appear together.
- A cluster for one API is the wrong-sized answer, and the exam offers it precisely because it would technically work. Ask what the stated requirements actually need.
- Static hosting from blob storage serves files that already exist. It cannot run server-side code, which is the whole of why it is wrong for an API.
- Objective
- architecture-and-services. Azure architecture and services
- Share of the exam
- 38.46% (the whole objective)
- Questions in this lesson
- 3
- Signed for by a person
- 0
Partly checked. None of the 3 questions here has been read against the cited source by a person. 3 questions have been checked against their cited clause by an automated pass — which is not the same thing, and is not a signature.
Only questions a person has signed for are used in mock exams here. That is the whole difference between the two kinds of checking above.
Questions in this lesson
- A web API written in a supported framework must be online next week. The team wants managed HTTPS, scaling out on demand, a way to warm up a new build and swap it into production, and no operating system to patch. Which hosting option is the natural fit? machine-checked
- A containerised platform has grown to thirty services that must be scheduled across nodes, restarted automatically when they fail, upgraded without downtime, and able to find each other by name. Which hosting option matches that list? machine-checked
- A governance review asks, for each hosting option in use, who is responsible for patching the guest operating system. Which statement is accurate? machine-checked
Drill this lesson
A lesson is one sitting: the trainer draws a short run from these questions alone and spaces the ones you get wrong.
Practise Hosting an application: web apps, containers and virtual machines
The rest of objective architecture-and-services
- Regions, region pairs, availability zones and datacentres
- Resources, resource groups, subscriptions and management groups
- Virtual machines, containers and functions compared
- Virtual machine options, and what a virtual machine needs
- Hosting an application: web apps, containers and virtual machines — you are here
- Virtual networks, subnets, peering and Azure DNS
- Reaching Azure privately: VPN Gateway, ExpressRoute and endpoints
- Storage accounts, storage services, tiers and redundancy
- Moving files and migrating workloads into Azure
- Microsoft Entra ID, authentication and role-based access control
- Zero Trust, defence in depth and Defender for Cloud