Whole-book reading guide from stratified index samples; jump to passages in the text
Tip the Site
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat Pay
Alipay
Open WeChat or Alipay and scan. No login required.
AI guide
【One-Line Pitch】
A practical, seven-chapter guide to designing and deploying microservices, covering everything from API gateways and inter-service communication to service discovery and data management. Ideal for architects and developers moving from monolithic to microservice architectures, with concrete NGINX-based examples throughout.
【Book Arc】
- **Opening (~0%–9%)**: Introduces the microservices concept, contrasting it with monolithic applications and the "monolithic hell" of scaling, deployment, and technology adoption. Establishes the Scale Cube model (X, Y, Z axes) and the core principle of decentralized data.
- **Early (~9%–27%)**: Details the advantages (independent deployment, scaling, polyglot persistence) and disadvantages (distributed complexity, testing challenges, cross-service changes) of microservices. Concludes with NGINX Plus as a reverse proxy and the first major pattern: the API Gateway.
- **Early (~27%–41%)**: Explores the API Gateway pattern in depth—its role as a single entry point, benefits (encapsulation, custom APIs per client), drawbacks (development bottleneck), and implementation considerations like performance and reactive programming.
- **Middle (~41%–55%)**: Covers process inter-communication (IPC), including interaction styles (one-to-one, one-to-many; sync vs. async), handling partial failures (timeouts, circuit breakers), and comparing synchronous (REST, Thrift) vs. asynchronous (messaging) mechanisms.
- **Late (~55%–100%)**: Addresses service discovery (client-side vs. server-side patterns, registration approaches), event-driven data management (saga pattern, event sourcing), deployment strategies, and refactoring monoliths. Excerpts confirm these topics but do not provide full details.
【Key Takeaways】
- **Monoliths fail at scale** (Early): A single codebase with all modules in one process becomes a bottleneck for scaling, reliability, and adopting new technologies. Microservices solve this by decomposing the application into smaller, independently deployable services.
- **The Scale Cube guides decomposition** (Early): The Y-axis (functional decomposition into services) is the core of microservices, while X-axis (load-balanced replicas) and Z-axis (data partitioning) handle scaling. Most applications combine all three.
- **Each service owns its data** (Early): Decentralized data management (polyglot persistence) is essential for loose coupling, but it introduces complexity—distributed transactions are avoided in favor of eventual consistency.
- **API Gateway is the single entry point** (Early): It encapsulates internal architecture, provides custom APIs per client (e.g., mobile vs. web), and handles routing, composition, and protocol translation. It's a trade-off: added complexity vs. simplified client communication.
- **Partial failures must be designed for** (Middle): In distributed systems, services can be slow or unavailable. Strategies like network timeouts, limiting in-flight requests, circuit breakers, and fallbacks (e.g., Netflix Hystrix) prevent resource exhaustion and cascading failures.
- **Choose IPC based on interaction needs** (Middle): Asynchronous messaging (AMQP, Kafka) decouples clients and buffers messages, while synchronous REST/Thrift is simpler for request/response. Message formats (JSON/XML vs. binary like Protocol Buffers) trade readability for efficiency.
- **Service discovery is mandatory in dynamic environments** (Late): With auto-scaling and failures, service instances have dynamic network locations. Client-side and server-side discovery patterns, plus self-registration or third-party registration, are essential for locating services.
- **Event-driven data management solves distributed data problems** (Late): Patterns like sagas (local transactions with events) and event sourcing maintain consistency without distributed transactions, which are impractical with modern NoSQL and message brokers.
【Reading Tips】
- **Skim the NGINX "实战" sections** if you're not using NGINX; they are vendor-specific add-ons. Focus on the core architectural patterns in the main chapters.
- **Deep-read Chapter 2 (API Gateway)** and **Chapter 3 (IPC)**: These are the most actionable for design decisions. Pay attention to the trade-offs and the partial-failure strategies.
- **Treat Chapter 1 as context**: The monolith vs. microservices comparison and the Scale Cube are foundational, but you can move quickly if you're already familiar with the basics.
- **Watch for the data management chapter**: It's the most conceptually challenging (sagas, event sourcing). Read it twice if needed—it's critical for real-world implementations.
- **Use the book as a decision framework**: For each pattern (gateway, IPC, discovery), list the pros/cons and match them to your project's constraints (team size, traffic, existing infrastructure).
【Coverage Limits】
This guide covers the first five chapters in detail (intro, API gateway, IPC, service discovery, data management). The final chapters on deployment strategies and refactoring monoliths are mentioned but not fully covered in the excerpts.
设施以及可能运行的 VM 基础架构。 此外,容器通常部署在一个按单个 VM 收费的基础设施上。因此,如之前所述,可能 会产生超额配置 VM 的额外成本,以处理负载峰值。 有趣的是,容器和 VM 之间的区别可能会有些模糊。如之前所述,Boxfuse VM 可以很 快地构建和启动。Clear Containers 项...
使用了模块 Y。第一个重构步骤是定义一对粗粒度的 API。第一个接口是一个使用模块 X 来调用 模块 Z 的入站接口。第二个接口是一个使用模块 Z 调用模块 Y 的出站接口。 第二个重构步骤是将模块转换为一个独立服务。入站和出站接口使用 IPC 机制的代码 来实现。您将很可能需要通过将 Module Z 与 Mi...
Support this siteYour recognition and a small knowledge-service contribution help keep this technical work open source.
Scan the WeChat Pay or Alipay code below. Logged-in and guest visitors can both tip.
WeChat PayAlipay
Open WeChat or Alipay and scan. No login required.
Add Tag
Enter tag name (max 50 characters)
Share E-Book
微服务:从设计到部署 (oopsguy.com)(Z-Library)
Scan QR code with your phone to access
Copy the link or scan the QR code to access this e-book on your phone
Share to WeChat Moments
微服务:从设计到部署 (oopsguy.com)(Z-Library)
Scan the QR code with WeChat to open this book
Tap the ··· menu in the top-right corner
Choose Share to Moments
You are already in WeChat. Tap ··· in the top-right corner and choose Share to Moments.
Share E-Book via Email
Please enter email address
Donation Statistics
¥.00
Total Donations
0
Donation Count
微服务:从设计到部署 (oopsguy.com)(Z-Library)
Find Your Favorite Books
Only registered users can comment after logging in. Comments need to be reviewed by administrators before being displayed
Loading comments...
Reply to Comment
Edit Comment