Cloud Design Patterns

Table of Contents

References

  1. https://microservices.io/index.html
  2. https://microservices.io/patterns/index.html
  3. https://learn.microsoft.com/en-us/azure/architecture/patterns/category/data-management
  4. https://learn.microsoft.com/en-us/azure/architecture/patterns/category/design-implementation
  5. https://learn.microsoft.com/en-us/azure/architecture/patterns/category/data-management

Classifications

  1. Application architecture patterns
    1. Monolithic architecture
    2. Microservices architecture pattern
  2. Decomposition design patterns
    1. Decompose by business capability
    2. Decompose by subdomain
    3. Self-contained Service
    4. Service per team
  3. Refactoring to microservices
    1. Strangler Application
    2. Anti-corruption layer
  4. Data management
    1. Database per Service
    2. Shared database
    3. Cloud Design Patterns - Saga distributed transactions pattern
    4. Command-side replica
    5. API Composition
    6. Domain event
    7. Cache-Aside - Load data on demand into a cache from a data store
    8. Command Query Responsibility Segregation (CQRS) - Segregate operations that read data from operations that update data by using separate interfaces.
    9. Event Sourcing pattern - Use an append-only store to record the full series of events that describe actions taken on data in a domain
    10. Index Table - Create indexes over the fields in data stores that are frequently referenced by queries.
    11. Materialized View - Generate prepopulated views over the data in one or more data stores when the data isn’t ideally formatted for required query operations.
    12. Sharding - Divide a data store into a set of horizontal partitions or shards.
    13. Static Content Hosting - Deploy static content to a cloud-based storage service that can deliver them directly to the client.
    14. Valet Key - Use a token or key that provides clients with restricted direct access to a specific resource or service.
  5. Transactional messaging
    1. Cloud Design Patterns - Transactional outbox pattern
    2. Transaction log tailing
    3. Polling publisher
  6. Testing
    1. Service Component Test
    2. Consumer-driven contract test
    3. Consumer-side contract test
  7. Deployment patterns
    1. Multiple service instances per host
    2. Service instance per host
    3. Service instance per VM
    4. Service instance per Container
    5. Serverless deployment
    6. Service deployment platform
    7. Sidecar pattern - Deploy components of an application into a separate process or container to provide isolation and encapsulation.
  8. Cross cutting concerns
    1. Microservice chassis
    2. Service Template
    3. Externalized configuration pattern
  9. Communication style
    1. Remote Procedure Invocation
    2. Messaging
    3. Domain-specific protocol
    4. Idempotent Consumer
  10. External API
    1. API Gateway pattern
    2. Backend for front-end
  11. Service discovery
    1. Client-side discovery
    2. Server-side discovery
    3. Service registry
    4. Self registration
    5. 3rd party registration
  12. Reliability
    1. Circuit Breaker pattern
  13. Security
    1. Access Token - The API Gateway authenticates the request and passes an access token (e.g. JSON Web Token) that securely identifies the requestor in each request to the services. A service can include the access token in requests it makes to other services.
  14. Observability
    1. Log aggregation
    2. Application metrics
    3. Audit logging
    4. Distributed tracing
    5. Exception tracking
    6. Health check API
    7. Log deployments and changes
  15. UI patterns
    1. Server-side page fragment composition
    2. Client-side UI composition
  16. Design and implementation patterns
    1. Ambassador - Create helper services that send network requests on behalf of a consumer service or application.
    2. Anti-Corruption Layer - Implement a façade or adapter layer between a modern application and a legacy system.
    3. Backends for Frontends - Create separate backend services to be consumed by specific frontend applications or interfaces.
    4. Command Query Responsibility Segregation (CQRS) - Segregate operations that read data from operations that update data by using separate interfaces.
    5. Compute Resource Consolidation - Consolidate multiple tasks or operations into a single computational unit
    6. Edge Workload Configuration - The great variety of systems and devices on the shop floor can make workload configuration a difficult problem.
    7. External Configuration Store - Move configuration information out of the application deployment package to a centralized location.
    8. Gateway Aggregation - Use a gateway to aggregate multiple individual requests into a single request.
    9. Gateway Offloading - Offload shared or specialized service functionality to a gateway proxy.
    10. Gateway Routing - Route requests to multiple services using a single endpoint.
    11. Leader Election - Coordinate the actions performed by a collection of collaborating task instances in a distributed application by electing one instance as the leader that assumes responsibility for managing the other instances.
    12. Pipes and Filters - Break down a task that performs complex processing into a series of separate elements that can be reused.
    13. Static Content Hosting - Deploy static content to a cloud-based storage service that can deliver them directly to the client.
    14. Strangler Fig - Incrementally migrate a legacy system by gradually replacing specific pieces of functionality with new applications and services.
  17. Messaging patterns
    1. Asynchronous Request-Reply - Decouple backend processing from a frontend host, where backend processing needs to be asynchronous, but the frontend still needs a clear response.
    2. Claim Check - Split a large message into a claim check and a payload to avoid overwhelming a message bus.
    3. Choreography - Have each component of the system participate in the decision-making process about the workflow of a business transaction, instead of relying on a central point of control.
    4. Competing Consumers - Enable multiple concurrent consumers to process messages received on the same messaging channel.
    5. Pipes and Filters - Break down a task that performs complex processing into a series of separate elements that can be reused.
    6. Priority Queue - Prioritize requests sent to services so that requests with a higher priority are received and processed more quickly than those with a lower priority.
    7. Publisher-Subscriber - Enable an application to announce events to multiple interested consumers asynchronously, without coupling the senders to the receivers.
    8. Queue-Based Load Leveling - Use a queue that acts as a buffer between a task and a service that it invokes in order to smooth intermittent heavy loads.
    9. Scheduler Agent Supervisor - Coordinate a set of actions across a distributed set of services and other remote resources.
    10. Sequential Convoy - Process a set of related messages in a defined order, without blocking processing of other groups of messages.