Compute Solutions
Purpose
This page covers notes, labs, personal setup items, deviations, etc. covered in the Design infrastructure solutions Learn module.
Migration to the cloud can be done in different ways, depending on your needs and goals. Here are five main strategies often referred to as the five Rs:
- Rehost (Lift and Shift): Move your without changing things. This is a quick way to migrate to Azure without the hassle of code modifications.
- Refactor (Repackage): Minimal changes to your applications so they can take advantage of Azure’s platform services.
- Migrate apps to Azure App Service, Containers to Azure Kubernetes Service (AKS), or change databases to fit Azure options like Azure SQL Managed Instance or Azure Cosmos DB.
- Rearchitect: Modify and extend your application’s functionality and code to optimize it for cloud scalability. This might involve breaking a monolithic app into microservices or changing databases to fully managed solutions on Azure.
- Rebuild: Completely rebuild your application using Azure’s cloud-native technologies. This involves creating new applications using Azure services like Azure Functions, Azure AI, Azure SQL Managed Instance, and Azure Cosmos DB.
- Replace: If suitable, replace your current applications with software as a service (SaaS) solutions. This removes the need for migration altogether if the SaaS solution meets your needs.
Design Compute Solutions
Recommended Azure Services
Topic | Recommendation |
---|---|
Compute Solutions | Azure Virtual Machines, Azure Kubernetes Service, Azure Functions, Azure Batch |
Application Architecture | Azure Service Bus, Azure Event Grid, Azure API Management, Azure Cache for Redis, Azure App Configuration, Azure DevOps |
Migrations | Microsoft Cloud Adoption Framework for Azure, Azure Migrate, Azure Database Migration Service, Azure Data Box |
Network Solutions | Azure Virtual Network, Azure ExpressRoute, Azure Content Delivery Network, Azure Firewall, Azure Load Balancer, Azure Traffic Manager |
- Compute Solutions:
- Azure Virtual Machines for flexible VM-based compute
- Azure Kubernetes Service for container orchestration
- Azure Functions for serverless compute
- Azure Logic Apps for configuring the platform via automated workflows
- Azure Batch for batch processing workloads.
- Application Architecture: Azure Service Bus for reliable messaging, Azure Event Grid for event-driven architectures, Azure API Management for API integration, Azure Cache for Redis for high-performance caching, Azure App Configuration for centralized configuration management, and Azure DevOps for automated deployment.
- Migrations: Utilize the Microsoft Cloud Adoption Framework for Azure for comprehensive migration planning, Azure Migrate for workload assessment and migration, Azure Database Migration Service for seamless database migrations, and Azure Data Box for offline migration of unstructured data.
- Network Solutions: Azure Virtual Network for internet connectivity, Azure ExpressRoute for private connectivity to on-premises networks, Azure Content Delivery Network for optimizing network performance, Azure Firewall for network security, and Azure Load Balancer and Traffic Manager for load balancing and routing.
Specify Components of a Compute Solution Based on Workload Requirements
- Key Information:
- Understanding workload requirements is essential for determining compute components.
- Factors include processing power, memory, storage, and scalability needs.
Batch Processing
Used to run large-scale parallel and high-performance computing jobs in a managed pool of compute nodes. There’s no cluster or job scheduler software to install, manage, or scale. Instead, you use Batch APIs and tools, command-line scripts, or the Azure portal to configure, manage, and monitor your jobs. Think of it as a PaaS solution to HPC workloads similar to Azure SQL Database is a PaaS solution for hosting databases. Get the compute management out of the way so customers can focus on the actual tool/need.
Service Tier | Tier Options | Cost | Resource Types |
---|---|---|---|
Azure Batch | Basic, Standard, Premium | Pay-as-you-go | Batch Pools, Jobs |
- Use Cases:
- Processing large datasets or performing compute-intensive tasks.
- Batch processing for data analytics, rendering, or simulations.
- Key Points:
- Offers cloud-scale job scheduling and compute management.
- Enables parallel processing of large-scale batch workloads.
- Scales to possibly thousands of VMs
- Installs the application(s)
- Runs jobs against data
- Identifies failures, re-runs work, scales down
Azure App Service
- When you create an app in App Service, it is assigned to an App Service plan.
- An App Service plan is a set of resources that are used to host your app, such as compute, memory, and storage.
- The app runs on the VM instances that are configured in the App Service plan.
- Multiple apps on the same App Service share the same VM instances.
- This means that they all share the same compute, memory, and storage resources.
- Sharing an App Service plan for multiple apps can be a great way to save money on Azure App Service costs.
- All of the apps in the plan must be compatible with each other. They must run on the same platform (Windows, Linux) and runtime (.NET vs .NET Core)
- Offers built-in load balancing and traffic management
- Azure Traffic Manager
- Azure Load Balancer
- Azure Front Door
- Application Gateway
App Service Tiers
Service Tier | Tier Options | General Information | Purpose |
---|---|---|---|
Shared Compute | Free and Shared | Shared resources (including other customers) | Development and testing |
Dedicated compute | Basic, Standard, Premium, PremiumV2, PremiumV3 | Only apps in the same plan share resources | Production and scaling. Higher the tier, the more VM instances are available for Scale Out |
Isolated | Isolated and Isolated V2 | Dedicated VMs on dedicated VNets | Maximum scale-out capabilities and isolation. |
Application Caching
- Azure Cache for Redis provides in-memory caching for improving application performance.
- Supports data caching, session management, and pub/sub messaging.
Configuration Management
- Azure App Configuration provides a centralized configuration store for managing application settings.
- Supports feature flags, environment-based configuration, and versioning.
Automated Deployment
- Azure DevOps offers CI/CD pipelines for automating application deployment, testing, and release.
- Supports integration with source control, build artifacts, and release management.
Container-Based Solutions
Azure Container Instances
- Supports Docker containers
- Fast startup
- Multiple instances of a single application
- Per second billing
- Persistent storage
- Support for multi-container groups
Azure Container Use Cases
- Deploying microservices-based applications.
- Achieving consistent deployment and scaling across environments.
- Supports Docker containers for lightweight, portable application packaging.
Container Considerations
- USe a private registry (repository).
- Make sure to update the images for security vulnerabilities.
- Monitor adjacent services (files, network, etc.) for abnormal performance which could point towards a security issue.
Azure Kubernetes Service
Azure managed K8 platform which manages your hosted Kubernetes environment and makes it simple to deploy and manage containerized applications in Azure.
Service Tier | Tier Options | Cost | Resource Types |
---|---|---|---|
AKS | Basic, Standard, Premium | Pay-as-you-go | AKS Clusters, Pods |
AKS Tier Details
- Basic:
- Suitable for development and testing environments.
- Basic monitoring and logging features.
- Limited scaling options.
- Ideal for small-scale applications or proof of concepts.
- Standard:
- Recommended for production workloads.
- Enhanced monitoring and logging capabilities.
- Auto-scaling based on CPU and memory usage.
- Integration with Azure DevOps and other CI/CD tools.
- Support for virtual node scaling and advanced networking features.
- Premium:
- Designed for mission-critical and enterprise-grade applications.
- Advanced security features, including Azure Policy integration and network policies.
- Priority node pools for improved performance and reliability.
- Support for GPU-enabled nodes and Azure Confidential Computing.
- Dedicated support and SLA-backed uptime guarantees.
AKS Considerations
- Identity management: integrate with Entra ID
- Azure Monitor for monitoring
- Automatic scaling via:
- horizontal pod autoscaler: watches resource demand of pods and adjusts as needed
- cluster autoscaler: watches for node limitations and scales the cluster nodes to deploy more pods
- Docker image support
- Integrates with the private container registry
Azure Functions
Serverless code execution. It’s an interesting concept and it’s really slick.
- Implement system logic into code blocks called Functions - Execute any time they are needed
- Write the function using any coding language
- Trigger based off of events
- HTTP Call -> Function A to process data -> store data -> triggers function B to send an alert.
- Automatically scales to meet demand
- Keep functions small and run items in parallel
- Monitor with Azure Application Insights
Azure Function Use Cases
- Building serverless applications with event-driven architectures.
- Handling sporadic or unpredictable workloads.
Function Tier Details
- Consumption Plan:
- Ideal for applications with unpredictable workloads or sporadic usage patterns.
- Automatically scales based on the number of incoming events or executions.
- Billed based on the number of executions and resource consumption, such as memory and execution time.
- Cost-effective for low to moderate usage scenarios.
- Supports a wide range of triggers and bindings for integrating with various Azure services.
- Azure Functions that use the Consumption hosting plan has a default timeout of five minutes (300 seconds). You can extend this to 10 minutes (600 seconds )maximum.
- By choosing the premium plan for the Function App, you can take advantage of the virtual network (VNet) integration feature. This allows your function app to be securely connected to the virtual network where your Azure VM with the SQL Server instance resides.
Azure Logic Apps
- Similar to Azure Functions but geared towards less programmer-y people. They consist of GUI workflows for orchestrating solutions or editing configuration files.
- Large number of connectors
- Build custom connectors
- Enterprise B2B integration
- Used for getting multiple applications and systems working together
- No external connections = Don’t use logic apps
- Handles complex conditionals and nested conditions
- Custom connectors to REST or SOAP API
- Call Azure functions from Logic Apps and vise versa
- Bad for real-time requirements, overly complex rules or non-standard services.