Get the advantages of microservices without the drawbacks

1 points by arein3 ↗ HN
People like microservices because they offer potential in the long run, and the most often mentioned advantages are scalability and decoupling parts of your application.

However they come with a lot of drawbacks as well. You have to architect your application and add a ton of features to make microservices work correctly (infrastructure, deployments, tracing, communication between microservices, caching and a few more)

However most of these concerns disappear or become less complex in a monolith architecture.

The middle ground seems to be a monolith architecture with clearly separated interfaces and database. The interface separation can be enforced at compile time (ex. compile each interface implementation separately from the rest of the code). The database can be also split by having multiple databases, but it is easy to have a shared cache, without having to worry about synchronizing databases/cache between microservices. In this way it would be easy to extract an interface in a separate microservice when it's needed later, and it would enable a lot of speed at the start.

Let me know about pros/cons of this approach, or if you have experience with something similar.

It can be called a decoupled monolith architecture.

1 comment

[ 2.7 ms ] story [ 14.8 ms ] thread
You're just describing a modular monolith (with or without a decomposed database). It's not a new concept, and plenty of us use this approach already when it makes sense to.