Microservices Recipes

The Architect’s Field Guide

Book Cover

Adaptive Granularity Governance: The Khan Microservice Pattern

by Viquar Khan

Version 2.1 · 23 chapters · September 2026

Start reading Preface Author

A service boundary is worth deploying separately only when it earns its distributed cost. Chapter 11 is the measurement. Fulcrum / RVx is the research.


Start here

A monolith on the left. Earned service boundaries on the right.


Contents

Front matter

Part I - The sociotechnical substrate

Align the shape of the organization with the shape of the architecture.

     
1 Earned Boundaries, Not Fashionable Ones 35 min
2 The Distributed Monolith: Diagnosis and First Remedies 40 min
3 Decouple the Language Before You Decouple the Code 40 min

Part II - Data architecture

Splitting a system splits its data.

     
4 The End of ACID 45 min
5 The Consistency Tax of Spanning Services 45 min
6 Close the Dual Write, Then Survive Failure 45 min
7 Every Hop Is a Door. Prove Who Is Knocking. 50 min

Part III - Evidence between processes

You cannot attach a debugger to the space between services.

     
8 You Cannot Attach a Debugger. Emit the Evidence First. 50 min
9 There Is No Whole System to Test. Test the Agreements. 50 min
10 Publish What Happened. Do Not Wait. 50 min

Part IV - Adaptive Granularity Governance

The score. Chapter 11 is the only source of truth for the formula.

     
11 A Boundary Earns Its Keep Only When All Three Hold 70 min

Part V - Resilience and scale

     
12 A Single Bad Shard Should Be a Footnote 55 min
13 Break It on Purpose. Watch. Then You Know. 55 min

Part VI - Platform

     
14 The Definition Is the Truth. Reality Is Reconciled Toward It. 55 min
15 Spend the Budget on Answers. Stay Sighted When It Counts. 55 min

Part VII - Agents and retrieval

     
16 The Model Proposes. The Executor Disposes. 55 min
17 Retrieval as a Data-Plane Discipline, Not a Prompt Trick 55 min

Part VIII - Migration

     
18 The Right Number of Services Is Often One. 55 min
19 Replace It While It Is Still Running. 55 min

Part IX - Organizational maturity

     
20 Has This Organization Earned the Right to Distribute? 50 min

Part X - The science behind the metric

     
21 Price the Waste. Name the Rest. Do Not Invent a Total. 50 min
22 A Formula Confers No Truth. Outcomes Do. 50 min
23 Never Point the Number at the People. 50 min

Reference


The method

A boundary is worth deploying separately only when it is efficient at runtime, independent in how it changes, and small enough for its team to own. Chapter 11 measures that. Chapter 23 is the rule that keeps the measurement honest: do not use the score to review people.


The author

Viquar Khan is a Senior Data Architect at AWS Professional Services. He has kept this book in public on GitHub from the January 2019 notes through Version 2.1. On Stack Overflow his helpful posts have 7.5 million people reached.

Mentorship on ADPList. ORCID · LinkedIn · GitHub


Colophon

Copyright © 2019–2026 by Viquar Khan. Dual license: MIT for code; CC BY-NC-ND 4.0 for prose and figures. See LICENSING.md.

First edition January 2019. Second edition January 2026. Version 2.1 September 6, 2026. DOI 10.5281/zenodo.22654421. Citations · Copyright · Disclaimer

Star the repo · Cite it · Contributing