Stop Using Microservices. Build Monoliths Instead.

Why most companies would be better off avoiding microservices

GreekDataGuy
Better Programming
Published in
4 min readOct 11, 2021

--

Person shrugging at camera in front of computer
Photo by Robert Nagy from Pexels

Microservices can seem like the perfect solution.

In theory, they increase development speed while allowing you to scale different parts of your app independently.

But in reality, microservices come with hidden costs. That said, I don’t think you can truly appreciate their complexity without building them firsthand.

Here is what I learned building (and sometimes failing) with microservices.

Managing Data Is a Nightmare

Keeping data in-sync across microservices can be challenging.

A database per microservice is the recommended pattern. It allows loose coupling and permits service-specific teams to function independently without slowing down to collaborate on a shared code.

But what happens when one of two microservices that are supposed to fire in sync fails? For instance, one of those microservices updates its database but the other does not.

Situations like this create inconsistencies in data.

From personal experience, investigating data inconsistencies across services can be painful. The cross-service nature…

--

--