PracticeVideosBlogFlashcards

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.

  • On the AKS Free tier, cluster management is free and you pay for the worker-node VMs that run your pods (the Standard and Premium tiers charge for cluster management); Azure Container Apps is serverless containers that scale to zero.

  • Azure Functions is serverless event-driven code billed per execution on a serverless plan (Flex Consumption is recommended; the Consumption plan is legacy); 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.

Last updated: October 2026

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:

TierUse caseAutoscaleCustom domain
Free / SharedDev/testNoShared host only
BasicLow-traffic productionManual scale onlyYes
StandardProduction with autoscaleYesYes
Premium (v3)High throughput, more instancesYesYes
IsolatedDedicated, network-isolatedYesYes

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. On the Free tier, cluster management (the control plane) is free and you pay for the worker-node VMs that run your pods; the Standard and Premium tiers add a paid uptime SLA for cluster management. 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.

PlanBillingScalingBest for
Flex ConsumptionPay for on-demand executions; scale to zeroAuto, event-driven (up to 1,000 instances)Spiky/intermittent event workloads (recommended serverless plan)
Consumption (legacy)Per execution + GB-seconds; scale to zeroAuto, event-drivenExisting apps; Linux hosting on this plan retires 30 September 2028
PremiumPre-warmed instances (no cold start)Auto, with always-ready instancesLow latency, VNet integration
Dedicated (App Service)App Service Plan rateManual/auto within the planReusing 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 to a serverless plan; Microsoft recommends Flex Consumption for new function apps.

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 1,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

ServiceTypeManage the OS?Best forPricing model
Azure VMsIaaSYesLift-and-shift, full OS controlPer-minute compute
App ServicePaaSNoWeb apps and APIsApp Service Plan
Container InstancesPaaSNoA single short-lived containerPer second
Kubernetes ServiceManagedWorker nodesComplex microservicesWorker-node VMs
Container AppsServerlessNoEvent-driven containers, scale to zeroPer second + scale to zero
FunctionsServerlessNoEvent-driven codePer execution
Logic AppsServerlessNoWorkflow / integrationPer 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.
  • On the AKS Free tier, cluster management is free and the cost is the worker-node VMs; Standard and Premium tiers charge for cluster management.
  • 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.

Test Your Knowledge

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?

A

Azure Virtual Machines

B

Azure Container Instances

C

Azure Dedicated Host

D

Azure App Service

Test Your Knowledge

Which statement about Azure Kubernetes Service (AKS) billing is accurate?

A

You pay for the managed control plane but the worker nodes are free

B

Both the control plane and the worker nodes are free

C

On the Free tier, cluster management is free and you pay for the worker-node VMs

D

AKS is billed only per HTTP request

Test Your Knowledge

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

Azure Logic Apps

B

Azure Functions

C

Azure Kubernetes Service

D

Azure Container Instances

Test Your Knowledge

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?

A

Azure Container Instances

B

Azure Kubernetes Service

C

Azure App Service

D

Azure Virtual Machine Scale Sets

Sections you finish are checked off in the contents.