2.4 Azure App Service, Containers, and Serverless
Key Takeaways
- Azure App Service is PaaS web hosting: you deploy code and Azure manages the OS, patching, load balancing, and scaling for web apps, REST APIs, and mobile backends.
- Azure Container Instances (ACI) is the fastest way to run a single container with per-second billing and no orchestration; Azure Kubernetes Service (AKS) manages many containers at scale.
- AKS gives a free managed control plane while you pay only for the worker-node VMs that run your pods; Azure Container Apps is serverless containers that scale to zero.
- Azure Functions is serverless event-driven code billed per execution on the Consumption plan; Azure Logic Apps is low-code workflow automation billed per action.
- Exam scenarios test the key differentiator: full OS control = VMs, managed web app = App Service, single container = ACI, orchestration = AKS, event-driven code = Functions, workflow = Logic Apps.
Quick Answer: App Service = managed PaaS web hosting. Container Instances = one container, no orchestration. Kubernetes Service = managed orchestration for many containers. Container Apps = serverless containers that scale to zero. Functions = event-driven code billed per run. Logic Apps = visual workflow automation billed per action.
Azure App Service (PaaS)
Azure App Service is a fully managed platform for hosting web applications, REST APIs, and mobile backends. You push code (or a container) and Azure provides the OS, the web server, patching, autoscale, and load balancing. It supports .NET, Java, Node.js, PHP, Python, and Ruby on Windows or Linux.
Standout features: deployment slots for staging and zero-downtime swaps (blue-green releases), built-in continuous integration/continuous delivery (CI/CD) from GitHub or Azure DevOps, free managed TLS/SSL certificates, custom domains, and built-in authentication with Microsoft Entra ID and social providers.
Apps run inside an App Service Plan, which defines the underlying compute and pricing tier:
| Tier | Use case | Autoscale | Custom domain |
|---|---|---|---|
| Free / Shared | Dev/test | No | Shared host only |
| Basic | Low-traffic production | Manual scale only | Yes |
| Standard | Production with autoscale | Yes | Yes |
| Premium (v3) | High throughput, more instances | Yes | Yes |
| Isolated | Dedicated, network-isolated | Yes | Yes |
On the Exam: All apps in the same App Service Plan share its CPU and memory, so co-locating a noisy app can starve the others. Deployment slots are the App Service answer to "test in production-like staging, then swap with no downtime."
Containers in Azure
A container packages an app with its dependencies so it runs identically everywhere. Azure offers three hosting tiers of increasing capability.
Azure Container Instances (ACI)
The simplest, fastest way to run a container — no VMs, no cluster. Containers start in seconds, bill per second, and are ideal for short tasks, simple jobs, build steps, and burst capacity. There is no built-in orchestration, autohealing, or rolling-update logic.
Azure Kubernetes Service (AKS)
Managed Kubernetes for running many containers at scale. Azure operates the control plane (master) for free; you pay only for the worker-node VMs that run your pods. AKS adds pod and node autoscaling, self-healing, rolling upgrades, and Azure Monitor Container Insights. Choose AKS for complex microservices and enterprise container estates.
Azure Container Apps
A serverless container platform built on Kubernetes that hides cluster management entirely. It supports event-driven autoscaling (HTTP traffic, queue length, custom metrics) and scale to zero, so you pay nothing when idle. It is the middle ground: more power than ACI, far less operational overhead than AKS.
Serverless Computing
Azure Functions
Azure Functions runs small pieces of code ("functions") in response to events — an HTTP request, a timer, a new queue message, or a blob upload. It scales automatically from zero to many instances and, on the right plan, you pay only while code runs.
| Plan | Billing | Scaling | Best for |
|---|---|---|---|
| Consumption | Per execution + GB-seconds; scale to zero | Auto, event-driven | Spiky/intermittent event workloads |
| Premium | Pre-warmed instances (no cold start) | Auto, with always-ready instances | Low latency, VNet integration |
| Dedicated (App Service) | App Service Plan rate | Manual/auto within the plan | Reusing existing App Service capacity |
Functions are stateless by default; Durable Functions add stateful orchestration. On the exam, "pay only when the code runs" and "scale to zero" point straight at the Consumption plan.
Azure Logic Apps
Azure Logic Apps is a low-code/no-code service for building workflows that connect apps, data, and services. You assemble logic in a visual designer using 400+ prebuilt connectors (Microsoft 365, Salesforce, SAP, ServiceNow, and more) and are billed per action executed. Compared with Functions (you write code), Logic Apps is the "drag-and-drop integration" answer — for example, "when an email with an attachment arrives, save it to OneDrive and post to Teams."
Choosing the Right Compute Service
| Service | Type | Manage the OS? | Best for | Pricing model |
|---|---|---|---|---|
| Azure VMs | IaaS | Yes | Lift-and-shift, full OS control | Per-second compute |
| App Service | PaaS | No | Web apps and APIs | App Service Plan |
| Container Instances | PaaS | No | A single short-lived container | Per second |
| Kubernetes Service | Managed | Worker nodes | Complex microservices | Worker-node VMs |
| Container Apps | Serverless | No | Event-driven containers, scale to zero | Per second + scale to zero |
| Functions | Serverless | No | Event-driven code | Per execution |
| Logic Apps | Serverless | No | Workflow / integration | Per action |
Common Traps
- ACI vs AKS: one simple container → ACI; many containers needing orchestration, self-healing, and rolling updates → AKS.
- Functions vs Logic Apps: writing code → Functions; connecting SaaS services with a visual designer → Logic Apps.
- AKS's control plane is free — the cost is the worker-node VMs, a frequently tested detail.
- App Service still hides the OS even when you deploy a custom container, so "no OS management" can still mean App Service.
On the Exam: Read for the key differentiator — full OS control (VMs), managed web hosting (App Service), event-driven code (Functions), or container orchestration (AKS). One phrase usually decides the answer.
A development team wants to publish a Python REST API and have Azure handle the OS, patching, scaling, and free TLS certificates. Which service fits best?
Which statement about Azure Kubernetes Service (AKS) billing is accurate?
A business analyst needs to automate a no-code workflow that triggers when an email arrives, then saves the attachment and posts a Teams message, using prebuilt connectors. Which service is designed for this?
A team needs to run a single short-lived container for a nightly batch job with the least possible setup and per-second billing. Which service is the simplest fit?