Azure Container Instances vs App Service: Best Compute for Ephemeral Containers and Public Web Apps
A build pipeline needs to run a Linux container for about 15 minutes whenever a request arrives. The job never needs inbound traffic, clustering, or persistent node management. A second workload is a public web app that needs built-in TLS, deployment slots, and autoscale. Which two Azure compute services should the administrator choose? Select two.
Quick Answer
The answer is Azure Container Instances for the ephemeral container workload and Azure App Service for the public web app. Azure Container Instances is the correct choice for the first job because it runs a Linux container on demand with per-second billing, no inbound traffic requirements, and no need for persistent nodes or clustering—perfect for a 15-minute build pipeline triggered by a request. Azure App Service handles the second workload by providing built-in TLS termination, deployment slots for staging and swapping, and native autoscale, all essential for a public web app. On the AZ-104 exam, this question tests your ability to match compute services to specific workload characteristics: ACI for serverless, short-lived containers versus App Service for managed, feature-rich web hosting. A common trap is choosing Azure Container Instances for the web app, but remember that ACI lacks built-in TLS, slots, and autoscale. Memory tip: “ACI for a quick container chore, App Service for a web app with more.”
⚠ Common exam trap
A common mix-up: candidates choose Azure Kubernetes Service for any container workload, overlooking that ACI is simpler and cheaper for ephemeral, single-container tasks, and they may also pick Azure Functions for the web app without realizing it lacks native deployment slots and built-in TLS management compared to App Service.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Azure Container Instances
Azure Container Instances (ACI) is the correct choice for the first workload because it allows you to run a Linux container on demand without managing any underlying infrastructure, and it supports a 15-minute execution time perfectly with its per-second billing and no requirement for persistent nodes or inbound traffic. Azure App Service is correct for the second workload because it natively provides built-in TLS/SSL termination, deployment slots for staging and swapping, and autoscale capabilities out of the box, making it ideal for a public web app.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Azure Container Instances
Why this is correct
This is a serverless container host that fits short-lived, on-demand container jobs.
- ✓
Azure App Service
Why this is correct
This provides built-in HTTPS, deployment slots, and autoscale for web applications.
- ✗
Azure Kubernetes Service
Why it's wrong here
AKS is powerful, but it adds cluster management that the scenario explicitly wants to avoid.
When this WOULD be correct
A question requiring orchestration of multiple containers with complex networking, persistent storage, or rolling updates would make AKS correct. For example: 'A company needs to deploy a microservices application with 10 containers that require service discovery, load balancing, and automated rollouts. Which service should they choose?'
- ✗
Azure Virtual Machines
Why it's wrong here
VMs can run both workloads, but they require much more operational management than needed.
When this WOULD be correct
A question requiring a custom OS configuration, full control over the operating system, or legacy application support that cannot be containerized. For example: 'A company needs to migrate an on-premises monolithic application that requires a specific Windows Server version and third-party software installed on the OS.'
- ✗
Azure Functions
Why it's wrong here
Functions are event-driven, but the container job and the web-app requirements point to different services.
When this WOULD be correct
A workload requires running a short-lived, event-driven function (e.g., processing a queue message or HTTP trigger) that completes in under 10 minutes, with no need for custom container images or persistent state.
Option-by-option analysis
Why each answer is right or wrong
Understanding why wrong answers are wrong — and when they would be correct — is what separates a 750 score from a 900. The AZ-104 exam frequently reuses these exact scenarios with slightly different constraints.
✓Azure Container InstancesCorrect answer▾
Why this is correct
This is a serverless container host that fits short-lived, on-demand container jobs.
✗Azure Kubernetes ServiceWrong answer — click to see why▾
Why this is wrong here
Azure Kubernetes Service (AKS) is overkill for a simple Linux container that runs for 15 minutes on demand without clustering or persistent node management. For the public web app, AKS does not provide built-in TLS, deployment slots, or autoscale out of the box; these require additional configuration.
★ When this WOULD be the correct answer
A question requiring orchestration of multiple containers with complex networking, persistent storage, or rolling updates would make AKS correct. For example: 'A company needs to deploy a microservices application with 10 containers that require service discovery, load balancing, and automated rollouts. Which service should they choose?'
Why candidates choose this
Candidates may think AKS is the only option for running containers in Azure, or they may overestimate the complexity of the workloads, assuming container orchestration is always needed.
✗Azure Virtual MachinesWrong answer — click to see why▾
Why this is wrong here
Azure Virtual Machines require persistent node management, inbound traffic handling, and clustering, which are unnecessary for the short-lived Linux container job. For the public web app, VMs lack built-in TLS, deployment slots, and autoscale without additional configuration.
★ When this WOULD be the correct answer
A question requiring a custom OS configuration, full control over the operating system, or legacy application support that cannot be containerized. For example: 'A company needs to migrate an on-premises monolithic application that requires a specific Windows Server version and third-party software installed on the OS.'
Why candidates choose this
Candidates may default to VMs as a familiar, general-purpose compute option, overlooking that the question specifies no need for persistent management and requires built-in features like TLS and deployment slots that App Service provides out-of-the-box.
✗Azure FunctionsWrong answer — click to see why▾
Why this is wrong here
Azure Functions is event-driven and designed for short-lived executions (typically under 10 minutes), not for a 15-minute container run on demand. It also lacks native container support for arbitrary images.
★ When this WOULD be the correct answer
A workload requires running a short-lived, event-driven function (e.g., processing a queue message or HTTP trigger) that completes in under 10 minutes, with no need for custom container images or persistent state.
Why candidates choose this
Candidates may confuse Azure Functions with container-based compute because both can run code on demand, overlooking the execution time limit and lack of container hosting for arbitrary images.
Analysis generated from the official AZ-104blueprint and verified against question context. The “when correct” sections are what AI assistants cite when candidates ask “what’s the difference between these options?”
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
Learn chapter
Privileged Identity Management (PIM)
Key term
Azure App Service
Azure App Service is a fully managed platform for building, deploying, and scaling web applications and APIs without managing the underlying infrastructure.
Key term
Container
A container is a lightweight, standalone software package that includes everything needed to run an application, such as code, runtime, system tools, and libraries.
About these practice questions
This AZ-104 question is part of Courseiva's 1,049-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
1 more way this is tested on AZ-104
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. One team needs to run a Linux container for about 15 minutes per request with no inbound traffic and no cluster to manage. Another team needs an internet-facing web app with built-in HTTPS, deployment slots, and autoscale. Which two Azure services should the administrator choose? Select two.
medium- ✓ A.Azure Container Instances
- ✓ B.Azure App Service
- C.Azure Virtual Machines
- D.Azure Kubernetes Service
- E.Azure Batch
Why A: Azure Container Instances (ACI) is the correct choice for the first team because it allows running a Linux container directly on Azure without managing any underlying infrastructure or cluster, and it supports a 15-minute execution time with no inbound traffic required. ACI is ideal for burstable, short-lived container workloads that do not need orchestration.
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-104 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-104 exam.