Why microservices are bad

Microservice architecture is not always bad. But in most cases it is.

Why?

Most people do not see the difference between decomposition and network distribution. They usually do a good decomposition and then mistakenly convert it to the network distribution.

Why is it a problem?

Because the network call is difficult:

  1. The network call is slow and unreliable. Really. If you want to decrease your self-confidence, visit my project Spoiler Proxy.
  2. With a network call you loose consistency. It is very hard to implement a distributed transaction. And in the end, you will have to choose between consistency and availability anyway. You cannot have both. See CAP theorem.

If you are not extremely careful, your backend will be inconsistent, slow and sensitive to any component failure. Future refactors will be almost impossible. If the project assignment changes, you will have to rewrite everything from scratch.

But, is it possible to write a scalable distributed backend?

Yes of course. It is not so hard.

Leave a Reply