一键导入
azure-architecture-patterns
Well-Architected Framework principles, reference architectures, and best practices for cloud-native solutions
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Well-Architected Framework principles, reference architectures, and best practices for cloud-native solutions
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
| name | Azure Architecture Patterns |
| description | Well-Architected Framework principles, reference architectures, and best practices for cloud-native solutions |
Well-Architected Framework principles, reference architectures, and best practices for cloud-native solutions.
| Field | Value |
|---|---|
| Skill ID | azure-architecture-patterns |
| Version | 1.0.0 |
| Category | Cloud/Infrastructure |
| Difficulty | Advanced |
| Prerequisites | Basic Azure knowledge |
| Related Skills | azure-devops-automation, cognitive-load (for architecture reviews) |
Azure architecture is about trade-offs, not perfection. This skill provides structured guidance for designing, evaluating, and optimizing Azure solutions using the Well-Architected Framework (WAF) pillars.
| Pillar | Focus | Key Question |
|---|---|---|
| Reliability | Resiliency, availability | "Will it stay up?" |
| Security | Protection, compliance | "Is it safe?" |
| Cost Optimization | Efficiency, value | "Is it worth it?" |
| Operational Excellence | Manageability, observability | "Can we run it?" |
| Performance Efficiency | Scalability, responsiveness | "Is it fast enough?" |
Prevent cascading failures by failing fast when a downstream service is unhealthy.
// Polly implementation
var circuitBreakerPolicy = Policy
.Handle<HttpRequestException>()
.CircuitBreakerAsync(
exceptionsAllowedBeforeBreaking: 3,
durationOfBreak: TimeSpan.FromSeconds(30)
);
Handle transient failures with increasing delays.
var retryPolicy = Policy
.Handle<HttpRequestException>()
.WaitAndRetryAsync(3, retryAttempt =>
TimeSpan.FromSeconds(Math.Pow(2, retryAttempt)));
Distribute resources across physically separate datacenters.
| Resource | Zone Support |
|---|---|
| VMs | Zone-redundant or zonal |
| Azure SQL | Zone-redundant HA |
| Storage | ZRS, GZRS |
| App Service | Zone-redundant (Premium) |
/health, /ready)| Principle | Implementation |
|---|---|
| Verify explicitly | Always authenticate/authorize |
| Least privilege | Minimal necessary permissions |
| Assume breach | Segment, encrypt, detect |
Eliminate credential management with Azure AD-backed identity.
{
"type": "Microsoft.Web/sites",
"identity": {
"type": "SystemAssigned"
}
}
Use cases:
| Practice | Rationale |
|---|---|
| Use built-in roles first | Custom roles add complexity |
| Scope to resource group | Not subscription (too broad) |
| Use groups, not users | Easier lifecycle management |
| Regular access reviews | Remove stale permissions |
Keep traffic on Azure backbone, off public internet.
resource privateEndpoint 'Microsoft.Network/privateEndpoints@2023-05-01' = {
name: 'pe-storage'
properties: {
subnet: { id: subnetId }
privateLinkServiceConnections: [{
name: 'plsc-storage'
properties: {
privateLinkServiceId: storageAccountId
groupIds: ['blob']
}
}]
}
}
Default deny, explicit allow.
| Priority | Description |
|---|---|
| 100-200 | Allow known good traffic |
| 300-400 | Deny known bad traffic |
| 4096 | Default deny all |
| Strategy | Impact |
|---|---|
| Right-size | Match SKU to actual workload |
| Reserved Instances | 1-3 year commitment = 40-72% savings |
| Spot VMs | 90% discount for interruptible workloads |
| Auto-shutdown | Dev/test VMs off at night |
| Serverless | Pay per execution, not idle time |
| Workload Type | Recommended | Why |
|---|---|---|
| Steady-state web | App Service Premium | Predictable, manageable |
| Event-driven | Azure Functions | Pay per execution |
| Batch processing | Container Apps + KEDA | Scale to zero |
| Big compute | Spot VMs + Batch | Massive savings |
| Dev/test | B-series VMs | Burstable, cheap |
| Tier | Use Case | Cost/GB/month |
|---|---|---|
| Hot | Frequently accessed | ~$0.02 |
| Cool | Infrequent (30+ days) | ~$0.01 |
| Archive | Rarely accessed | ~$0.002 |
Lifecycle management: Auto-tier blobs based on last access.
// Azure Resource Graph - find expensive resources
resources
| where type =~ 'Microsoft.Compute/virtualMachines'
| extend vmSize = properties.hardwareProfile.vmSize
| project name, resourceGroup, vmSize, location
| order by vmSize desc
| Tool | Best For |
|---|---|
| Bicep | Azure-native, declarative |
| Terraform | Multi-cloud, state management |
| ARM | Legacy, avoid for new work |
| Pulumi | Developers who prefer code |
// Use parameters with descriptions and constraints
@description('The environment name')
@allowed(['dev', 'staging', 'prod'])
param environment string
// Use variables for derived values
var resourcePrefix = 'app-${environment}'
// Use modules for reusability
module storage 'modules/storage.bicep' = {
name: 'storage-${environment}'
params: {
prefix: resourcePrefix
location: location
}
}
| Layer | Service | Purpose |
|---|---|---|
| Logs | Log Analytics | Centralized logging |
| Metrics | Azure Monitor | Performance data |
| Traces | Application Insights | Distributed tracing |
| Alerts | Azure Alerts | Proactive notification |
| Dashboards | Azure Workbooks | Visualization |
resource diagnostics 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = {
scope: appService
name: 'diag-appservice'
properties: {
workspaceId: logAnalyticsId
logs: [
{ category: 'AppServiceHTTPLogs', enabled: true }
{ category: 'AppServiceConsoleLogs', enabled: true }
]
metrics: [
{ category: 'AllMetrics', enabled: true }
]
}
}
Add more instances, not bigger instances.
| Service | Scaling Mechanism |
|---|---|
| App Service | Autoscale rules |
| Azure Functions | Event-driven automatic |
| AKS | Horizontal Pod Autoscaler + Cluster Autoscaler |
| VMSS | Autoscale rules |
| Cache Type | Use Case | Service |
|---|---|---|
| CDN | Static content | Azure Front Door |
| Distributed | Session, computed data | Azure Cache for Redis |
| Local | Hot data | In-memory |
Separate read and write models for optimization.
Write Path: Web App → Cosmos DB (write-optimized)
↓ Change Feed
Read Path: Azure Search ← Cosmos DB (indexed, query-optimized)
Store events, not state. Rebuild state from event stream.
Benefits:
| Pattern | When to Use |
|---|---|
| Read replicas | Read-heavy workloads |
| Sharding | Data exceeds single node |
| Connection pooling | Many short-lived connections |
| Indexing strategy | Query performance issues |
Internet → Front Door (CDN, WAF) → App Service
↓
Azure SQL + Redis Cache
↓
Key Vault, Storage
Internet → API Management → AKS Ingress
↓
Service Mesh (pods)
↓
Cosmos DB, Service Bus
↓
Azure Monitor, Key Vault
Event Sources → Event Grid → Azure Functions
↓
Cosmos DB, Storage
↓
Logic Apps (orchestration)
| Tier | CPU | Memory | Use Case |
|---|---|---|---|
| B-series | Burstable | Variable | Dev/test |
| D-series | General | Balanced | Most production |
| E-series | Memory-optimized | High | In-memory databases |
| F-series | Compute-optimized | Low | CPU-intensive |
| Anti-Pattern | Problem | Fix |
|---|---|---|
| Monolithic deployment | All or nothing | Microservices or modular |
| Hardcoded config | Environment-specific | App Configuration, Key Vault |
| Single region | No DR | Multi-region with Traffic Manager |
| Over-provisioned "just in case" | Wasted cost | Right-size + autoscale |
| No IaC | Drift, manual errors | Bicep/Terraform everything |
| Component | ID / Name | Purpose |
|---|---|---|
| VS Code Extension | ms-azuretools.vscode-azure-github-copilot | Azure GitHub Copilot integration |
| VS Code Extension | ms-azuretools.vscode-azureresourcegroups | Azure resource management |
| VS Code Extension | ms-vscode.azure-account | Azure authentication |
| MCP Server | azure-mcp | 40+ Azure tools (cloudarchitect, docs, services) |
Installation:
# VS Code Extensions
code --install-extension ms-azuretools.vscode-azure-github-copilot
code --install-extension ms-azuretools.vscode-azureresourcegroups
code --install-extension ms-vscode.azure-account
# MCP Server (via VS Code settings.json or mcp.json)
# Enabled via chat.mcp.gallery.enabled = true
If Azure MCP tools are not available, use these alternatives:
| MCP Tool | Fallback Approach |
|---|---|
cloudarchitect | Use WAF Assessment: https://aka.ms/waf-assessment |
documentation | Search https://learn.microsoft.com/azure/architecture |
get_bestpractices | Reference Azure Architecture Center patterns |
| Service-specific tools | Use Azure Portal or az CLI directly |
Manual Architecture Design Process:
Alex has access to 40+ Azure MCP tools for real-time architecture assistance:
| Category | Tools | Use Cases |
|---|---|---|
| Architecture Design | mcp_azure_mcp_cloudarchitect | Interactive architecture design, WAF guidance |
| Documentation | mcp_azure_mcp_documentation | Search Azure docs, best practices |
| Best Practices | mcp_azure_mcp_get_bestpractices | Code gen, deployment, Functions patterns |
| Compute | mcp_azure_mcp_aks, mcp_azure_mcp_appservice, mcp_azure_mcp_functionapp | Container orchestration, web apps, serverless |
| Data | mcp_azure_mcp_cosmos, mcp_azure_mcp_sql, mcp_azure_mcp_postgres | Database recommendations |
| Security | mcp_azure_mcp_keyvault, mcp_azure_mcp_role | Secrets management, RBAC |
| Monitoring | mcp_azure_mcp_monitor, mcp_azure_mcp_applicationinsights | Observability setup |
| DevOps | mcp_azure_mcp_deploy, mcp_azure_mcp_azd | Deployment automation |
The mcp_azure_mcp_cloudarchitect tool provides interactive guided architecture design:
Invocation → Ask about user/company →
Gather requirements →
Build architecture by tier →
Present with ASCII diagrams
Architecture Tiers:
├── Infrastructure (VNets, VMs, Load Balancers)
├── Platform (App Service, AKS, Functions)
├── Application (Logic Apps, API Management)
├── Data (SQL, Cosmos, Storage)
├── Security (Key Vault, WAF, DDoS)
└── Operations (Monitor, Log Analytics)
The tool tracks:
Use mcp_azure_mcp_get_bestpractices with these resource/action combinations:
| Resource | Actions |
|---|---|
codegen | all — Code generation patterns |
deployment | all — Deployment best practices |
functions | all — Azure Functions patterns |
swa | all — Static Web App guidance |
coding-agent | all — MCP setup for repos |
| Scenario | Tool | Why |
|---|---|---|
| "Design new Azure solution" | cloudarchitect | Interactive, pillar-aligned |
| "What's the best way to..." | documentation | Search official docs |
| "Generate Azure code" | get_bestpractices + specific tools | Current patterns |
| "Cost optimization review" | cloudarchitect + monitor | Full picture |
| "Security assessment" | keyvault + role + documentation | Multi-tool analysis |
User: "Design a solution for a retail e-commerce platform"
Alex invokes: mcp_azure_mcp_cloudarchitect with:
- intent: "Design e-commerce architecture"
- nextQuestionNeeded: true
- state: {initial}
Tool asks: "What's your role and company size?"
User: "CTO of a mid-size retailer"
Tool continues gathering:
- Expected traffic patterns
- Data residency requirements
- Budget constraints
- Compliance needs (PCI-DSS for payments)
Tool outputs:
- Component table with SKU recommendations
- ASCII architecture diagram
- WAF pillar alignment
- Cost estimation
| Trigger | Response |
|---|---|
| "Azure architecture", "cloud design" | Full skill activation |
| "reliability", "high availability", "resilience" | Module 1 |
| "security", "zero trust", "identity" | Module 2 |
| "cost", "optimize", "savings" | Module 3 |
| "IaC", "Bicep", "observability" | Module 4 |
| "performance", "scaling", "caching" | Module 5 |
| "MCP", "cloud architect tool", "Azure tools" | Module 6 |
| "design architecture interactively" | Invoke cloudarchitect tool |
Skill updated: 2026-02-14 | Category: Cloud/Infrastructure | Status: Active | MCP-Enhanced: Yes
Defense-in-depth, PII protection, secrets scanning, and secure packaging for distributed software
Systematic testing for confidence without over-testing — the right test at the right level
Generate consistent visual character references across multiple scenarios using Flux and nano-banana-pro on Replicate
Create professional ultra-wide cinematic banners for GitHub READMEs using Flux and Ideogram models with typography options
Generate professional presentations using the Gamma API with expert storytelling consulting based on Duarte methodology.
Intelligent project persona identification using priority chain detection with LLM and heuristic fallback