Cloud design patterns: An overview : Part 1

Abhinav Vinci
4 min readMay 3, 2024

--

Cloud design patterns are architectural solutions to common problems encountered when designing and implementing applications in a cloud environment.

These patterns help in optimizing performance, scalability, reliability, and security.

Architecture patterns:

  • Strangler Pattern: Used for migrating legacy systems to the cloud gradually. New features are implemented in the cloud while existing functionality remains in the legacy system until fully migrated.
https://learn.microsoft.com/en-us/azure/architecture/patterns/strangler-fig
  • Queue-based Load Leveling: Uses queues to decouple components of an application, allowing them to operate at different speeds. This pattern helps in managing bursts of traffic and prevents overload on downstream services.
https://medium.com/p/a8e77e614c2c
  • API Composition: Instead of relying on a single monolithic API, this pattern involves composing APIs from multiple smaller services or microservices to fulfill client requests. The API composition layer aggregates data from various sources and presents it to clients as a unified API, improving flexibility and scalability.
https://microservices.io/patterns/data/api-composition.html
  • Backends for Frontends (BFF): In scenarios where multiple client types (e.g., web, mobile, IoT) interact with the same backend services but have different requirements, the BFF pattern involves creating separate backend services tailored to each client type. This allows for optimized client-specific logic and improves performance and user experience.
https://medium.com/@vinciabhinav7/what-is-bff-design-pattern-an-overview-bb2793f37669
  • API Gateway: A single entry point for clients to access multiple services or microservices. The API gateway handles authentication, routing, request aggregation, and protocol translation, simplifying client interactions with the underlying services.
https://medium.com/@vinciabhinav7/api-gateway-pattern-why-when-to-use-fcd77e5b057e

Storage Patterns

  • Data Sharding: Distributes data across multiple databases or shards to improve scalability and performance. Each shard contains a subset of the data, and requests are routed to the appropriate shard based on a shard key.
  • External Configuration Store: In this pattern, application configuration is stored externally in a centralized repository (e.g., a database or a key-value store) rather than being hardcoded within the application code. This allows for dynamic configuration updates without requiring application redeployment and facilitates configuration management across multiple environments.
https://medium.com/@vinciabhinav7/configuration-externalization-design-pattern
  • Event Sourcing: All changes to application state are stored as a sequence of events. This pattern is useful for audit logging, debugging, and reconstructing the state of an application at any point in time.
https://medium.com/@vinciabhinav7/event-sourcing-3a1a2b75a971
  • Data Lake: In this pattern, large volumes of structured and unstructured data are stored in a centralized repository (the data lake) in its native format. Data can be ingested from various sources, and different analytics and processing tools can access the data for analysis, machine learning, and reporting purposes.
https://medium.com/p/fade80bf6f40

Compute patterns:

  • Serverless Architecture: Also known as Function-as-a-Service (FaaS), it allows developers to deploy individual functions or pieces of code without managing the underlying infrastructure. This architecture scales automatically based on demand and reduces operational overhead.
https://blog.bitsrc.io/building-a-serverless-architecture-with-aws-lambda-and-api-gateway

Resiliency Patterns:

  • Circuit Breaker: Prevents a service from repeatedly attempting to execute an operation that is likely to fail. If a service detects that a dependent service is unavailable or responding slowly, it can open the circuit and stop sending requests until the dependent service is available again.
https://martinfowler.com/bliki/CircuitBreaker.html
  • Retry Pattern: Automatically retries an operation that has failed due to transient faults such as network issues or temporary service unavailability.
  • Bulkhead Pattern: Isolates components of an application into separate pools to prevent a failure in one component from cascading to others. This pattern enhances fault tolerance and system stability.
https://medium.com/p/a8e77e614c2c

In next blog: Part 2

  • Ambassador Pattern
  • Saga Pattern:
  • Cache-Aside Pattern:
  • Geo-Replication
  • Sidecar Pattern
  • Chaos Engineering
  • Retry Storm Pattern:
  • Immutable Infrastructure:

--

--