The Strangler Fig Migration: From Monolith to 700+ Microservices

Why / The Problem

The DVD-era system was a vertically-scaled monolith on one relational database. A 2008 database corruption halted DVD shipping for several days and exposed the real problem: that one datastore was both a single point of failure and a hard ceiling on scale.

Bigger databases and better backups treat the symptom. The constraint is architectural: capabilities that share a process, a database and a deploy share fate, and can't be scaled or failure-isolated independently however well they're run. The other obvious fix — freeze the monolith, rewrite, cut over once — fails in its own well-known way:

Big-bang rewriteStrangler fig (incremental replacement)
Nothing ships until the whole thing is doneEach piece ships and earns trust on its own timeline
Old and new drift apart while the monolith keeps changingBoth run on the same live traffic, so drift shows up immediately
One massive, high-blast-radius cutoverNo cutover moment — the last piece is a small, low-drama step
A gap found late means redoing large partsA gap shows up on a small slice of one endpoint, cheap to fix
Rollback = revert a whole systemRollback = turn a routing weight back down, in seconds

How It Works

The migration ran roughly 2008 through early 2016: compute moved to AWS, data to horizontally-scalable stores (notably Cassandra), and the monolith was split into independently deployable services.

The strangler fig, one endpoint at a time. Every client request goes through Zuul, which holds a routing weight per endpoint; rollback is turning it back down in seconds. Step 1, shadow: 100 percent of the endpoint's traffic still goes to the monolith, and a copy goes to the new service, diffed and never served. Step 2, canary: 70 percent monolith, 30 percent new service. Step 3, cut over: 100 percent new service, and the old monolith path is deleted. Each new service has its own store; endpoints still in the monolith, such as billing, ratings and search, all share one relational database. Netflix repeated this for years, roughly 2008 to early 2016; the API application was strangled last, and Zuul itself never was.
The strangler fig, one endpoint at a time. Each strangled capability takes its data with it — and because the routing weight lives at the edge, rollback is a dial, not a release.
  1. Rebuild one capability (say, one API endpoint) as a service with its own datastore. Owning the data is what breaks shared fate; a service still reading the monolith's database has only changed how it deploys.
  2. A gateway in front of both shifts traffic over gradually — a small percentage first, or shadow mode: the service gets a copy of real traffic and its responses are compared with the monolith's, but never served.
  3. Once it matches or beats the monolith on production traffic, move the full weight across and delete the old code path — an undeleted path is a second implementation that drifts and eventually gets hit by accident.
  4. Repeat for years. Monolith and services side by side wasn't a transition state; it was the normal operating condition.

Zuul, Netflix's edge gateway, made step 2 practical: every client request passes through it first, so the old-vs-new weight can shift per request without the client knowing. Its filter model (pre-routing, routing, post-routing, error) makes shadowing, canaries and stress tests a matter of adding a filter. Zuul isn't the first hop — global DNS steering and AWS ELB pick which region and Zuul cluster a client reaches, and that outer layer is what the Regional failover part’s failover manipulates.

What was strangled last? People usually say "the front door" — but there are two things at the front, and only one of them was replaced:

Zuul — the doormanapi.netflix.com — the API app
What it doesEvery request hits it first. It looks at the URL and forwards the request to the right cluster — a group of servers all running the same program (e.g. /api/… goes to the API app's servers). That's all.Sits right behind Zuul. Calls many backend services and stitches their answers into one response shaped for your TV or phone.
What happened to itNever replaced — Zuul was the tool doing the replacing. It was only upgraded in place (Zuul 1 → Zuul 2, ~2018, the What aged part).Replaced last — broken into one small backend per device type (a "backend-for-frontend", written in Node.js), and later a single GraphQL layer.

Why last? Every client app talked to the API app, so a mistake there would break Netflix for everyone. So Netflix moved the low-risk pieces first, built up confidence that the method worked, and only then tackled the riskiest one.

North–south has a doorman; east–west has none. Your TV's request crosses the system boundary into Zuul, the doorman, which reads the URL and picks one origin cluster, then is out of the picture. One hop later the api/BFF origin cluster, holding its own copy of the phone book, calls playback, user-profile and viewing-history directly; each of those holds its own cached list too. That is east–west: no doorman at all, the caller picks an instance itself, and one homepage load is roughly 700 such calls. The Eureka registry ships the phone book to every service — Zuul, the BFF and each mid-tier service alike — about every 30 seconds in the background and is never a hop in a call. If Eureka dies nothing stops: callers keep using their last-known-good lists and only new instances go unlearned. A central east–west router would carry roughly 700 times the edge's volume, and all 700 calls would die with it.
North–south has a doorman; east–west has none. Zuul makes one routing decision at the boundary and steps out; the ~700 service-to-service calls behind it go direct, because Eureka only ships the phone book — to every service, Zuul included — in the background.

Why not put a router in the middle too? One homepage load is ~700 service-to-service calls, so it would carry 700× the edge's volume, and every call would fail the moment it hiccupped — the exact single point of failure the decomposition was meant to remove. Eureka avoids this because the registry is not in the request path:

If a central east-west router diedIf Eureka (the phone book) dies
Immediate effectTotal outage — nothing reaches anythingNothing; callers keep using cached lists
What's lostAll east-west trafficOnly learning about new instances
Degradation shapeCliffSlow staleness over minutes

How often the phone book refreshes — and how stale it gets

No service calls Eureka in its own code. The Eureka client library built into every service (Zuul included) does it on a timer:

  1. At startup, the service downloads the full registry once, before it starts taking traffic.
  2. Every 30s after that, it asks only for a delta — the instances added, removed or changed recently — and merges it into its local copy.
  3. As a safety check, each delta carries a hash of the whole registry. If the merged copy doesn't match, the client throws it away and downloads the full registry again.
  4. In the other direction, each instance sends a heartbeat every 30s. If Eureka hears nothing for 90s, that instance is removed.

The staleness adds up because three caches sit in a row, each refreshed every ~30s: the Eureka server's own response cache, the client's local copy, and the server list inside Ribbon (the caller's load balancer).

EventHow long until callers notice
New instance startsUp to ~90s before it gets traffic (three 30s caches)
Instance shuts down cleanlyFast — it tells Eureka "I'm leaving" before it stops
Instance crashesSeveral minutes — 90s to expire, plus the same three caches; callers keep trying it meanwhile

Netflix accepted this on purpose. Every call has a timeout and a retry (the Hystrix part’s Hystrix), so a caller that picks a dead instance fails fast and tries another. Eureka chooses availability over consistency: a slightly stale phone book is fine; a registry that stops answering is not.

In one line: thin at the edge, no middle at all. And the cost of the design: every in-process function call became a network call to a service that deploys and fails on its own. A 500–700+ call fan-out per homepage load follows directly. That single fact is why the Hystrix, Chaos engineering, and EVCache parts have to exist at all.

Who actually does the fan-out — the shape behind the ~700 calls

The usual picture is Zuul → a BFF → hundreds of endpoints → one merged response. The shape is right, but the scale is wrong and a layer is missing, and the Hystrix and One press of Play parts depend on both corrections.

One request, one BFF, a tree of calls. Your TV's request reaches Zuul, which makes one decision — the TV origin cluster — and hands it to the TV BFF, the api origin cluster for that device, which fans out, waits and assembles one payload. Layer 1 is a few dozen direct calls: entitlements and playback authorization are required and fail the request; personalization, viewing history and artwork are optional and degrade to a fallback row. Layer 2 is each of those fanning out again: personalization calls the ranking model and A/B allocation, viewing history reads Cassandra, artwork asks the artwork bandit. About 700 calls is the size of the whole tree, not of this fan-out. Every hop below the BFF is east–west, and there is no router anywhere below Zuul.
One request, one BFF, a tree of calls — no router anywhere below Zuul. The BFF's own fan-out is dozens of calls; the ~700 is the size of the whole tree underneath it, because each of those dozens fans out again — and none of it goes through a router.
The shorthand saysWhat is actually thereWhy it matters
"a BFF"One BFF per device family. Zuul's one decision is which of these origin clusters gets the request.A TV and a phone want different payloads. One shared aggregator either serves the union (slow for all) or grows per-device branches (a monolith again).
"calls hundreds of endpoints"Dozens, directly — personalization, viewing history, artwork, entitlements, metadata and a few more. 700+ is the size of the service estate; no request walks all of it.The Hystrix part’s bulkheads fit "dozens per request": enough for one slow dependency to eat the thread pool, few enough that per-dependency pools are affordable.
"and combines them"The fan-out recurses. Personalization calls ranking and A/B allocation; viewing history reads Cassandra; artwork asks the bandit — all east-west, via cached Eureka lists.~700 is the total of this tree, not any one fan-out — so no single service is "the" bottleneck and there's no one place a router could go.

Assembly is where optional vs. required is decided, per dependency, by the BFF — not by Zuul or the services. A failed personalization call becomes a fallback row and the page still renders; a failed entitlement or playback-authorization call fails the request. The One press of Play part lists which dependencies were made optional and the two that couldn't be.

"Cassandra is multi-master and globally replicated" is shorthand for two separate facts — any replica may accept a write, and each keyspace declares which regions hold a full copy. Together they're why the Regional failover part’s failover needs no database promotion, and their price is last-write-wins conflicts that every service above has to design around. ◆ Side read: what "multi-master, globally replicated" actually means →

The Invariants

  • Guarantees: Production was always a working mix of monolith and services — never a multi-year "in transition" state — and each strangled piece was validated on live traffic before the old path was removed.
  • Does not guarantee: That decomposition alone improves reliability. It trades one failure mode (a shared-fate single point of failure) for another (a fan-out where any of hundreds of dependencies can be down right now). Whether that's a net win depends on the Hystrix, EVCache, and Regional failover parts containing the new one.