1---2name: cloud-design-patterns3description: Select, explain, and apply cloud design patterns for distributed systems across reliability, performance, messaging, architecture, deployment, security, and event-driven categories. Use when designing, reviewing, or implementing cloud workloads and distributed system architectures.4---56<!-- Generated from harness/github-copilot/skills/cloud-design-patterns/SKILL.md by harness/claude-code/scripts/convert_from_copilot.py. Edit the source, not this file. -->78# Cloud design patterns910Map workload constraints and nonfunctional requirements to industry-standard, technology-agnostic cloud design patterns, trade-offs, and Azure service options so a distributed architecture becomes reliable, secure, cost-optimized, high-performing, observable, and scalable.1112## When to invoke1314- "Which cloud design patterns fit this architecture?"15- "Review this distributed system for resilience and performance patterns."16- "Design a cloud workload using Azure Architecture Center patterns."17- "Map these requirements to reliability, messaging, security, and deployment patterns."1819## Pattern categories at a glance2021| Category | Patterns | Focus |22| --- | --- | --- |23| Reliability & Resilience | 9 patterns | Fault tolerance, self-healing, graceful degradation. |24| Performance | 10 patterns | Caching, scaling, load management, data optimization. |25| Messaging & Integration | 7 patterns | Decoupling, event-driven communication, workflow coordination. |26| Architecture & Design | 7 patterns | System boundaries, API gateways, migration strategies. |27| Deployment & Operational | 5 patterns | Infrastructure management, geo-distribution, configuration. |28| Security | 3 patterns | Identity, access control, content validation. |29| Event-Driven Architecture | 1 pattern | Event sourcing and audit trails. |3031## Distributed-system fallacies to counter3233Design patterns compensate for incorrect assumptions. Explicitly identify which fallacies the design is exposed to:3435| Fallacy | Design response |36| --- | --- |37| The network is reliable. | Use Retry, Circuit Breaker, Health Endpoint Monitoring, and idempotent operations. |38| Latency is zero. | Use Cache-Aside, CQRS, asynchronous messaging, and locality-aware deployment. |39| Bandwidth is infinite. | Use Claim Check, compression, pagination, and coarse-grained APIs. |40| The network is secure. | Use federated identity, mTLS/private endpoints, least privilege, and the Valet Key pattern. |41| Topology doesn't change. | Use service discovery, Gateway Routing, and resilient client configuration. |42| There's one administrator. | Use External Configuration Store, policy-as-code, and operational ownership tags. |43| Component versioning is simple. | Use Anti-Corruption Layer, Backends for Frontends, and contract tests. |44| Observability implementation can be delayed. | Add Health Endpoint Monitoring, metrics, tracing, logs, and SLO dashboards from the start. |4546## Pattern selection rules4748| Requirement pressure | Prefer | Watch for |49| --- | --- | --- |50| Downstream dependency fails or throttles | Circuit Breaker, Retry, Bulkhead | Retry storms; use backoff, jitter, and idempotency. |51| Write and read models diverge | CQRS, Materialized View, Index Table | Eventual consistency and extra synchronization logic. |52| Bursty producers overload consumers | Queue-Based Load Leveling, Priority Queue, Competing Consumers | Poison messages and ordering constraints. |53| Long-running business transaction | Saga, Compensating Transaction, Scheduler Agent Supervisor | Compensation completeness and auditability. |54| Multiple clients need different API shapes | Backends for Frontends, Gateway Aggregation, Gateway Routing | Duplicated business logic in gateways. |55| Legacy replacement | Strangler Fig, Anti-Corruption Layer | Incomplete route ownership and data synchronization drift. |56| Multi-region availability | Deployment Stamps, Geode, Health Endpoint Monitoring | Data residency, replication lag, and operational complexity. |57| Secretless delegated access | Valet Key, Federated Identity | Over-scoped tokens and missing expiration. |5859## Progressive disclosure and bundled resources6061Load bundled references only when the task needs that category. Relative paths below are inside this skill package.6263| Reference | When to load |64| --- | --- |65| `references/reliability-resilience.md` | Ambassador, Bulkhead, Circuit Breaker, Compensating Transaction, Retry, Health Endpoint Monitoring, Leader Election, Saga, Sequential Convoy. |66| `references/performance.md` | Async Request-Reply, Cache-Aside, CQRS, Index Table, Materialized View, Priority Queue, Queue-Based Load Leveling, Rate Limiting, Sharding, Throttling. |67| `references/messaging-integration.md` | Choreography, Claim Check, Competing Consumers, Messaging Bridge, Pipes and Filters, Publisher-Subscriber, Scheduler Agent Supervisor. |68| `references/architecture-design.md` | Anti-Corruption Layer, Backends for Frontends, Gateway Aggregation/Offloading/Routing, Gateway Aggregation, Gateway Offloading, Gateway Routing, Sidecar, Strangler Fig. |69| `references/deployment-operational.md` | Compute Resource Consolidation, Deployment Stamps, External Configuration Store, Geode, Static Content Hosting. |70| `references/security.md` | Federated Identity, Quarantine, Valet Key. |71| `references/event-driven.md` | Event Sourcing. |72| `references/best-practices.md` | Selecting appropriate patterns, Well-Architected Framework alignment, documentation, monitoring. |73| `references/azure-service-mappings.md` | Common Azure services for each pattern category. |7475## Gotchas7677- **Patterns have trade-offs**: explain why the pattern fits and what new operational burden it adds.78- **Do not implement patterns by name only**: identify the failure mode, data consistency model, and observability requirement.79- **Technology-agnostic first**: select the pattern before choosing Azure, another cloud platform, on-premises, or hybrid services.80- **Cost is part of architecture**: queues, caches, multi-region replicas, and gateway layers add spend and operations.8182## Output template8384```markdown85## Cloud design pattern recommendation8687**Workload:** <system or feature>88**Primary drivers:** <reliability | performance | messaging | security | deployment | migration>8990| Requirement or risk | Recommended pattern | Category | Why it fits | Trade-off | Azure option |91| --- | --- | --- | --- | --- | --- |92| <risk> | <pattern> | <category> | <reason> | <cost/complexity/consistency impact> | <service or none> |9394### Architecture notes95- <how the selected patterns work together>9697### Validation98- <checks, tests, metrics, or runbooks needed>99```100101## Quality gate102103- [ ] Requirements and nonfunctional drivers are mapped to explicit patterns.104- [ ] At least one trade-off is documented for every recommended pattern.105- [ ] Distributed-computing fallacies relevant to the workload are addressed.106- [ ] Bundled references are loaded only for categories needed by the task.107- [ ] Azure service mappings are presented as options, not mandatory choices.108- [ ] The recommendation covers reliability, security, cost, operations, and performance impacts when relevant.109110## References111112- [Cloud Design Patterns - Azure Architecture Center](https://learn.microsoft.com/azure/architecture/patterns/)113- [Azure Well-Architected Framework](https://learn.microsoft.com/azure/architecture/framework/)