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 (A) is correct because it provides the fastest way to run a Linux container on demand without provisioning or managing any nodes, which fits the 15-minute, request-triggered job that needs no inbound traffic, clustering, or persistent orchestration. Azure App Service (B) is correct because it is a fully managed PaaS web hosting platform that natively supports built-in TLS/SSL certificates, deployment slots for staging and swap, and autoscale rules for a public web app. Azure Kubernetes Service (C) is not appropriate because it requires managing a cluster and node pools, which is unnecessary for a short-lived, non-clustered container job. Azure Virtual Machines (D) would require manual OS patching, scaling, and TLS configuration, adding management overhead the scenario explicitly avoids. Azure Functions (E) is a serverless event-driven compute service that is not designed to host a continuously running public web app with deployment slots and built-in TLS.
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
Azure Container Instances runs a container to completion without provisioning or managing any nodes, suiting the 15-minute, request-triggered job that needs no inbound traffic or clustering. Billing is per-second for the container group, so the ephemeral pipeline workload costs only its short runtime.
- ✓
Azure App Service
Why this is correct
Azure App Service provides built-in TLS termination, deployment slots for staged swaps, and autoscale rules, matching the public web app's stated requirements. It is a fully managed platform, so no node or cluster management is needed for either workload.
- ✗
Azure Kubernetes Service
Why it's wrong here
Azure Kubernetes Service adds cluster and node pool management, which the short-lived, non-clustered container job explicitly does not need. AKS is the right choice when workloads require orchestration, scaling across many containers, service discovery, or persistent cluster operations.
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
Azure Virtual Machines require you to provision, patch, and manage the host and container runtime, and they lack built-in TLS, deployment slots, and autoscale for the web app. VMs suit workloads needing full OS control or custom kernel or networking configurations that PaaS cannot provide.
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
Azure Functions executes event-driven code, not a 15-minute container with no inbound traffic; its consumption model caps runtime and lacks the container control the pipeline needs. It is tempting because Functions suits short, trigger-based tasks, but Container Apps or ACI fits this scenario.
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
Azure Container Instances runs a container to completion without provisioning or managing any nodes, suiting the 15-minute, request-triggered job that needs no inbound traffic or clustering. Billing is per-second for the container group, so the ephemeral pipeline workload costs only its short runtime.
✗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
Blob Lifecycle Management Policies
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
AKS
Azure Kubernetes Service (AKS) is a managed container orchestration service on Microsoft Azure that simplifies deploying, managing, and scaling containerized applications using Kubernetes.
About these practice questions
This AZ-104 question is part of Courseiva's 1,053-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.