惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

H
Help Net Security
T
ThreatConnect
SecWiki News
SecWiki News
F
Future of Privacy Forum
AWS News Blog
AWS News Blog
C
Cisco Blogs
A
Arctic Wolf
Vercel News
Vercel News
The GitHub Blog
The GitHub Blog
Scott Helme
Scott Helme
V
V2EX
博客园 - 叶小钗
阮一峰的网络日志
阮一峰的网络日志
K
Kaspersky official blog
G
Google Developers Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
P
Privacy International News Feed
C
Cyber Attacks, Cyber Crime and Cyber Security
N
News | PayPal Newsroom
Schneier on Security
Schneier on Security
NISL@THU
NISL@THU
Microsoft Azure Blog
Microsoft Azure Blog
量子位
The Hacker News
The Hacker News
Stack Overflow Blog
Stack Overflow Blog
Security Latest
Security Latest
M
Microsoft Research Blog - Microsoft Research
Google Online Security Blog
Google Online Security Blog
博客园_首页
C
CXSECURITY Database RSS Feed - CXSecurity.com
I
InfoQ
Google DeepMind News
Google DeepMind News
Y
Y Combinator Blog
The Cloudflare Blog
Microsoft Security Blog
Microsoft Security Blog
Martin Fowler
Martin Fowler
Cisco Talos Blog
Cisco Talos Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Troy Hunt's Blog
F
Fox-IT International blog
S
Security @ Cisco Blogs
博客园 - 司徒正美
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
C
Comments on: Blog
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
L
LINUX DO - 最新话题
GbyAI
GbyAI
Project Zero
Project Zero
腾讯CDC
T
Tailwind CSS Blog

DEV Community

The Machine Learning Engineering Series I compared every MCP server monetization platform — only one needs zero signup What is DevRel? (And Why You Might Already Be One) Enterprise AI Without an Enterprise Budget Master RAG Systems: Build an End-to-End LangChain Pipeline with Milvus, Reranking & Azure OpenAI 🚀 Turning You Into a Power User: Hybrid Memory, SSH Cloak, and Password Vaulting With VEKTOR Fixing the session timeouts Beyond Autonomous AI: Understanding Self-Healing Agents in Enterprise AI Systems MCP Is the AI Platform Camera2 API: Handling Orientation, Focus, and Exposure in Background — How to Keep Your Android Camera Running With the Screen Off I built a free Bitly/TinyURL alternative and self-hosted it on a $6/mo VPS — here's the full stack Design to Code #7: How CVA Scaffolding Turned Into Dead Code Stop rebuilding memory and orchestration for every AI agent you build 6 users in one day with zero marketing budget — what actually worked How a photo-blind dating engine actually ranks people (the TypeScript) AI Is Moving From Your Pocket to Your Brain — The 6-Year Timeline I Built a Static Blog Generator in 350 Lines of Python — No Dependencies, No Config, No Nonsense How Does Duolingo Monetize? I Decompiled the Android App (v6.79.5) Next.js Dynamic OG Images: Fix the Turbopack CPU Hang AI Is Turning Every Developer Into an Architect What is props 3 Things Building MediTrack Taught Me About Laravel Vibe Coding: My Daily Workflow with Claude Code Using Python to Do the Wonders: How Flet Changes the Game for Developers OpenDev: From Zero Clients to Linux Independence – How I'm Building a One-Man Linux Revolution Migrating from Jest to Vitest 4: A Complete 2026 Guide Making Equation (2.2) of the OpenAI Erdős Result Executable HTTP request headers: canonical reference Prefix caching in vLLM under multi-tenant agent traffic Introducing Oracle Support in Dory How I built 3 products solo as a CA student using AI — no coding background What is AEO? How to Get ChatGPT, Perplexity & AI Search Engines to Cite Your Website — 2026 Guide HTTP rate-control headers: canonical reference Im attending Manifest 2026! AI Music Doesn’t Need Better Prompts — It Needs Better Systems ORA-00215 오류 원인과 해결 방법 완벽 가이드 Stop Making Your AI Chatbot Slower: Streaming Responses with Spring AI and Server-Sent Events Annotations in Spring Boot What is the Model Context Protocol (MCP)? Gemini CLI Skills: Teaching Your Terminal Agent How to Think 🧠 What the Heck is an API? FairLens AI: An Intelligent Dashboard for Automated Bias Auditing RAG vs Fine-Tuning- Choosing Right Strategy for Modern AI Applications AI Metrics Decoded: From Parameters to TOPS I made git merge finish itself — in VS Code, in my terminal, and in CI You just can’t miss this… Redis Essentials: Architecture, Caching, and Setup Docker with AI: A Practical Guide to Running LLMs, Agents and MCP Design to Code #5: Using AI to Build a Design System Analyzing 1,000 Engineering Problems Through GitHub Data Open Graph protocol: canonical reference How a 400-Engineer SaaS Company Cut PR-to-Production from 4.2 Days to 6.4 Hours with Claude Code Multi-Agent DevOps 💬 Embedded AI Chatbots vs Popup Bubbles — Which One Creates Better Engagement? Bajándole todos los minutos posibles al CI del backend con mas de 1000 tests Harness Engineering: Stop Re-Prompting Your Coding Agent Every Session HTML meta referrer: canonical reference AWS MCP Server Just Gave AI Agents Your Cloud Keys — Here's Why That Should Worry You Announcing the Trust Identity Protocol (TIP): HTTPS for the AI Era We built the feature in two days. Making it reliable took two weeks. LuisCore /for-agents.json — agent bootstrap — daily syndication · 2026-05-26 A Curious Journey Into Reverse Engineering an AI-Generated Python .exe Part 2: Enterprise Decision Intelligence Architecture: AI Governance, Threshold Policy Engines, and Operational AI Systems I will continue using Devise with Rails 8! The Developer's Guide to Picking the Right AI Code Model in 2026 (I Spent $500 So You Don’t Have To) 30 Kubernetes Tasks Every CKA Candidate Should Practice Before Exam Day Why Some Websites Feel Instantly Better to Use Advanced React Patterns I Wish I Knew 5 Years Ago ¿Cómo optimizar algoritmos en arreglos y listas con la técnica de dos punteros? I scanned 8 popular open source repos with one command. Here's what I found. mcp-probe v1.6.0: Stricter GitHub Actions checks for MCP CI gates How we connect two strangers' webcams fast (and keep the TURN bill small) LLM Agents Are Now Finding Zero-Days: How AI is Autonomously Rewriting the Rules of Vulnerability Research Minimal Code Doesn’t Mean Stable Code How I manage 40+ skills across Claude Code, Codex, and .agents folders Hardening Stealth Browser Fingerprint Integrity and State Persistence Quick Tip: Benchmarking Multimodal APIs in Under 10 Minutes How I Slashed My AI API Bill by 92% in 2026 — A Cost Optimizer's Speed Benchmark Guide How I Slashed My AI API Bill by 95% — A Practical Guide for 2026 A Go outbox library that runs inside your own DB transaction How I Built a Credit Optimizer That Saves 30-75% on AI Agent Costs (Open Architecture) The Missing POP: How I Ported a Yul Contract to Huff by Reading Every Opcode The Moment the Config Parser Became the Bottleneck Churn Tool Stack by Revenue Stage ($5K to $50K+) What I Learned Exploring AI-Generated 3D: A Hands-On Tour of Meshy, Tripo, and Three.js Day 15 - Software Composition Analysis(SCA) Contributing Upstream Instead of Forking: My grape-swagger-rails Story Behind The Badge: How We Built 2,000 Hackable Badges For Temporal Replay Access Control Doesn't Scale Linearly -- Part 3 33x faster than Rust: Why I stopped waiting for my compiler and built my own. I Built My First Production AWS Project as a Career Changer Why Detecting PII Matters More Than Ever JSON Schema in 10 Minutes — Validation, Types & Real Examples Python Tasks How I Started My Cybersecurity Journey as an SQA Engineer 🔐 Why "fancy fonts" in Discord and Instagram bios turn into boxes ☁️ GKE private cluster setup — common mistakes and how to avoid them I Thought a Username Didn’t Matter… Until I Saw How Much People Care About It Claude for Small Business: 382K Day-One Buyer's Guide I Built a Diagnostic Toolkit for PyTorch Because I Was Tired of Guessing Why Models Fail How I Built an AI-Powered Incident RCA Platform with LangGraph and RAG
You Don’t Need Microservices (Yet): A Reality Check for Devs
Gavin Cettol · 2026-05-26 · via DEV Community

You Don't Need Microservices (Yet): A Reality Check for Devs

How Premature Architecture Decisions Slow Down Teams and Burn Engineering Budget

Every few months, I see the same conversation play out in engineering teams.

A new project kicks off. The team is excited. Someone opens the architecture discussion and says: "We should probably do microservices".

Nobody disagrees. Microservices are what serious companies do. Netflix does it. Amazon does it. Surely we should too.

Six months later, the team is spending more time debugging distributed systems, writing boilerplate for inter-service communication, and managing deployment pipelines than they are building features. Velocity is down. Morale is shaky. The MVP is late.

The architecture is impressive. The product is not shipped.

This article isn't anti-microservices. Microservices are the right answer, for some teams, at some stage, solving some problems. The goal here is to give you an honest framework for knowing whether you're at that stage, and what to do if you're not.


TL;DR

  • Microservices solve real problems, but only problems that come with scale. If you don't have those problems yet, you're paying the cost without getting the benefit.
  • A well-structured monolith is not a compromise. It's often the fastest, most maintainable architecture for teams under a certain size and complexity threshold.
  • There are concrete signals that tell you when it's time to split. Before those signals appear, premature decomposition is one of the most expensive architectural mistakes a team can make.

Table of Contents


What Microservices Actually Solve

Before deciding whether you need microservices, it's worth being precise about what problem they were invented to solve.

Microservices emerged as an answer to a very specific set of pressures that appear at scale:

Independent deployability. When hundreds of developers are working on the same codebase, deploying a change to the checkout flow shouldn't require coordinating with the team working on the recommendation engine. Microservices let teams deploy independently.

Fault isolation. In a monolith, an unhandled exception in one part of the system can take down the entire application. In a microservices architecture, a failure in the notifications service doesn't affect the payment service.

Independent scalability. If your image processing service needs ten times the compute of your user auth service, a microservices architecture lets you scale them independently. In a monolith, you scale everything or nothing.

Technology heterogeneity. Different services can use different languages, runtimes, or databases if the problem demands it.

These are genuine, valuable properties.

The question is: do you have the problems these properties solve?

If you have five developers, one product, and a user base that hasn't hit its first scaling wall, the answer is almost certainly no.


What a Well-Structured Monolith Looks Like

"Monolith" has become a dirty word in engineering culture. It shouldn't be.

The alternative to microservices isn't a chaotic mess of spaghetti code. It's a modular monolith: a single deployable unit, internally organized around clearly separated domains.

Here's what that looks like for a simple e-commerce application:

src/
├── modules/
│   ├── orders/
│   │   ├── orders.controller.ts
│   │   ├── orders.service.ts
│   │   ├── orders.repository.ts
│   │   └── orders.types.ts
│   │
│   ├── products/
│   │   ├── products.controller.ts
│   │   ├── products.service.ts
│   │   ├── products.repository.ts
│   │   └── products.types.ts
│   │
│   ├── users/
│   │   ├── users.controller.ts
│   │   ├── users.service.ts
│   │   ├── users.repository.ts
│   │   └── users.types.ts
│   │
│   └── payments/
│       ├── payments.controller.ts
│       ├── payments.service.ts
│       ├── payments.repository.ts
│       └── payments.types.ts
│
├── shared/
│   ├── database/
│   ├── middleware/
│   └── utils/
│
└── app.ts

Enter fullscreen mode Exit fullscreen mode

Each module owns its domain. The orders module doesn't reach into the products database directly, it calls productService through a defined interface. The boundaries are logical, not physical.

// src/modules/orders/orders.service.ts

import { productService } from '@/modules/products/products.service'
import { paymentService } from '@/modules/payments/payments.service'
import { Order, CreateOrderPayload } from './orders.types'
import { ordersRepository } from './orders.repository'

export const ordersService = {
  async create(payload: CreateOrderPayload): Promise<Order> {
    // Validate product exists and has stock
    const product = await productService.getById(payload.productId)

    if (product.stock < payload.quantity) {
      throw new Error('Insufficient stock')
    }

    // Process payment
    const payment = await paymentService.charge({
      amount: product.price * payload.quantity,
      currency: 'EUR',
      customerId: payload.customerId,
    })

    // Create the order
    const order = await ordersRepository.create({
      ...payload,
      paymentId: payment.id,
      status: 'confirmed',
    })

    // Decrement stock
    await productService.decrementStock(payload.productId, payload.quantity)

    return order
  },
}

Enter fullscreen mode Exit fullscreen mode

This is a direct function call. It's fast, it's simple, it's easy to trace in a debugger, and it's testable by mocking productService and paymentService.

No HTTP overhead. No serialization. No network failures to handle. No service discovery.

The same logic, across a microservices boundary, looks very different.


The Real Cost of Premature Decomposition

Before we look at the microservices version, let's be explicit about what you're taking on when you split prematurely.

Distributed systems complexity. Once your services communicate over a network, you have an entirely new class of problems: latency, partial failures, network timeouts, retry logic, idempotency. These aren't theoretical, they show up constantly in production, and they're significantly harder to debug than in-process errors.

Operational overhead. Each service needs its own CI/CD pipeline, its own deployment configuration, its own monitoring and alerting setup. For a two-person team, this is not a few hours of work, it's weeks, and it never really ends.

Development friction. Running the entire application locally now means running five (or fifteen) services simultaneously. Developer experience degrades. Onboarding new teammates takes longer.

Data consistency challenges. In a monolith, a database transaction either succeeds or fails atomically. Across services, you have to implement distributed transactions or accept eventual consistency, both of which add significant complexity to every operation that touches multiple domains.

The "wrong seams" problem. Domain boundaries that seem obvious on day one are often wrong by month six. In a monolith, reorganizing a module is a refactoring task. In a microservices architecture, it's a cross-service migration, which means coordination between teams, versioned APIs, and backward compatibility concerns.

Martin Fowler, one of the most authoritative voices on this topic, coined the term "distributed monolith" for what often happens when teams split prematurely: you get all the operational complexity of microservices, with none of the benefits, because the services are still tightly coupled through synchronous calls and shared data.


Monolith vs Microservices: A Concrete Comparison

Let's make this tangible. Same feature, creating an order in our e-commerce app, implemented both ways.

In the modular monolith

We already saw this above. The ordersService calls productService and paymentService directly. The entire operation is one function call, one database transaction, and one stack trace if something goes wrong.

// Creating an order, one direct call
const order = await ordersService.create({
  productId: 'prod-123',
  quantity: 2,
  customerId: 'user-456',
})

Enter fullscreen mode Exit fullscreen mode

If this fails, the error propagates synchronously. The stack trace tells you exactly where it failed. The database transaction ensures nothing is partially committed.

In a microservices architecture

The same operation now crosses three network boundaries:

// src/services/orders-service/src/orders.service.ts

import { ApiError } from '@/lib/errors'

export const ordersService = {
  async create(payload: CreateOrderPayload): Promise<Order> {
    // HTTP call to products-service
    const productRes = await fetch(
      `${PRODUCTS_SERVICE_URL}/products/${payload.productId}`
    )
    if (!productRes.ok) throw new ApiError(productRes.status, 'Product fetch failed')
    const product = await productRes.json()

    if (product.stock < payload.quantity) {
      throw new Error('Insufficient stock')
    }

    // HTTP call to payments-service
    const paymentRes = await fetch(`${PAYMENTS_SERVICE_URL}/payments`, {
      method: 'POST',
      headers: { 'Content-Type': 'application/json' },
      body: JSON.stringify({
        amount: product.price * payload.quantity,
        currency: 'EUR',
        customerId: payload.customerId,
      }),
    })
    if (!paymentRes.ok) throw new ApiError(paymentRes.status, 'Payment failed')
    const payment = await paymentRes.json()

    // Create the order locally
    const order = await ordersRepository.create({
      ...payload,
      paymentId: payment.id,
      status: 'confirmed',
    })

    // HTTP call back to products-service to update stock
    const stockRes = await fetch(
      `${PRODUCTS_SERVICE_URL}/products/${payload.productId}/stock`,
      {
        method: 'PATCH',
        headers: { 'Content-Type': 'application/json' },
        body: JSON.stringify({ decrement: payload.quantity }),
      }
    )
    if (!stockRes.ok) throw new ApiError(stockRes.status, 'Stock update failed')

    return order
  },
}

Enter fullscreen mode Exit fullscreen mode

Now ask yourself what happens if the payment succeeds but the stock update call fails.

The payment has been charged. The order has been created. But the stock hasn't been decremented. You now have an inconsistency in your data, and no database transaction to roll it back for you.

Solving this correctly requires implementing a saga pattern or distributed transaction, which is a substantial engineering investment, and a source of bugs that are notoriously difficult to reproduce and fix.

This is the complexity you're signing up for when you split before you need to.


Rules of Thumb: When to Actually Consider Splitting

There are real signals that indicate a team is approaching the point where microservices start making sense. Here are the ones that consistently hold up in practice.

The Conway's Law signal.
Your team is growing, and different groups of developers are consistently working on different parts of the system with little overlap. Conway's Law tells us that system architecture tends to mirror team communication structure, so if your team has naturally split into a "payments team" and a "catalog team", the architecture probably should too, eventually.

Rule of thumb: consider splitting when you have two or more teams that consistently own distinct domains and need to deploy independently.

The scaling bottleneck signal.
A specific part of your system needs to scale independently from the rest, and that difference is significant enough to justify the operational overhead. Your image processing pipeline needs fifty instances; your user auth service needs two.

Rule of thumb: consider splitting when you've identified a specific performance bottleneck that can't be solved by vertical scaling or database optimization.

The deployment coupling signal.
Deploying a change to one domain consistently requires coordinating with other teams or causes unrelated failures. The deploy process has become a source of organizational friction, not just technical friction.

Rule of thumb: consider splitting when deployment coupling is measurably slowing down multiple teams on a recurring basis, not as a one-off event.

The failure isolation signal.
A non-critical part of your system (notifications, recommendations, reporting) is causing outages in critical paths (checkout, auth). The blast radius of failures is unacceptably large.

Rule of thumb: consider splitting when a failure in a low-priority domain is regularly impacting high-priority ones, and the fix isn't a code change but an architecture change.

The team size signal.
A widely cited heuristic, often attributed to Werner Vogels at Amazon, is the two-pizza rule: if you can't feed the team working on a service with two pizzas, the service is too big. The inverse is also true: if your entire engineering org fits at one table, microservices are probably not your problem yet.

Rule of thumb: teams under ~8–10 engineers rarely have the operational capacity to manage a microservices architecture well. The overhead consumes the productivity gains.


The Decision Framework

Before making any architectural decision toward microservices, run through these questions honestly:

1. What specific problem are you solving?

Write it down in one sentence. If the answer is "we want to be like Netflix" or "microservices are best practice", that's not a problem, it's a preference. Come back when you have a concrete problem.

2. Have you felt the pain of the alternative?

The best time to split a monolith is when it's actively hurting you. Slow deploys, scaling bottlenecks, team coupling, these are real pain. Splitting to avoid hypothetical future pain usually creates real present pain.

3. Do you have the operational maturity?

Microservices require investment in infrastructure: container orchestration (Kubernetes), service discovery, distributed tracing, centralized logging, health checks, circuit breakers. If your team doesn't have experience running these, plan for months of setup before you see the first benefit.

4. Are your domain boundaries stable?

If you're still figuring out what your product is, your domain model is still changing. Splitting along boundaries that will shift in three months is worse than not splitting at all.

5. Can you start with a modular monolith first?

A modular monolith with clean internal boundaries is a microservices architecture waiting to be extracted. If you've built the modules correctly, the split is a deployment change, not a rewrite. Start there.

Signal Not ready Ready
Team size < 8 engineers Multiple teams, distinct domains
Deployment pain Occasional friction Consistent blocker across teams
Scaling needs Not yet hit limits Specific bottleneck identified
Operational maturity No container orchestration k8s/ECS, tracing, logging in place
Domain stability Product still pivoting Stable, well-understood boundaries

When Microservices Are the Right Call

To be completely clear: there are scenarios where microservices are the right architecture from early on.

When compliance requires hard data isolation. If regulations require that payment data is physically isolated from user data with separate access controls and audit logs, separate services may be a compliance requirement, not an architectural preference.

When parts of the system have radically different SLAs. If your real-time trading engine needs 99.999% uptime and your reporting dashboard can tolerate downtime, running them in the same process is a liability.

When you're integrating genuinely independent third-party systems. An event-driven architecture where a service wraps a third-party provider (a payment gateway, a shipping API) and exposes a clean internal interface is a legitimate use of service decomposition from day one.

When you're building a platform with external integrations. If your architecture will expose APIs to external developers and those APIs need to evolve independently, service boundaries help.

The pattern in all of these is the same: there's a concrete, specific constraint that the architecture is responding to. Not a preference. Not a pattern borrowed from a company with different problems at a different scale.


Final Thoughts

Architecture decisions have a compounding effect on team velocity, in both directions.

The right architecture at the right time makes everything else faster: onboarding, debugging, deploying, iterating. The wrong architecture at the wrong time turns every feature into an infrastructure problem.

Microservices are powerful. They're also expensive. The teams that get the most out of them are the ones who waited until they had the problems microservices solve, and who built clean internal boundaries in their monolith in the meantime.

If you're in the early stages of a product, the most valuable architectural investment you can make is usually not splitting your system apart. It's understanding your domain well enough that, when the time comes to split, you know exactly where to cut.

Start simple. Feel the pain. Split deliberately.


Where is your team on this spectrum right now?

Are you running a monolith that's starting to show its limits, or did you go microservices early and live to regret it, or not? Drop your experience in the comments. The architecture conversations in the comments section are always the most useful part of these articles.

If this was useful, a ❤️ or a 🦄 helps it reach more developers who are about to make this decision.
And if you want the next article in the series when it drops, hit follow.