Specify Components of a Compute Solution Based on Workload Requirements
Evaluate Azure Compute Offerings
When designing a compute solution, you first evaluate the available offerings against your workload’s performance, scalability, and cost needs. Azure Virtual Machines (VMs) give you the most control over the operating system and fit applications that require specific configurations or continuous runtime. VM families include general purpose (balanced CPU-to-memory ratio, like the Dv2-Dsv2 series), compute optimized (high CPU-to-memory ratio for intensive applications, like the FSv2 series), and GPU VMs (for enhanced graphic processing, including NC, NCv2, NCv3 series). For workloads that need rapid scaling without managing individual VMs, VM Scale Sets automatically add or remove instances based on a signal such as average CPU, moving each VM through a predictable lifecycle from provisioning to running to terminating.
Choose Containers or Serverless
Azure Container Instances (ACI) lets you deploy containers quickly without managing VMs or orchestrators, making it ideal for simple tasks and microservices that need fast provisioning and efficient scaling down. Azure Functions provides a serverless compute option where Azure handles infrastructure; you pay only for execution time, and functions scale automatically to handle traffic spikes. Choose containers when you want consistent deployments with application dependencies, and choose serverless functions for short, occasional tasks that run only in response to an event. For workloads requiring high isolation due to compliance, Azure offers isolated VM sizes that run on dedicated hardware away from other tenants.
Summary of Selection Criteria
The right compute choice maps workload patterns to performance SLAs, scalability demands, and budget constraints. Virtual machines give the most control but require managing the OS. Containers package dependencies for consistent deployments. Serverless functions fit intermittent, event-driven tasks. Use isolated VM sizes when physical separation is mandatory.
Recommend a Virtual Machine-Based Solution
Selecting the Right VM Series and Size
To choose the correct Azure VM, analyze your application’s resource demands for CPU, memory, disk I/O, and network throughput. General purpose VMs offer a balanced mix for testing or small databases. Compute optimized VMs provide a high CPU-to-memory ratio for web servers and batch processing. Memory optimized VMs have a high memory-to-CPU ratio for large databases and analytics. GPU-accelerated VMs handle heavy mathematical tasks like AI and video rendering.
Cost Optimization and Licensing
For workloads that can handle interruptions, Spot instances offer steep discounts but can be evicted when Azure needs capacity. Burstable VMs (e.g., B-series) accumulate performance credits during idle periods to handle sudden spikes at lower cost. To lower long-term costs, use Reserved Instances for predictable workloads or Azure Hybrid Benefit to apply existing on-premises Windows Server or SQL Server licenses.
High Availability and Security
Deploy VMs across availability sets to protect against local hardware failures within a datacenter, or across availability zones to protect against entire datacenter outages. Enable Trusted Launch during VM creation to guard the boot pathway against rootkits using secure boot and a virtual Trusted Platform Module (vTPM) .
Before deploying, consult the Sizes Table to compare specifications, disk limits, and network limits. Use the Pricing Calculator to estimate monthly costs including storage and regional differences. For migrations, Azure Migrate Assessment analyzes on-premises workloads to recommend ideal VM sizes based on real performance history.
Recommend a Container-Based Solution
Azure Container Instances (ACI)
Azure Container Instances (ACI) provides a serverless container option that runs containers without managing VMs or orchestrators. It supports fast startup, billing per second, and can attach to a virtual network for Azure networking features and network security groups. However, ACI lacks built-in orchestration, so scaling and rolling updates must be handled manually or with custom scripts. Choose ACI for lightweight, on-demand container tasks.
Azure Kubernetes Service (AKS)
Azure Kubernetes Service (AKS) is a fully managed Kubernetes orchestrator that simplifies cluster deployment and management. It supports autoscaling, load balancing, and integration with Azure Virtual Network via Azure CNI for direct pod IP addressing. AKS enables runtime governance through Kubernetes RBAC and Microsoft Entra ID integration. The trade-off is operational complexity: you must manage cluster configuration, updates, and node pools. AKS is best for complex workloads requiring fine-grained control over scheduling and network policies.
Azure Container Apps
Azure Container Apps is a serverless microservices platform built on open-source technologies like Dapr and KEDA. It handles autoscaling (including scale to zero) and provides built-in service discovery and traffic splitting. Because it abstracts Kubernetes APIs, you don’t need deep Kubernetes expertise. Container Apps is optimized for event-driven architectures and integrates easily with queues and event sources. It fits scenarios where you want to focus on code rather than infrastructure.
Decision Criteria
Choose ACI for simple per-job tasks, AKS for full Kubernetes control, or Container Apps for serverless microservices. For autoscaling, ACI requires manual scaling, AKS provides cluster and pod autoscaling, and Container Apps offers event-driven scaling that can reduce to zero. Networking integration is available in all three, with direct pod IPs in AKS, simplified VNet attachment in ACI, and internal load-balancing in Container Apps. Balance cost, operational overhead, and security requirements to select the right container solution.
Recommend a Serverless-Based Solution
Compare Azure Functions Hosting Plans
Azure Functions offers three hosting plans. The Consumption plan scales to zero when idle and charges only for execution time, but may experience cold-start delays. The Premium plan keeps pre-warmed instances ready, eliminates cold starts, and supports VNET integration for secure access to private resources. The Dedicated (App Service) plan runs functions on fixed, user-managed VMs, offering predictable performance but requiring manual scaling.
Every function app requires a linked general-purpose Azure Storage account for triggers, logging, and state management. Deploy this storage in the same region as the function app to minimize latency. For high-throughput scenarios like Durable Functions or Event Hubs triggers, use a dedicated storage account per function app. On Linux function apps, you can mount file shares from Azure Storage to process large datasets efficiently.
Organizing Functions and Deployment
In Consumption and Premium plans, all functions in a single app scale together based on the busiest function. Group functions with similar load patterns, runtime environments, and security requirements to avoid contention. Use deployment strategies like run from package and deployment slots (on Premium plans) to minimize downtime and performance impact.
Event-Driven Triggers
Serverless architectures rely on event-driven triggers. Event Grid triggers push events with low latency for reacting to Azure service changes. Service Bus triggers provide reliable, ordered messaging with at-least-once delivery. HTTP triggers create RESTful endpoints for direct API calls. To process events from within a VNET, use the Premium or Flex Consumption plan and enable dynamic scale monitoring.
Orchestration with Logic Apps
Combine Azure Functions with Azure Logic Apps for complex workflows. Use Functions for custom compute logic, and Logic Apps for visual orchestration and built-in connectors. Choose between Consumption and Standard Logic Apps pricing tiers based on throughput, network integration, and cost needs. This hybrid approach balances performance, cost, and reliability.
Recommend a Compute Solution for Batch Processing
What Azure Batch Does
Azure Batch runs large-scale computing jobs without requiring you to install or manage cluster software. It creates a pool of compute nodes (VMs), installs applications, and breaks work into tasks that run across nodes. You pay only for underlying resources like VMs, storage, and networking. Developers interact via REST APIs, SDKs, or the portal for scenarios such as Monte Carlo simulations, image processing, or rendering.
Analyzing Job Requirements
When recommending Batch, analyze three key factors. Batch job size affects the number of nodes needed. Task concurrency describes how many tasks can run simultaneously on each node, based on CPU and memory demands. Execution duration matters because longer jobs benefit from different scaling strategies than short bursts. These factors guide VM series selection, node count, and autoscaling parameters.
Selecting VM Series and Node Configuration
For MPI workloads requiring inter-node communication, use H-series VMs for high-performance computing. For rendering or machine learning, use GPU-optimized series. Node count follows from job size and concurrency—more nodes handle more tasks in parallel but increase cost. Choose between the classic node communication model (allows direct node-to-node communication) and the simplified model (isolates nodes for security but limits inter-node communication).
Configuring Pools
A pool is a group of compute nodes that run tasks. Select an OS image (Windows or Linux) based on your application. The scheduling policy controls task distribution: pack multiple tasks per node to maximize utilization, or spread tasks evenly to reduce contention. Configure node deallocation options to determine what happens when nodes are no longer needed.
Automatic Scaling
Batch can automatically adjust node count using an automatic scaling formula based on metrics like $PendingTasks. Scale out when pending tasks exceed a threshold, scale in during quiet periods. Control the scaling interval and deallocation mode (e.g., taskCompletion to wait for running tasks to finish). This avoids paying for idle nodes while maintaining capacity during busy times.
Cost Optimization with Low-Priority VMs
Use low-priority (Spot) VMs in your pool for significant savings. Azure can reclaim these VMs when demand increases, so they work well for workloads that can tolerate interruption, such as batch jobs that restart from a checkpoint. Design your application to handle preemption with retry logic, and account for possible node removal in pool configuration.
Reliability and Best Practices
Avoid VM images nearing end-of-life. Use ephemeral OS disks (stored on local SSD) to reduce costs and improve performance. For extra storage, attach data disks through idempotent start tasks that can be safely rerun. Implement node restart policies to recover from failures, and consider deploying pools across availability zones or within a virtual network for high availability and secure communication.