## Design Compute Solutions in Azure
Designing compute solutions in Azure involves selecting the right service based on workload requirements for control, scalability, cost, and management overhead. Azure offers a spectrum from Infrastructure as a Service (IaaS) to Platform as a Service (PaaS) and Function as a Service (FaaS).
## Virtual Machines (IaaS)
Azure Virtual Machines (VMs) provide maximum control over the operating system and software stack. They are ideal for lift-and-shift migrations, custom software, or when specific OS configurations are required.
- Availability Sets provide fault domain and update domain isolation within a datacenter.
- Availability Zones offer higher resilience by distributing VMs across physically separate datacenters.
- Virtual Machine Scale Sets (VMSS) allow automatic scaling and management of identical VMs.
- Consider Reserved Instances for cost savings on predictable, long-term workloads, and Spot VMs for fault-tolerant, interruptible workloads at a significant discount.
## Azure App Service (PaaS)
Azure App Service is a fully managed PaaS for hosting web applications, REST APIs, and mobile backends. It supports various languages and frameworks.
- Offers features like deployment slots for staging, A/B testing, and rollback.
- Provides built-in auto-scaling, load balancing, and high availability.
- Ideal for modern web applications that need quick deployment and minimal infrastructure management.
## Container Solutions
- Azure Container Instances (ACI): A serverless solution for running single containers quickly without managing underlying infrastructure. Best for simple, isolated container workloads, burst scenarios, or task automation.
- Azure Kubernetes Service (AKS): A managed Kubernetes service for orchestrating containerized applications. Ideal for complex microservices architectures, high-scale deployments, and workloads requiring fine-grained control over container orchestration.
- Azure Container Apps: A serverless platform for microservices and containerized applications, simpler than AKS. It supports event-driven scaling (KEDA) and Dapr for building resilient microservices. Great for modern apps that need serverless benefits without the full complexity of AKS.
## Serverless Compute
- Azure Functions (FaaS): An event-driven serverless compute service. Functions execute code in response to events (e.g., HTTP requests, timer, database changes) and scale automatically.
- The Consumption plan is highly cost-effective, billing only for execution time and memory.
- Premium plan offers pre-warmed instances and VNET integration.
- Ideal for intermittent, event-driven workloads, APIs, and data processing.
## Specialized Compute
- Azure VMware Solution (AVS): Enables running native VMware vSphere environments in Azure, facilitating hybrid cloud strategies and large-scale VMware workload migrations with minimal refactoring.
- Azure Batch: A managed service for running large-scale parallel and high-performance computing (HPC) applications efficiently.
Decision Factors: Consider cost, management overhead, scalability requirements, statefulness, security needs, and existing developer skills when choosing a compute service.
What is the primary benefit of using Azure Virtual Machines (VMs)?
Maximum control over the operating system and software stack (IaaS).
tap to reveal
When should you consider Azure App Service for a web application?
When you need a fully managed PaaS solution for web apps, APIs, or mobile backends with built-in scaling and deployment features.
tap to reveal
What is Azure Kubernetes Service (AKS) best suited for?
Orchestrating complex microservices architectures and highly scalable containerized applications.
tap to reveal
Describe the main use case for Azure Functions.
Running event-driven, serverless code for intermittent workloads, APIs, or data processing, billed on consumption.
tap to reveal
How does Azure Container Apps differ from AKS and ACI?
It's a serverless platform for microservices (simpler than AKS) supporting Dapr and KEDA, offering more features than ACI for single containers.
tap to reveal
What is the advantage of using Azure Container Instances (ACI)?
Quickly deploying single containers in a serverless environment without managing underlying infrastructure or orchestration.
tap to reveal
What is the purpose of Azure VMware Solution (AVS)?
To enable lift-and-shift migration and running of native VMware vSphere environments directly in Azure.
tap to reveal
Which Azure compute service would you recommend for a fault-tolerant, interruptible workload to minimize cost?
Azure Spot Virtual Machines.
tap to reveal