vaquarkhan/microservices-recipes-a-free-gitbook
소개
“아키텍트 현장 가이드. 적응형 세분화를 위한 The Khan Pattern™을 소개합니다. 쪼개기를 멈추고 거버넌스를 시작하세요.” —Vaquar Khan
학습 및 교육측정된 스타 증가
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- -1
- in 1 month
- 기록 수집 중
서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.
README.md
Original📖 Microservices Recipes: The Architect's Field Guide

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
"Stop splitting, start governing." - Adaptive Granularity Governance: The Khan Microservice Pattern

📋 Table of Contents
📚 Front Matter
- Preface - why a boundary has to earn its keep
- About the Author - Viquar Khan
- Mentorship - free 1:1 on ADPList
- Licensing - MIT for code; CC BY-NC-ND 4.0 for prose and figures
- Naming - methodology title and attribution
- Citations - how to cite this work
- Copyright - owner and dual license
- Disclaimer - legal notice
- Contributing
- Version history
- Changelog
- Academic use - the full book is public; cite it
- CITATION.cff - machine-readable citation metadata
📖 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
- Start with Chapter 1: Earned Boundaries
- Read The Preface to understand the book's philosophy
- Progress through Parts I → X. All 23 chapters are in this repo.
For Experienced Practitioners
- Review the Table of Contents above
- Jump to specific chapters addressing your current challenges
- Use Quick Reference for rapid pattern lookup
For Architects
- Focus on strategic chapters: Ch 2, Ch 3, Ch 7
- Study Adaptive Granularity Governance: The Khan Microservice Pattern (formerly Adaptive Granularity Strategy)
- 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
- GitHub Pages: https://vaquarkhan.github.io/microservices-recipes-a-free-gitbook/
- GitHub Repository: https://github.com/vaquarkhan/microservices-recipes-a-free-gitbook
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
관련 프로젝트 살펴보기
불러오는 중…