Skip to content

Commit e904e03

Browse files
authored
Create summary.en.md
1 parent a57f73b commit e904e03

File tree

1 file changed

+132
-0
lines changed
  • books/Cloud Design Patterns and Microservices Architecture

1 file changed

+132
-0
lines changed
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
# Book Summary: Cloud Design Patterns and Microservices Architecture
2+
3+
* **Author**: Danial Khosravi
4+
* **Genre**: Software Engineering, Cloud Computing, Microservices
5+
* **Publication Date**: 2025
6+
* **Book Link**: https://github.com/DannyRavi/cloud_software_farsi
7+
8+
This document summarizes the key lessons and insights extracted from the book.
9+
I highly recommend reading the original book for the full depth and author's perspective.
10+
11+
## Before You Get Started
12+
* I summarize key points from useful books to learn and review quickly.
13+
* Simply click on `Ask AI` links after each section to dive deeper.
14+
15+
<!-- LH-BUTTONS:START -->
16+
<!-- auto-generated; do not edit -->
17+
<!-- LH-BUTTONS:END -->
18+
19+
## Introduction and Guide
20+
21+
**Summary**: System design involves defining elements, interactions, and relationships to meet specific requirements, breaking down problems into smaller components for effective collaboration. In software engineering, it focuses on high-level architecture and components, crucial for interviews where candidates design systems including architecture, interactions, and trade-offs. The book is structured so each chapter can be studied independently, with explanations in footnotes where needed, minimizing dependencies. Code examples are on GitHub. It covers over 40 patterns and 10 anti-patterns in cloud and microservices architectures, primarily from Microsoft articles.
22+
23+
**Example**: Imagine designing a large software system; you analyze existing setups, identify needs, create a detailed plan, and iterate through testing and refinement, much like piecing together a puzzle where each part fits seamlessly.
24+
25+
**Link for More Details**:
26+
[Ask AI: Introduction and Guide](https://alisol.ir/?ai=Introduction%20and%20Guide%7CDanial%20Khosravi%7CCloud%20Design%20Patterns%20and%20Microservices%20Architecture)
27+
28+
## Data Management Patterns
29+
30+
**Summary**: These patterns help manage data in cloud environments efficiently. Cache-Aside loads data into cache on demand from a data store. CQRS separates read and update operations using different interfaces. Event Sourcing uses an append-only store for sequences of events on domain data. Index Table creates indexes on frequently queried fields for better query performance. Materialized View uses pre-populated views for optimized queries when data isn't ideally formatted. Sharding divides a data store into horizontal partitions. Static Content Hosting deploys static content to cloud storage for direct delivery. Valet Key provides limited direct access to resources.
31+
32+
**Example**: For a high-traffic e-commerce site, use Cache-Aside to fetch product details from a database only when not in cache, reducing load times like grabbing a snack from the fridge instead of going to the store every time.
33+
34+
**Link for More Details**:
35+
[Ask AI: Data Management Patterns](https://alisol.ir/?ai=Data%20Management%20Patterns%7CDanial%20Khosravi%7CCloud%20Design%20Patterns%20and%20Microservices%20Architecture)
36+
37+
## Design and Implementation Patterns
38+
39+
**Summary**: Good designs emphasize consistency, maintainability, and reusability. Ambassador acts as a proxy for client connections, handling tasks like monitoring and security. Anti-Corruption Layer translates between modern and legacy systems. Backends for Frontends creates dedicated backends for specific UIs. CQRS separates reads and writes. Compute Resource Consolidation bundles operations into one unit. Edge Workload Configuration manages diverse workloads. External Configuration Store centralizes config outside deployments. Gateway patterns (Aggregation, Offloading, Routing) handle requests efficiently. Leader Election coordinates distributed tasks. Pipes and Filters break complex tasks into reusable elements. Sidecar deploys components in separate processes for isolation. Static Content Hosting serves static files directly. Strangler Fig gradually replaces legacy with new services.
40+
41+
**Example**: In migrating an old banking app, Strangler Fig lets you swap out outdated login modules with secure new ones piece by piece, like vines slowly overtaking an old wall without tearing it down all at once.
42+
43+
**Link for More Details**:
44+
[Ask AI: Design and Implementation Patterns](https://alisol.ir/?ai=Design%20and%20Implementation%20Patterns%7CDanial%20Khosravi%7CCloud%20Design%20Patterns%20and%20Microservices%20Architecture)
45+
46+
## Messaging Patterns
47+
48+
**Summary**: Distributed cloud apps need messaging infrastructure for loose coupling and scalability. Asynchronous messaging brings benefits but challenges like message ordering and idempotency. Asynchronous Request-Reply decouples frontend from async backend. Claim Check splits large messages. Choreography lets components decide workflows independently. Competing Consumers process messages concurrently. Pipes and Filters reuse elements. Priority Queue prioritizes higher-priority requests. Publisher-Subscriber announces events async without coupling. Queue-Based Load Leveling buffers tasks. Saga manages distributed transactions. Scheduler Agent Supervisor coordinates remote actions. Sequential Convoy processes related messages in order.
49+
50+
**Example**: For an order processing system, Saga coordinates steps like payment and shipping across services, rolling back if one fails, similar to a group hike where everyone adjusts if someone twists an ankle.
51+
52+
**Link for More Details**:
53+
[Ask AI: Messaging Patterns](https://alisol.ir/?ai=Messaging%20Patterns%7CDanial%20Khosravi%7CCloud%20Design%20Patterns%20and%20Microservices%20Architecture)
54+
55+
## Other Cloud Architecture Patterns
56+
57+
**Summary**: Additional patterns for cloud architectures include Throttling to control resource use during high demand. Retry handles transient failures resiliently. Rate Limiting prevents abuse. Messaging Bridge connects heterogeneous systems. Geode deploys services across geographies. Gatekeeper controls access with authentication. Federated Identity simplifies user auth across systems. Deployment Stamp routes traffic for testing. Circuit Breaker pauses on repeated failures. Bulkhead isolates components. Compensating Transaction undoes incomplete transactions. Health Endpoint Monitoring checks service health.
58+
59+
**Example**: Circuit Breaker in a payment gateway stops retrying a failing bank API after a few tries, like flipping a switch to prevent overload, giving time for recovery.
60+
61+
**Link for More Details**:
62+
[Ask AI: Other Cloud Architecture Patterns](https://alisol.ir/?ai=Other%20Cloud%20Architecture%20Patterns%7CDanial%20Khosravi%7CCloud%20Design%20Patterns%20and%20Microservices%20Architecture)
63+
64+
## Cloud Anti-Patterns
65+
66+
**Summary**: Anti-patterns are common flawed processes increasing scalability issues. Busy Database offloads too much to the DB. Busy Front End moves heavy tasks to background. Chatty I/O sends many small network requests. Extraneous Fetching retrieves excess data. Improper Instantiation recreates shareable objects. Monolithic Persistence uses one DB for diverse patterns. No Caching skips temporary storage. Noisy Neighbor overuses resources. Retry Storm retries failures excessively. Synchronous I/O blocks threads.
67+
68+
**Example**: Noisy Neighbor in a shared cloud tenant setup where one user's heavy queries slow everyone else, like a loud party next door disrupting the neighborhood.
69+
70+
**Link for More Details**:
71+
[Ask AI: Cloud Anti-Patterns](https://alisol.ir/?ai=Cloud%20Anti-Patterns%7CDanial%20Khosravi%7CCloud%20Design%20Patterns%20and%20Microservices%20Architecture)
72+
73+
## Ambassador Pattern
74+
75+
**Summary**: Create helper services that send network requests on behalf of a consumer service or app. Ambassador acts as an out-of-process proxy co-located with the client, useful for offloading common client connectivity tasks like monitoring, logging, routing, and security (e.g., TLS). Often used with legacy apps to extend networking capabilities without modification.
76+
77+
**Example**: In a microservices setup, an Ambassador proxy handles retries and circuit breaking for calls to a remote service, freeing the main app from these details, like a personal assistant managing your calls.
78+
79+
**Link for More Details**:
80+
[Ask AI: Ambassador Pattern](https://alisol.ir/?ai=Ambassador%20Pattern%7CDanial%20Khosravi%7CCloud%20Design%20Patterns%20and%20Microservices%20Architecture)
81+
82+
## Anti-Corruption Layer Pattern
83+
84+
**Summary**: Implement a facade or adapter between subsystems with different semantics. This layer translates requests, ensuring one subsystem's design isn't compromised by external dependencies. Useful in gradual migrations from legacy to modern systems.
85+
86+
**Example**: When integrating a new CRM with an old inventory system, the layer converts modern API calls to legacy formats, acting as a translator in a bilingual conversation.
87+
88+
**Link for More Details**:
89+
[Ask AI: Anti-Corruption Layer Pattern](https://alisol.ir/?ai=Anti-Corruption%20Layer%20Pattern%7CDanial%20Khosravi%7CCloud%20Design%20Patterns%20and%20Microservices%20Architecture)
90+
91+
## Asynchronous Request-Reply Pattern
92+
93+
**Summary**: Decouple backend processing from the frontend host when backend must be async but frontend needs a clear response. This handles scenarios where immediate replies aren't feasible due to async nature.
94+
95+
**Example**: A web app submits a long-running job; the frontend gets an immediate acknowledgment, polling later for results, like ordering food online and getting a tracking link.
96+
97+
**Link for More Details**:
98+
[Ask AI: Asynchronous Request-Reply Pattern](https://alisol.ir/?ai=Asynchronous%20Request-Reply%20Pattern%7CDanial%20Khosravi%7CCloud%20Design%20Patterns%20and%20Microservices%20Architecture)
99+
100+
## Noisy Neighbor Anti-Pattern
101+
102+
**Summary**: In multitenant systems, one tenant disproportionately uses resources, impacting others. Monitor usage, apply governance like throttling or quotas, reserve capacity, or migrate to single-tenant for sensitive workloads.
103+
104+
**Example**: In a shared database, one app's massive queries slow queries for all, like a neighbor blasting music late at night.
105+
106+
**Link for More Details**:
107+
[Ask AI: Noisy Neighbor Anti-Pattern](https://alisol.ir/?ai=Noisy%20Neighbor%20Anti-Pattern%7CDanial%20Khosravi%7CCloud%20Design%20Patterns%20and%20Microservices%20Architecture)
108+
109+
## Retry Storm Anti-Pattern
110+
111+
**Summary**: Excessive, frequent retries by clients when a service is unavailable can hinder recovery and worsen issues. Limit retries, add delays (e.g., exponential backoff), handle errors properly, and use circuit breakers.
112+
113+
**Example**: During a brief outage, clients retry immediately and endlessly, overwhelming the recovering server, like a crowd pushing at a jammed door.
114+
115+
**Link for More Details**:
116+
[Ask AI: Retry Storm Anti-Pattern](https://alisol.ir/?ai=Retry%20Storm%20Anti-Pattern%7CDanial%20Khosravi%7CCloud%20Design%20Patterns%20and%20Microservices%20Architecture)
117+
118+
## Synchronous I/O Anti-Pattern
119+
120+
**Summary**: Blocking the calling thread until I/O completes reduces efficiency and vertical scalability. Replace with async I/O to free threads for other work, improving resource utilization.
121+
122+
**Example**: Uploading a file synchronously waits idle; async lets the thread handle other requests meantime, like multitasking while waiting for coffee to brew.
123+
124+
**Link for More Details**:
125+
[Ask AI: Synchronous I/O Anti-Pattern](https://alisol.ir/?ai=Synchronous%20I%2FO%20Anti-Pattern%7CDanial%20Khosravi%7CCloud%20Design%20Patterns%20and%20Microservices%20Architecture)
126+
127+
---
128+
**About the summarizer**
129+
130+
I'm *Ali Sol*, a Backend Developer. Learn more:
131+
* Website: [alisol.ir](https://alisol.ir)
132+
* LinkedIn: [linkedin.com/in/alisolphp](https://www.linkedin.com/in/alisolphp)

0 commit comments

Comments
 (0)