Start free trial
Trending New Genres Authors
EnglishEnglish
EspañolSpanish
简体中文Chinese
繁體中文Chinese (Traditional)
FrançaisFrench
DeutschGerman
日本語Japanese
PortuguêsPortuguese
ItalianoItalian
한국어Korean
РусскийRussian
NederlandsDutch
العربيةArabic
PolskiPolish
हिन्दीHindi
Tiếng ViệtVietnamese
SvenskaSwedish
ΕλληνικάGreek
TürkçeTurkish
ไทยThai
ČeštinaCzech
RomânăRomanian
MagyarHungarian
УкраїнськаUkrainian
IndonesiaIndonesian
DanskDanish
SuomiFinnish
БългарскиBulgarian
עבריתHebrew
NorskNorwegian
HrvatskiCroatian
CatalàCatalan
SlovenčinaSlovak
LietuviųLithuanian
SlovenščinaSlovenian
СрпскиSerbian
EestiEstonian
LatviešuLatvian
فارسیPersian
മലയാളംMalayalam
தமிழ்Tamil
اردوUrdu
Searching...
SoBrief
Monolith to Microservices

Monolith to Microservices

Evolutionary Patterns to Transform Your Monolith
Move a legacy system toward independent releases without betting the business on a big-bang rewrite.
by Sam Newman 2019 255 pages
4.29
1k+ ratings
Listen
Immersive
V2.3
Amazon Kindle Audible
Try Full Access for 3 Days
Unlock listening & more!
Continue

Key Takeaways

Do not migrate to microservices until you can name the business outcome.

Start with the problem. Microservices are a costly architectural choice, not a prize. They may help teams release independently, scale selected workloads, or reduce coordination between developers, but each benefit has alternatives. A company workshop illustrates the danger: developers attended because their boss had been told by the CTO to adopt microservices, and the CTO had no clear reason beyond the instruction itself. Without a specific outcome, a team cannot tell whether its choices are helping or merely generating activity.

Test the case first. Ask what user or business result needs to improve, what simpler options might achieve it, and what evidence would show the transition is working. Track measures that match the goal, and include feedback from the people building and using the system.

Analysis

The useful shift here is from architecture as identity to architecture as an intervention. That makes the decision falsifiable: a team can state what should improve and notice when it does not. The hard part is attribution. Faster releases, for example, can be blocked by approval queues or unclear priorities rather than code structure. A migration plan should therefore measure the whole path from idea to production, not assume that changing deployment units fixes every delay.

Put code that changes together behind a boundary that can ship alone.

Optimize for change. A microservice is an independently deployable service organized around a business domain. Independent deployability means a team can change and release one service without needing to deploy its neighbors. This depends on stable interfaces and loose coupling, not on a particular line count or programming language. Each service should also control its own data, so consumers cannot break it by relying on an internal schema.

Follow business work. Music Corp's old three-tier system split the interface, business logic, and database among different teams. Adding a customer's favorite music genre required changes across all three layers. A Customer service that held the related interface, logic, and data could localize that change. The design target is business cohesion: functionality that tends to change together should be grouped together.

Analysis

This frames architecture around the cost of a change rather than the appearance of a diagram. It also exposes a useful test: when a routine business request crosses several team or deployment boundaries, the boundaries may follow technical specialties more than the domain. Still, not every cross-boundary interaction is a design failure. Some business processes genuinely span responsibilities. The aim is to make those dependencies explicit and manageable, not pretend they can all be eliminated.

Use domain conversations to find boundaries, then rank value against extraction difficulty.

Build a shared map. Domain-driven design offers concepts for describing business responsibilities. An aggregate is a domain entity with its own state and life cycle, such as an order or invoice. A bounded context groups related domain concepts behind a clear interface. These can suggest service boundaries, but the book recommends starting with broader contexts to avoid creating too many services too early.

Model before cutting. Event Storming is a collaborative exercise in which technical and nontechnical participants identify important events, group them into aggregates, and then into bounded contexts. The resulting map can reveal dependencies. A notification function used by many parts of a system may be difficult to extract, while invoicing with few incoming dependencies may be easier. Compare that effort with the benefit: an easy extraction that rarely changes may not be worth doing first.

Analysis

The method's strength is social as much as technical: a shared model gives people from different roles a common object to disagree about. The prioritization grid also resists two familiar errors, choosing only the easiest task or pursuing the most ambitious one first. A domain map is still a hypothesis, not a diagram of the code as it exists. Teams need to check actual dependencies and revise the model as implementation reveals hidden entanglements.

Move one customer-facing slice at a time, and keep the old path reversible.

Wrap, replace, redirect. The strangler fig application is a migration approach in which new functionality gradually takes over from an existing system. A proxy can first pass every request through unchanged. A replacement service is then built and deployed, and selected requests are redirected only when the new behavior is ready. If problems appear, traffic can be sent back to the old implementation. Deployment and release are separate: code can run in production without yet serving customers.

Use the right seam. For functionality buried inside code that cannot be intercepted at the edge, branch by abstraction provides another route. Introduce an interface, move callers to it, add a new implementation that calls the service, switch implementations, then remove the old one. Parallel runs can compare old and new outputs before switching the source of truth. Keep behavioral changes separate when rollback matters.

Analysis

These patterns turn a risky redesign into a sequence of experiments with bounded consequences. Their value is not simply that a rollback switch exists, but that teams can learn from real production conditions before making a broad commitment. Reversibility has limits, especially when the new service changes data or customer-visible behavior. A rollback can restore old code, but it cannot automatically undo every side effect. The migration plan must define what can and cannot be safely reversed.

A service that shares its database has not really hidden its implementation.

Protect the boundary. When multiple services read or write the same database directly, consumers become dependent on its tables, columns, and behavior. A schema change in one place can break another service, business rules can end up duplicated, and responsibility for the data becomes unclear. The service boundary then exists in name, but not in practice.

Use bridges deliberately. When immediate separation is impractical, a database view can expose only a controlled projection of existing data. A database wrapping service can put an API in front of a difficult schema and stop new direct dependencies from accumulating. The monolith can also expose an API for data it still owns. These are useful transition steps, not proof that the underlying ownership problem has disappeared. Move data and its state-changing behavior to the service responsible for that business concept.

Analysis

The database is often the architecture's least visible but most powerful interface. Direct access feels efficient because it avoids network calls, yet it transfers control over internal design to every consumer. A view or wrapper makes that bargain more explicit and can buy time without requiring an immediate rewrite. The key question is whether an interim bridge has an owner and a direction of travel. Without both, a temporary compromise can become permanent coupling.

Move data ownership carefully, and model cross-service work as recoverable steps.

Expect consistency trade-offs. Once data lives in separate databases, a single ACID transaction can no longer make every service's update succeed or fail together. Two-phase commit attempts to coordinate such changes, but requires participants to reserve resources and creates failure and latency problems. Newman advises avoiding distributed transactions in most cases. Sometimes the soundest decision is to keep tightly coupled state together until a better boundary is clear.

Make the process explicit. A saga coordinates a business process through separate local transactions. In an order flow, services might reserve stock, take payment, and arrange dispatch. If a later step fails, the system can retry or perform compensating actions, such as refunding payment. Compensation is not time travel: an email cannot be unsent, so the corrective step may be a second message explaining cancellation. Reorder steps to catch likely failures early and reduce the work needed to compensate.

Analysis

A saga changes the question from how to preserve a perfect global transaction to how the business should behave when partial progress has already occurred. That is often a more honest model of real operations. It also forces product decisions into the open: is a delayed shipment retried, canceled, or escalated to a person? Compensation is not automatically safe, however. Teams must consider duplicate requests, retries, and whether each service can recognize that an operation has already been applied.

Make team autonomy and software boundaries evolve together, not by imitation.

Architecture shapes collaboration. Conway's law describes how a system's structure tends to reflect the communication patterns of the organization that builds it. Teams organized around technical layers often produce systems split by those same layers, so a simple business change requires hand-offs. Domain-oriented teams that own a customer-facing slice can reduce that contention, but microservices alone do not create autonomy.

Change the work, not just the chart. Map how software currently moves from an idea to production. In one investment-bank example, coding to deployment took about six weeks, but the idea waited more than 40 weeks before development began. Fixing the largest delay mattered more than changing the architecture. Build skills and responsibilities incrementally, and do not copy organizational templates simply because another company used them. A modular monolith may provide useful ownership boundaries without distributed-system costs.

Analysis

The book's organizational argument avoids treating software architecture as a purely technical object. Teams need authority, skills, and operational support that match the boundaries assigned to them. Otherwise, a service boundary can become another hand-off instead of a source of independence. The counterpoint is that domain teams can duplicate expertise or make locally sensible choices that conflict globally. Autonomy therefore needs coordination mechanisms, especially for decisions with broad costs or consequences.

Budget for distributed-system operations before small failures become mysteries.

More processes mean more failure paths. Networks add latency and can fail; services can become unavailable, contracts can break, and end-to-end tests can become slow or unreliable. As the service count grows, teams also face deployment, developer-environment, reporting, and ownership problems. A distributed monolith, where services still require coordinated releases, combines many of these costs without gaining independent deployment.

Build visibility early. Centralized log aggregation makes it possible to search activity across machines. Correlation IDs connect logs from a chain of service calls, while distributed tracing helps locate latency and failures across that chain. Synthetic transactions can test a customer journey in production, provided they cannot trigger real-world side effects. Explicit interface contracts and consumer-driven tests help catch breaking changes before release. Add operational tools in response to actual scale and needs, not as a reflexive platform makeover.

Analysis

The shift to microservices moves complexity from one large codebase into interactions among processes, teams, and operational tools. Observability is therefore not decorative infrastructure; it is the means by which the system remains understandable when something goes wrong. Yet instrumentation cannot compensate for poor boundaries or excessive dependencies. A useful discipline is to ask whether each new service adds a capability worth its monitoring, testing, deployment, and support burden.

Keep uncertain product boundaries inside a modular monolith until evidence hardens.

Some systems should stay together. A modular monolith divides one deployable application into well-defined modules, preserving simpler deployment and avoiding many network-related problems. It can support parallel work while the organization learns where durable service boundaries belong. In the book's SnapCI example, an early decomposition produced costly cross-service changes. The team recombined the system, clarified the domain, and split it again after the boundaries became more stable.

Match the choice to the context. Startups are still searching for product-market fit, so their domains may change rapidly. Customer-installed software can also make microservices a poor fit because customers may not have the skills or infrastructure to operate many processes. A modular monolith, or a cautious mix of monolith and services, can preserve options while keeping operational demands manageable.

Analysis

This is a valuable corrective to the idea that decomposition is always progress. A module boundary can capture much of the organizational benefit while keeping deployment and transactions simpler. The main risk is letting the monolith's modules remain boundaries only on a diagram, with unrestricted dependencies and shared data. Modularity requires enforcement and ownership even when everything ships as one process. The right question is not whether a system is fashionable, but whether its boundaries are stable enough to justify distribution.

Analysis

The book's central contribution is to treat migration as a problem of preserving options under uncertainty. Microservices are not presented as a superior end state, but as a trade that buys independent releases and clearer ownership at the price of network failure modes, data coordination, and operational overhead. That framing matters because architectural arguments often blur two different questions: whether a system needs to change, and whether distribution is the right mechanism for changing it.

The migration patterns enact this logic. Proxies, abstractions, parallel runs, and staged data transfer are not merely implementation recipes. They create checkpoints where teams can observe consequences, revise assumptions, and limit the cost of a mistaken boundary. This is closely related to experimental design: a useful change has a hypothesis, a visible outcome, and a way to stop or adjust it. Production is where those hypotheses face conditions that tests cannot fully reproduce.

The most consequential tension is between local autonomy and system-wide coherence. Service ownership can reduce hand-offs, but it can also produce inconsistent tooling, duplicated work, and hidden dependencies. The book's answer is not maximum central control or unbounded freedom. It is to make decisions proportionate to their reversibility: let teams move quickly when correction is cheap, and seek broader agreement when shared contracts, data, or operations create lasting consequences.

This perspective also clarifies why database decomposition is so difficult. Data is not simply stored information. It encodes ownership, rules, and assumptions about what must change atomically. Splitting tables without relocating the logic that governs them creates the appearance of service boundaries while leaving the essential coupling intact. Sagas address some cross-service workflows, but they require explicit business decisions about partial completion and compensation.

The practical lesson is to regard architecture as an evolving agreement among code, data, teams, and operations. A modular monolith can be the better design when domain knowledge is incomplete or operational capacity is limited. A microservice transition succeeds not by maximizing service count, but by steadily making valuable changes easier to release without making the whole system harder to understand.

Summary in 30 Seconds
Microservices can enable independent releases and clearer ownership, but add network failures, operational work, and difficult data coordination. Choose them to address a measurable business need, and map business responsibilities before setting service boundaries. Migrate in reversible stages, redirecting real traffic only when new behavior is ready. Give each service control of its data, and handle cross-service workflows with retries or compensating actions. When boundaries remain uncertain, modularize within one application.
Contains spoilers

Last updated:

Report Issue
Want to read the full book?

Glossary

Independent deployability

Release services separately

The ability to change and deploy one service into production without requiring another service to be changed or deployed at the same time. It depends on stable interfaces and limited coupling, and is a practice rather than merely a theoretical capability.

Bounded Context

Boundary for domain responsibilities

A domain-driven design concept describing an organizational or functional boundary within which a particular model and its responsibilities are defined. It hides internal implementation details from other contexts. A bounded context can contain multiple aggregates and can provide a useful starting point for a service boundary.

Aggregate

Domain entity with a life cycle

A domain concept, such as an order or invoice, whose state and permitted transitions are managed as a cohesive unit. An aggregate should prevent invalid state changes. A service may manage one or more aggregates, while other services request changes through an interface rather than altering the aggregate's data directly.

Event Storming

Collaborative domain modeling

A group exercise for developing a shared model of a business domain. Participants identify important events, group them into aggregates, and group those into bounded contexts. Its purpose is both to produce a model and to create shared understanding among technical and nontechnical stakeholders. It does not require building an event-driven system.

Strangler fig application

Incremental system replacement

A migration pattern in which new functionality is built around an existing system. Requests for replaced functionality are gradually redirected to the new implementation, while other requests continue to use the old system. The staged approach allows production learning and can make rollback easier than replacing the whole system at once.

Branch by abstraction

Replace implementations incrementally

A pattern for changing functionality inside an existing codebase without relying on a long-lived source-control branch. Callers are moved behind an abstraction, a replacement implementation is added alongside the old one, and the active implementation is switched when ready. The unused implementation and any temporary switching logic can then be removed.

Tracer write

Migrate data in stages

A pattern for gradually moving data ownership from an existing system to a new service. During the transition, data may be maintained in both locations, and consumers switch to the new source in stages. Synchronization and reconciliation are necessary because duplicated sources can temporarily disagree.

Saga

Coordinate local transactions

A business process represented as a sequence of shorter transactions, potentially performed by different services. Each step commits locally. If a later step fails, the process can retry or invoke compensating actions to address earlier steps. A saga does not provide the all-or-nothing atomicity of one database transaction.

Consumer-driven contracts

Consumer-defined interface tests

Executable specifications written from the perspective of services that consume another service. They describe the behavior and data those consumers rely on, allowing the provider to test whether changes remain compatible. These contracts can expose accidental interface breakages without requiring every test to exercise the entire system.

Progressive delivery

Control rollout by stages

A family of release techniques that introduces a change to users or production traffic gradually. Canary releases, dark launches, and parallel runs can limit exposure, compare behavior, and provide opportunities to pause or reverse a rollout when performance or correctness is unacceptable.

Download PDF

To save this Monolith to Microservices summary for later, download the free PDF. You can print it out, or read offline at your convenience.
Download PDF
File size: 0.31 MB     Pages: 15

Download EPUB

To read this Monolith to Microservices summary on your e-reader device or app, download the free EPUB. The .epub digital book format is ideal for reading ebooks on phones, tablets, and e-readers.
Download EPUB
File size: 1.40 MB     Pages: 18
Want to read the full book?
Follow
Listen
Home
Swipe
Library
Get App
Try Full Access for 3 Days
Listen, bookmark, and more
Compare Features Free Pro
📖 Read Summaries
Read unlimited summaries. Free users get 3 per month
🎧 Listen to Summaries
Listen to unlimited summaries in 40 languages
—
❤️ Unlimited Bookmarks
Free users are limited to 4
—
📜 Unlimited History
Free users are limited to 4
—
📥 Unlimited Downloads
Free users are limited to 1
—
Risk-Free Timeline
Today: Get Instant Access
Listen to full summaries of 26,000+ books. That's 12,000+ hours of audio!
Day 2: Trial Reminder
We'll send you a notification that your trial is ending soon.
Day 3: Your subscription begins
You'll be charged on Nov 24,
cancel anytime before.
Consume 2.8× More Books
2.8× more books Listening Reading
Our users love us
1M+ readers
Trustpilot Rating
TrustPilot
4.6 Excellent
This site is a total game-changer. I've been flying through book summaries like never before. Highly, highly recommend.
— Dave G
Worth my money and time, and really well made. I've never seen this quality of summaries on other websites. Very helpful!
— Em
Highly recommended!! Fantastic service. Perfect for those that want a little more than a teaser but not all the intricate details of a full audio book.
— Greg M
Save 62%
Yearly
$119.88 $44.99/year/yr
$3.75/mo
Monthly
$9.99/mo
Start a 3-Day Free Trial
3 days free, then $44.99/year. Cancel anytime.
Unlock a world of fiction & nonfiction books
26,000+ books for the price of 2 books
Read any book in 10 minutes
Discover new books like Tinder
Request any book if it's not summarized
Read more books than anyone you know
#1 app for book lovers
Lifelike & immersive summaries
30-day money-back guarantee
Download summaries in EPUBs or PDFs
Cancel anytime in a few clicks

Why one summary?

Scanner
Find a barcode to scan

⭐
⭐
⭐
We have a special gift for you
Open
38% off
DISCOUNT FOR YOU
⭐
⭐
⭐
$79.99
$49.99/year
Only $4.16 per month
Continue
2 taps to start, super easy to cancel
Settings
General
Widget
Loading...