Monolith First: When Microservices Are the Wrong Choice

Every new project seems to start with the same question: how do we split this into microservices? Conference talks and blog posts treat a fleet of small services as the mark of a serious engineering team. For a small team shipping its first version, that default is backwards. A monolith first microservices approach starts with one codebase, one database, and one deploy, and only breaks pieces out when a concrete problem forces the split. Microservices solve real problems at real scale. But most teams pay the price of distributed systems long before they get any of the benefits, and by then the team has spent months fighting its own infrastructure instead of shipping the product.

Monolith First Microservices: A Practical Default

Monolith-first does not mean one giant file where everything calls everything else. It means one deployable app built from modules with clear boundaries: orders, inventory, billing, and accounts each in their own module, talking through narrow interfaces. That is the modular monolith architecture pattern, and it gives you most of the discipline people want from microservices without network calls between the parts.

The difference shows up the moment you need to change something. In a modular monolith, moving a field from the orders module to the billing module is a refactor: your editor renames it everywhere, the compiler checks it, and the test suite runs in one go. In a microservices setup, the same change is a small project. You version an API, update the producer and the consumer, coordinate two deploys, and keep the old contract alive until every caller has moved. For a team still figuring out what the product should do, that tax lands on nearly every change, because the domain boundaries are still shifting.

The monolith vs microservices debate often skips this part. People compare a clean microservices diagram with a messy monolith, which is the wrong comparison. A messy monolith is a failure of discipline, not a property of the architecture. Compare a disciplined modular monolith with a real microservices setup, including the pipelines, the monitoring, and the on-call load, and the monolith usually wins for teams under a dozen people.

The Hidden Cost of Splitting Too Early

Each service you add is not just code. It is a deployment pipeline, dashboards, log aggregation, health checks, configuration, secrets, and an owner who gets paged when it fails at 3 a.m. A team of four maintaining ten services has four developers each carrying two or three services plus the glue between them, and the glue is where the bugs live.

Debugging gets harder in ways that are easy to underestimate. A single user action in a monolith is a stack trace you can read top to bottom. Across five services, the same action is five log streams, a trace ID you hope was propagated correctly, and a failure that might be a slow network call or a breaking change deployed ten minutes ago. You need distributed tracing and structured logging just to get back to the visibility a monolith gives you for free.

Data is the sharpest edge. A monolith wraps a multi-table update in one database transaction: either it all lands or none of it does. Split the tables across services and that guarantee disappears. You now design for eventual consistency and write compensation logic for half-finished operations. Some products can live with that. Many cannot, and most do not need to.

Local development slows down too. Running the whole system on a laptop means starting every service, its database, its queue, and its cache, usually through a large compose file that takes minutes to boot and breaks whenever one service changes its setup. New hires spend their first days getting the environment running instead of reading the code. A monolith, by contrast, often runs on one VPS with Docker Compose while Kubernetes waits for the day the scale actually demands it.

When a Monolith Wins Outright

A monolith wins when the team is small, the product is still taking shape, and the domain boundaries are not yet clear. That describes most startups and most internal tools. With three to eight developers, everyone can hold the whole system in their head, review each other’s work across modules, and ship a change end to end in one pull request. There is one deploy to watch, one set of logs to check, and one rollback button.

It also wins when the product needs fast iteration more than independent scaling. Early products change weekly: features get cut, renamed, merged, and rebuilt. A monolith absorbs that churn. Services resist it, because every boundary you drew last month becomes an API contract you must now renegotiate. The cost of a wrong boundary inside a monolith is a refactor. The cost of a wrong boundary between services is a migration. Onboarding is faster too: a new developer clones one repo, runs one test suite, and traces a request through the whole system in an afternoon.

Signs You Actually Need Microservices

So when to use microservices? When a specific pain has a name and a number attached to it. One component needs to scale on its own, like an image-processing worker that spikes at noon while the rest of the app idles. Two teams keep stepping on each other’s deploys and need to release independently. A regulator requires payment data to live in an isolated system. One piece genuinely needs a different stack, like a Python service for a machine-learning model inside a mostly Go system.

Fault isolation is another real reason. If one feature failing must never take the rest of the product down, splitting it out can be worth the overhead. But notice the bar: you are paying for isolation you can measure, not for an architecture diagram that looks modern. And once you do split, the operational questions multiply fast, which is why teams end up reading about whether a service mesh is worth it for a small team only after the services already exist.

The pattern in all of these is the same. The need shows up as a concrete problem: a bottleneck, a conflict, a compliance rule. It does not show up as a feeling that the architecture should be more modern. If you cannot name the problem a split would solve, you do not have a microservices problem yet.

How to Keep a Monolith From Turning Into a Mess

The fear that drives teams toward microservices is usually the fear of the big ball of mud: a codebase where every module imports every other module and no one dares touch anything. That fear is valid, but services are not the only cure. Module boundaries can be enforced inside one repo with code review, import rules, and automated checks that fail the build when a module reaches into another module’s internals. Give each module a public interface, test it on its own, and keep the schema tidy with the same discipline you would apply to database migrations without downtime.

Repository layout matters here as well. Some teams keep the monolith in one repo and are done with it. Others weigh the trade-offs in the monorepo versus polyrepo decision for small teams and pick the layout that matches how they actually work. Either way, the boundary lives in the code and in the review process, not in the network.

Splitting Later, Without a Rewrite

Starting with a monolith does not trap you. The exit path is well understood: build the monolith with module boundaries, and when one module earns its independence, extract it. The strangler fig pattern works here. Route traffic for one feature to the new service, keep the rest on the monolith, and move one piece at a time. Each extraction is a small, reversible step instead of a months-long rewrite.

The usual first candidate is the module with the clearest boundary and the most distinct scaling need: notifications, file processing, reporting, or search. It already has a narrow interface and its own tests, so pulling it out is mostly plumbing. The playbook for doing this carefully is covered in our guide on how to migrate a monolith to microservices without a big rewrite: split one thing, prove it works in production, then decide whether the next split is worth it.

Note what this buys you. You split when you have evidence, and you split the module the evidence points at. That is a much better position than splitting everything on day one based on a guess about which boundaries will matter.

Run through the checklist before your next project. How many developers will own this in the first year? Does any single part need to scale on its own? Are the domain boundaries clear, or will they move? Can you name the problem a split would solve today? If the answers are small team, no, unclear, and not yet, start with a monolith, keep the modules clean, and revisit the question when the evidence changes.

Ditulis oleh

Firdaus Safari Putra

Founder, PT FirKaizen Digital Solutions

Firdaus Safari Putra adalah founder PT FirKaizen Digital Solutions. Ia membangun dan mengoperasikan infrastruktur server di balik panduan ini, dan menulis berdasarkan apa yang benar-benar ia jalankan, uji, dan ukur — bukan teori.