---
topic: architecture
author: Crashtech Editorial
published: Nov 17, 2026 · read: 3 min
---

Top Anti-Patterns to Avoid in Service Architecture: The Distributed Monolith

How reasonable architectural splits create a distributed monolith: analyze shared databases, distributed transactions, chatty RPCs, and cascading deploys.

– –

When engineering organizations embark on microservice migrations, they set out to achieve independent deployments, decoupled team velocity, and localized horizontal scaling.

Yet two years into the migration, an uncomfortable reality frequently emerges: The new architecture is significantly slower, vastly more expensive to operate, harder to debug, and less reliable than the original monolith it replaced.

This failure does not happen through malice or incompetence. It happens through a sequence of individually reasonable choices: an independent repository here, a shared database table there, an synchronous gRPC call between two domains. Gradually, the team constructs the worst architectural trap in software engineering: The Distributed Monolith.

Defining a Real Microservice vs a Distributed Monolith

Before examining the anti-patterns, we must state what a microservice actually is:

A true microservice:
1. Is independently deployable without coordinating with sibling services.
2. Completely owns its private datastore (no cross-service database access).
3. Communicates over network interfaces with explicit fault-tolerance boundaries.

If changing Service A requires deploying Service B simultaneously, you do not have microservices. You have a monolith whose internal function calls were replaced with slow, fragile network RPCs.

+-----------------------------------------------------------------------+
|  In-Memory Function Call (Monolith):                                  |
|  - Latency: ~5 nanoseconds                                            |
|  - Failure Mode: Deterministic (Call succeeds or process panics)      |
+-----------------------------------------------------------------------+
|  Network RPC (Distributed Architecture):                              |
|  - Latency: 5 to 50 milliseconds (1,000,000x slower!)                 |
|  - Failure Mode: Non-deterministic (Timeouts, partial writes, drops)  |
+-----------------------------------------------------------------------+

The Four Deadly Service Anti-Patterns

+-----------------------------------------------------------------------+
|                    Top Service Anti-Pattern Matrix                    |
+----------------------+--------------------+---------------------------+
| Anti-Pattern         | Core Mechanism     | Manifestation             |
+----------------------+--------------------+---------------------------+
| Shared Database      | Direct DB Sharing  | Schema migration lockouts |
| Chatty Microservices | Fine-Grained RPCs  | Compounding 500ms latency |
| Distributed 2PC      | Synchronous Locks  | Cluster-wide deadlocks    |
| Lockstep Deployment  | Shared Dependencies| Tightly coupled releases  |
+----------------------+--------------------+---------------------------+

1. The Shared Database (Database as Integration Bus)

Service A (Billing) and Service B (Users) run in separate Kubernetes pods, but both connect directly to the same shared PostgreSQL database instance, reading and writing to the users table:

[ Billing Service Pod ] ----                             +---> [ Shared PostgreSQL Database: `users` table ]
[ Order Service Pod ]   ----/

Why it fails: The database becomes a covert coupling point. When the Billing team adds a column or alters a table constraint, the Order service crashes in production. The independence of microservices is completely destroyed.

The Fix: Enforce database-per-service. If the Billing service needs user metadata, it must query the User service’s public API or subscribe to asynchronous change events.

2. Chatty Microservices (The N+1 Network Cascade)

In an effort to keep services “micro,” developers create hyper-fine-grained services: CustomerNameService, CustomerAddressService, CustomerPreferenceService.

To render a single user profile page, the API gateway executes 20 sequential RPCs across internal networks:

Gateway -> Call Address (15ms) -> Call Preferences (20ms) -> Call Tier (18ms)...
Total Latency = 350ms spent purely on network transit overhead!

The Fix: Scope services around Domain-Driven Design (DDD) Bounded Contexts, not individual database entities. A single cohesive AccountService handles name, address, and tier in-memory.

3. Distributed Synchronous Transactions (Two-Phase Commit)

To process a purchase, Service A synchronously locks a row in the Inventory DB, then calls Service B to charge the credit card, then calls Service C to write an audit log:

Service A ---> [ Lock Inventory DB ]
      |
      +---> POST Service B (Stripe) ... (Stripe times out after 10s!)
      |
Inventory DB row remains locked -> 5,000 subsequent checkouts block -> Platform collapse

The Fix: Eliminate distributed two-phase commits. Adopt Eventual Consistency and the Saga Pattern. Service A reserves inventory, publishes an OrderCreated event to Kafka, and if the payment fails asynchronously, executes a compensating transaction to unreserve inventory.

4. Lockstep Deployment Dependencies

When deploying version 2.4 of the Order service requires simultaneously deploying version 1.8 of the Catalog service and version 3.1 of the Inventory service:

Release Notice: "Deploy Service A first, wait 2 minutes, deploy Service B, then run DB script"

If release sequencing is required, the services are not independent. You have all the operational coordination drag of a monolith with none of its compile-time type-safety.

The Fix: Strictly enforce backwards-compatible API versioning. New service versions must support existing API contracts for at least one deprecation cycle.

Key Engineering Takeaways

  • A monolith is better than a distributed monolith: Never break up a monolith simply for architectural fashion. Only split services when organizational teams or scaling profiles genuinely require it.
  • Enforce private databases: A service that shares a database table with another service is not a microservice.
  • Embrace asynchronous events over synchronous RPC cascades: Use message brokers (Kafka, RabbitMQ) and Sagas to decouple services and eliminate cascading network timeouts.
Advertisement

/* Comments */