Skip to content
项目

vaquarkhan/microservices-recipes-a-free-gitbook

在 GitHub 查看

关于

“架构师的实战指南。介绍用于自适应粒度的 The Khan Pattern™:停止拆分,开始治理。”——Vaquar Khan

学习与教育

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

📖 Microservices Recipes: The Architect's Field Guide

Microservices Recipes Cover

A practical guide to building, scaling, and managing microservices architectures

As defined by Sam Newman in his foundational text Building Microservices, microservices are "small, autonomous services that work together." This definition emphasizes the dual requirements of independence and interoperability.

Featuring Adaptive Granularity Governance: The Khan Microservice Pattern

GitHub Pages DOI License: MIT Prose: CC BY-NC-ND 4.0 Contributions Welcome


"Stop splitting, start governing." - Adaptive Granularity Governance: The Khan Microservice Pattern

Microservices Animation

📋 Table of Contents

📚 Front Matter


📖 Part I: The Sociotechnical Substrate

Focus: Aligning organization and architecture to prevent the "Distributed Monolith"

Chapter Title Description Read Time
1 Earned Boundaries, Not Fashionable Ones SOA done right, replaceability over size, and finding seams in Git history 35 min
2 The Distributed Monolith: Diagnosis and First Remedies Connascence, Conway's Law, contracts, and the first resilience gate 40 min
3 Decouple the Language Before You Decouple the Code Bounded contexts, context maps, Event Storming, and aggregates 40 min

🗄️ Part II: Data Architecture

Focus: Managing data consistency and transactions in distributed systems

Chapter Title Description Read Time
4 The End of ACID Consistency dial, CRDTs, cloud internals, and data ownership 45 min
5 The Consistency Tax of Spanning Services Sagas, compensation, choreography vs orchestration, isolation 45 min
6 Close the Dual Write, Then Survive Failure Outbox, timeouts, breakers, backpressure, and error budgets 45 min
7 Every Hop Is a Door. Prove Who Is Knocking. Zero trust, tokens, secrets, and agent capability limits 50 min

🌐 Part III: Inter Process Communication

Focus: Moving bits between services without creating latency storms

Chapter Title Description Read Time
8 You Cannot Attach a Debugger. Emit the Evidence First. Metrics, structured logs, traces, OpenTelemetry, and burn-rate alerts 50 min
9 There Is No Whole System to Test. Test the Agreements. Pyramid, contracts, async tests, and testing in production 50 min
10 Publish What Happened. Do Not Wait. Backpressure, poison messages, idempotency, and claim check 50 min

🎯 Part IV: Adaptive Granularity Governance

Focus: Quantitative framework for microservices decomposition (The Khan Microservice Pattern)

Chapter Title Description Read Time
11 A Boundary Earns Its Keep Only When All Three Hold Fulcrum, RVx, SCS, and KM3, with honesty tiers 70 min

🧱 Part V: Resilience Engineering & Advanced Scaling

Focus: Blast-radius control and evidence-based failure injection

Chapter Title Description Read Time
12 A Single Bad Shard Should Be a Footnote Shuffle sharding inside cells, with measured blast radius 55 min
13 Break It on Purpose. Watch. Then You Know. Game days, FIS abort alarms, and metastable retries 55 min

🏗️ Part VI: The Platform Engineering Shift

Focus: Golden paths, policy-as-code, and telemetry economics

Chapter Title Description Read Time
14 The Definition Is the Truth. Reality Is Reconciled Toward It. Desired state, locked state, three-layer policy, and version-pinned golden paths 55 min
15 Spend the Budget on Answers. Stay Sighted When It Counts. Wide events, tail sampling, eBPF cross-check, and retention tiers 55 min

Part VII: Agents and retrieval

Focus: Probabilistic components inside deterministic architectures

Chapter Title Description Read Time
16 The Model Proposes. The Executor Disposes. Planner versus executor, tool gateway, and bounded multi-agent design 55 min
17 Retrieval as a Data-Plane Discipline, Not a Prompt Trick ACL prefilter, hybrid retrieval, pinned embeddings, and shadow eval 55 min

Part VIII: Migration

Focus: Monolith-first discipline and incremental replacement

Chapter Title Description Read Time
18 The Right Number of Services Is Often One. Enforced modules, schema-per-module grants, and extraction on evidence 55 min
19 Replace It While It Is Still Running. Facade first, data ownership, shadow that does not persist twice 55 min

📈 Part IX: Organizational Maturity

Focus: KM3 operational assessment

Chapter Title Description Read Time
20 Has This Organization Earned the Right to Distribute? Evidence-based KM3 assessment, not a badge race 50 min

📐 Part X: The Science Behind the Metric

Focus: Cost, construct validity, and anti-Goodhart discipline

Chapter Title Description Read Time
21 Price the Waste. Name the Rest. Do Not Invent a Total. Wasted time as an identity, payback on hypothesized savings 50 min
22 A Formula Confers No Truth. Outcomes Do. Construct validity, reliability, and evidence tiers 50 min
23 Never Point the Number at the People. Tamper-evidence, named attacks, and no score in reviews 50 min

📚 Reference Materials

Resource Description
📖 Glossary Comprehensive definitions of microservices terms
⚡ Quick Reference Handy reference cards for patterns and practices
📚 Bibliography Curated list of books, articles, and resources

The method

Adaptive Granularity Governance: The Khan Microservice Pattern (formerly the Adaptive Granularity Strategy) is how I decide whether a boundary earns a remote hop. Chapter 11 is the score. Chapters 21–23 cover cost, whether the measurement is valid, and how you keep it from being gamed.

The method is an original synthesis from practice. Cite it if you reuse it (CITATIONS.md).

The job is not a perfect target architecture. It is to keep the boundaries honest as the system and the team change.


Start here

For Beginners

  1. Start with Chapter 1: Earned Boundaries
  2. Read The Preface to understand the book's philosophy
  3. Progress through Parts I → X. All 23 chapters are in this repo.

For Experienced Practitioners

  1. Review the Table of Contents above
  2. Jump to specific chapters addressing your current challenges
  3. Use Quick Reference for rapid pattern lookup

For Architects

  1. Focus on strategic chapters: Ch 2, Ch 3, Ch 7
  2. Study Adaptive Granularity Governance: The Khan Microservice Pattern (formerly Adaptive Granularity Strategy)
  3. Review Complete Book Preview for advanced topics

Scope

Metric Value
Total Chapters 23 (Parts I–X; all linked in the TOC)
Reading Time ~19 hours across the full book
Code Examples Recipes in every practitioner chapter
Patterns Covered Decomposition, data, resilience, platform, AI, migration
Evidence stance Proved / demonstrated / hypothesized - Chapter 11 and 22

Topics covered

🏗️ Architectural Patterns
  • Adaptive Granularity Governance: The Khan Microservice Pattern for adaptive service granularity
  • Distributed Monolith identification and prevention
  • Domain-Driven Design for service boundaries
  • Saga Pattern for distributed transactions
  • Event Sourcing and CQRS patterns
  • API Gateway and Service Mesh architectures
🔧 Technical Implementation
  • Microservices Communication (REST, gRPC, GraphQL)
  • Data Management strategies and consistency patterns
  • Deployment & Operations with containers and orchestration
  • Monitoring & Observability with distributed tracing
  • Security patterns and zero-trust architectures
  • Testing Strategies for distributed systems
🎯 Real-World Skills
  • Conway's Law and organizational design
  • Failure Mode Analysis and resilience engineering
  • Performance Optimization and scalability patterns
  • Migration Strategies from monolith to microservices
  • Team Topologies and cognitive load management
  • Platform Engineering and developer experience

👨‍💻 About the Author

Viquar Khan is a Senior Data Architect at AWS Professional Services with 20+ years of expertise in distributed systems. Creator of Adaptive Granularity Governance: The Khan Microservice Pattern, the Service Decomposition Workflow, and the Microservices Maturity Assessment (KM3). Original methodologies by the author; please cite.

JSR 368 expert group (Java Message Service 2.1). Also author of Data Engineering with AWS Cookbook (Packt, 2026). On Stack Overflow his helpful posts have 7.5 million people reached (Stack Overflow’s estimate). 2024–2025 research: Fulcrum / RVx. Book history, 2019 to 2026: AUTHOR.md.

Connect: ORCID | LinkedIn | GitHub | Amazon | Mentorship


🌐 Access This Book

📖 Read Online

Academic use

The 23 chapters are in this repository. There is no separate academic edition. Cite it (CITATIONS.md). Lineage: VERSION-HISTORY.md. Notes: FREE-ACCESS.md.

Download

git clone https://github.com/vaquarkhan/microservices-recipes-a-free-gitbook.git

ZIP of the default branch: archive. GitHub Pages deploys from master. DOI: 10.5281/zenodo.22654421.


Community

Star the repo if it is useful. Cite it if you use the method. Open an issue for errors. Case studies: see CONTRIBUTING.md. Watch the repository for releases.


📜 License & Usage

Dual license. Code is MIT. Prose and figures are CC BY-NC-ND 4.0.

Citation

Khan, V. (2026). Microservices Recipes: The Architect's Field Guide (Version 2.1).
Zenodo. https://doi.org/10.5281/zenodo.22654421

Read

Chapter 1 · Preface · Quick reference


How to cite

Machine-readable metadata: CITATION.cff. Full guide: CITATIONS.md.

APA:

Khan, V. (2026). Microservices recipes: The architect's field guide (Version 2.1)
[Featuring Adaptive Granularity Governance: The Khan Microservice Pattern]. Zenodo.
https://doi.org/10.5281/zenodo.22654421

IEEE:

[1] V. Khan, Microservices Recipes: The Architect's Field Guide, ver. 2.1,
featuring Adaptive Granularity Governance: The Khan Microservice Pattern. Zenodo, 2026.
doi: 10.5281/zenodo.22654421.

Copyright and licensing

Copyright © 2019-2026 by Viquar Khan.

Adaptive Granularity Governance: The Khan Microservice Pattern, the Service Decomposition Workflow, and the Microservices Maturity Assessment (KM3) are original methodologies by Viquar Khan; please cite. No trademark is claimed at this time.

Material License
Source code MIT
Book text, diagrams, figures CC BY-NC-ND 4.0

Details: LICENSING.md | COPYRIGHT.md | DISCLAIMER.md | NAMING.md

Last Updated: September 6, 2026 | Version 2.1 | Original work by Viquar Khan

探索相关项目

加载中…