Back to blog

Why does clean code still let one service take down your platform?

Thắng Đoàn
Thắng Đoàn

You can review every pull request, hit every coding standard, and still watch one slow service stall your whole platform. The problem is usually not the code. It is where you drew the lines.

Boundaries decide how failure travels

Well-written services still fail badly when they share the wrong dependencies. The Forbes author, a staff engineer at Walmart, describes how automation led to outages at the moments when stability mattered most, and how multiple services depending on the same components forced teams to intervene manually. Code quality inside each service could not stop that. The boundary, or lack of one, did.

  • Shared infrastructure is a boundary problem, not a code problem
  • Ask what each service depends on that you do not own

Microservices alone do not decouple you

Splitting a monolith into microservices feels like decoupling, but often is not. TechTarget notes that microservices decouple business domains across bounded contexts, yet remain incapable of breaking the coupling between business logic and middleware concerns. Per TechTarget, adhering to microservices standards will not protect you from middleware coupling if the domain requires complex integrations. You moved the code but kept the hidden dependencies.

  • Middleware coupling survives a microservices migration
  • Complex integrations need explicit boundary design, not just new standards

Good intentions amplify bad boundaries

Reliability mechanisms can make things worse when boundaries are wrong. Forbes explains that mechanisms like retries and backoff strategies can escalate minor slowdowns. Techgenyz lists the countermeasures: timeouts, controlled retries, circuit breakers and idempotency help prevent failures from spreading across services. Those tools only work if you have already decided which failures should stay contained where. Otherwise you are automating the cascade.

  • Retries without boundaries become load amplifiers
  • Circuit breakers encode your boundary decisions

Isolation is a design choice, not a library

Permission and isolation belong in your architecture, not in individual code reviews. Some teams now treat boundaries as the primary security and stability unit. Design-Reuse describes compartmentalisation, where software is divided into small, well-bounded modules and each module can access only the resources it is explicitly permitted to use. The article argues this can be delivered today on any architecture through an embedded runtime, without waiting for hardware support. The lesson generalizes: permission and isolation belong in your architecture, not in individual code reviews.

  • Explicit permission per module beats hoping developers behave
  • You do not need new hardware to start isolating today

What this does not solve

Better boundaries reduce blast radius, but they do not eliminate coordination cost. Techgenyz notes that clear service boundaries and data consistency strategies are needed as systems scale, which implies cross-service consistency remains hard. Forbes also cautions that automation can still amplify failures in ways teams only see in production. Boundaries are necessary, not sufficient. Someone must still design what happens when a boundary is crossed.

Which dependency do all your critical services share that no team explicitly owns?
If your slowest service stalled today, which boundaries would actually stop the spread?

Draw your top five services and mark every dependency you do not own; circle the shared nodes and name an owner for each boundary decision.

Sources

TechTarget: Multi-runtime microservices architecture

Design-Reuse: Compartmentalisation by Microservices

Forbes: Why Microservices Must Learn Before Acting

Share:

Recommended for you

Enjoyed this article?

Subscribe for new articles. No spam. Unsubscribe anytime.

By subscribing you agree to receive the newsletter. No spam, and you can unsubscribe anytime.