Grokking Microservices Design Patterns
Vote

0% completed

The Problem: Legacy Systems

What Makes Them Hard to Work On

Why Replacing Them Is Hard

How the Strangler Fig Pattern Helps

A legacy system is old software that an organization still depends on. It was written years ago, often on technology that is no longer common, and it still does work the business needs. That combination is what makes it hard to remove.

What Makes Them Hard to Work On

  1. Technical debt: years of patches and quick fixes leave code that is hard to change safely.
  2. Old technology: the language or framework may no longer be common, so engineers and vendor support are hard to find.
  3. Poor integration: modern tools may not connect to it, so its data stays isolated from everything else.
  4. Limited scale: it was built for the load of its time, and often cannot spread across more machines when demand grows.
  5. Expensive upkeep: each change takes longer than it should, and few people are able to make it.
  6. Security gaps: it was written before current security practices, and may no longer receive patches.

Why Replacing Them Is Hard

  1. It runs critical work: an outage stops the business, not just one feature.
  2. Data migration is risky: moving data into a different model can lose or corrupt it.
  3. People have to relearn: staff know the old system, and a new one needs training.
  4. It costs a lot: matching what the old system already does reliably is expensive.
  5. Nobody knows all of it: there are undocumented behaviors that users have come to depend on.

The last point is what ends most rewrites. A team estimates the work from the documentation, then finds behavior that exists only in the code.

Three ways to deal with a legacy system. A full rewrite has to match every feature of the old system before it can ship anything, and leaving it alone lets the cost keep growing. The strangler fig pattern moves one function at a time.
Three ways to deal with a legacy system. A full rewrite has to match every feature of the old system before it can ship anything, and leaving it alone lets the cost keep growing. The strangler fig pattern moves one function at a time.

How the Strangler Fig Pattern Helps

The pattern turns one large replacement into many small ones.

  1. Incremental replacement: one piece moves at a time, so each move is small enough to check.
  2. Both systems run: the old system keeps serving what has not moved, so there is no outage.
  3. Early feedback: real users reach the new system while it is still cheap to change.
  4. Easy reversal: a piece that misbehaves is routed back to the old system.
  5. Room to change direction: what you learn from the first pieces changes how you build the rest.
  6. A clear end: when no traffic reaches the old system, it can be switched off.

None of this removes the work of understanding the old system. It removes the need to understand all of it before you start.

The next lesson describes how the pattern works.

Reading Progress

0%


Vote for new content

On This Page

What Makes Them Hard to Work On

Why Replacing Them Is Hard

How the Strangler Fig Pattern Helps