Skip to the content.

x100 acceleration: extracting 10,000+ microservices out of a 100,000-line monolith on SOLID and Functional Core Architecture rails

Thesis

In one PR, I extracted 10,000+ microservices out of a 100,000-line, business-critical, high-complexity monolith. The sub-service is already working in pre-production without bugs. x100 may sound like AI hype, but this post is really about SOLID and Functional Core Architecture in its radical form, on steroids. The sub-service/microservice extraction took just 1 day, but similar transformations of other services, even those with less complexity, took at least a few months (x100 longer).

Instead of slicing the work into tens of PRs that would take months to review, I made one large pull request that would be impossible to review without special “equipment” to guide the reviewer through the code.

The key ingredients that made it possible are:

  1. The new service is a coherent architectural subgraph with the right boundaries and dependency direction.
  2. The source monolith must be SOLID and use clean Functional Core Architecture without compromises.
  3. Microsoft F# was enforcing directed acyclic graph dependencies between modules years before AI became mainstream. Now, it provides stable rails that don’t allow AI to produce AI slop.

Combined with small modules, algebraic data types, interface-driven composition, pure model logic, and isolated side effects, the compiler and project structure make a clean architecture easier to inspect rather than leaving it as an informal diagram.

The article demonstrates how an original graph, an extracted graph, and a fixed-layout comparison equipped reviewers to understand the essence of a 10,000+ line change before reading the detailed diff.

Interactive dependency graphs

Remark: for reasons, I have anonymized all class names but completely preserved the shape of the graph and types of dependencies between its nodes. This will help you understand the key idea without disclosing confidential project details.

Original monolith subservice dependency graph

The original subservice snapshot retains the broad monolith shape before unrelated capabilities are removed.

Open the original Subservice dependency graph in a separate page.

Extracted Subservice dependency graph

The destination view recomputes the layout for the smaller, focused service and shows its final architecture without the removed nodes.

Open the extracted Subservice dependency graph in a separate page.

Fixed-layout extraction comparison

The comparison preserves the original node positions while hiding deleted nodes, making the retained service visible as a literal architectural subgraph.

Open the fixed-layout extraction comparison in a separate page.

1. The review problem

Opening

Key claim

The first review question should be:

Did we extract a coherent service boundary?

Only after answering that question should the review focus on:

2. Extraction is a graph problem

Monolith and Subservice

Why file counts are insufficient

Visual sequence

  1. Show the Monolith graph.
  2. Show the original Subservice graph before reduction.
  3. Show the extracted Subservice graph with an independently computed layout.
  4. Show the fixed-layout comparison where retained nodes stay in their original positions and removed nodes disappear.

The fourth view communicates the core idea most directly: the service was extracted as a subgraph.

3. Why F# helps

Ordered compilation

The project file as an architectural artifact

Important qualification

F# does not automatically create good architecture. A team can still build large modules, hide side effects, or choose poor abstractions. The advantage is that disciplined design becomes structurally visible and compiler-constrained.

4. Clean architecture made visible

Model

Services

Infrastructure

WebApi

Architectural result

These layers are not merely boxes in a slide. They appear as ordered regions in the graph, and cross-layer dependencies can be inspected directly.

5. “SOLID on steroids,” stated carefully

Use the phrase as an attention-grabbing summary, then make a precise claim:

The “steroids” are not language magic. They are the combination of:

6. Equipping the reviewer

Before reading the diff

The reviewer can answer:

While reading the diff

Use the graph as an index:

  1. Start with modified foundational nodes.
  2. Follow their consumers.
  3. Inspect boundary adaptations.
  4. Review composition and hosting last.
  5. Confirm that deletions correspond to intentionally removed graph regions.

After reading the diff

7. What the visualizations prove—and what they do not

They help prove

They do not prove

The graph is a review accelerator, not a replacement for engineering evidence.

8. Publication and anonymization note

9. Conclusion

A 10,000+ line pull request becomes reviewable when its architectural intent is made explicit.

The most important artifact was not another prose description of the refactor. It was a graph that let the reviewer see the claim: the new service is a coherent subgraph extracted from a larger system.

F# compile order supplied the structural truth, clean architecture supplied the boundaries, and visualization supplied the shared language between author and reviewer.

Suggested figures

  1. Monolith overview — full anonymized dependency graph.
  2. Original Subservice — broad pre-reduction graph.
  3. Extracted Subservice — compact destination layout.
  4. Fixed-layout extraction comparison — retained, modified, and removed nodes in original coordinates.
  5. Layer detail — a cropped example showing Model, Services, Infrastructure, and WebApi dependency direction.

Suggested pull quotes

A large service extraction is a graph transformation disguised as a code diff.

The reviewer did not need to infer the architecture from 10,000+ changed lines; the architecture was visible before the first detailed comment.

F# does not guarantee SOLID, but it can make dependency direction impossible to ignore.