Azure service selection
Azure service selection
Choose cloud hosting by workload and operational responsibility, not by the number of available features.
A conventional HTTP application can fit Azure App Service; Azure Container Apps is a candidate for containerized services and jobs with managed orchestration. Azure Functions suits event-triggered execution using a supported isolated worker runtime; the old in-process .NET model reached its support end on November 10, 2026. AKS is appropriate when Kubernetes-specific controls justify owning cluster operations. These are candidates, not an exhaustive decision tree. Verify supported .NET runtime, region, tier, quotas, networking, availability and licensing before committing. A container does not remove OS or architecture constraints. AWS ECS on Fargate and Google Cloud Run are useful managed container candidates; EKS and GKE provide Kubernetes options. Lambda and Cloud Run functions are event-driven alternatives, not API-compatible replacements for Azure Functions. Compare relational options Azure SQL or Azure Database for PostgreSQL, Amazon RDS and Cloud SQL; object storage Blob Storage, S3 and Cloud Storage; messaging Service Bus, SQS and Pub/Sub. SQL dialect, ordering, delivery, identity and transaction semantics differ. Compare cold-start requirements, minimum replicas, execution limits and background work: an HTTP request host may suspend or terminate idle instances. Do not promise permanent worker execution on request-driven hosting. The following examples are offline decision aids, not cloud service calls. The companion comparison matrix leaves region and cost unset until a real target is approved.
Baseline: .NET 10 / C# 14. All C# results below are reasoned, not executed. Synthetic calculations are not vendor quotes or production measurements.
Select a candidate hosting model
Use requirements in priority order, then check unsupported combinations separately.
Inspect the archived Fixture.csproj and use only an approved .NET 10 SDK. Build and run in an isolated lab with finite time and resource limits.
using System;static string Candidate(bool kube, bool eventDriven, bool container) => kube ? "AKS" : eventDriven ? "Functions isolated" : container ? "Container Apps" : "App Service";Console.WriteLine(Candidate(false,false,false));Console.WriteLine(Candidate(false,false,true));Console.WriteLine(Candidate(false,true,false));Console.WriteLine(Candidate(true,false,true));Expected result (not executed):
App ServiceContainer AppsFunctions isolatedAKSThis deliberately small rule set selects a starting point. It cannot certify service compatibility; a workload can combine multiple services.
Check a connection budget before scaling
A synthetic database allows 100 connections; reserve 20 for administration and other workloads.
Inspect the archived Fixture.csproj and use only an approved .NET 10 SDK. Build and run in an isolated lab with finite time and resource limits.
using System;const int limit = 100, reserved = 20, poolPerReplica = 15;foreach (int replicas in new[] { 4, 5, 6 }) { int possible = checked(replicas * poolPerReplica); Console.WriteLine($"{replicas}: {possible}; {(possible <= limit-reserved ? "within model" : "over budget")}");}Expected result (not executed):
4: 60; within model5: 75; within model6: 90; over budgetPool limits are not measurements of actual concurrent connections. Account for multiple pools, overlapping revisions, failover and administrative access.
Gate traffic to a new revision
A release policy requires readiness and contract checks before directing traffic.
Inspect the archived Fixture.csproj and use only an approved .NET 10 SDK. Build and run in an isolated lab with finite time and resource limits.
using System;static int Traffic(bool ready, bool contractPassed, int requested) { if (requested is < 0 or > 100) throw new ArgumentOutOfRangeException(nameof(requested)); return ready && contractPassed ? requested : 0;}Console.WriteLine(Traffic(false,true,10));Console.WriteLine(Traffic(true,false,10));Console.WriteLine(Traffic(true,true,10));Expected result (not executed):
0010App Service slots and Container Apps revisions differ by tier and feature; this policy only models a traffic gate. Test the actual platform and data compatibility.
Apply the concept
Choose a host for a small ASP.NET Core API plus a nightly event job. Include database connection limits and rollback.
Use the manual practice and knowledge check. Do not deploy or publish these fixtures.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Azure service selection — knowledge check
Apply the lesson concepts to the following scenarios.
What should primarily determine a hosting choice?
What is a sensible candidate for Kubernetes-specific controls?
Which .NET Functions model should a new application evaluate?
How many replicas fit the modeled 80-connection budget at 15 each?
What does a traffic gate prove?