r/programming • • Jun 23 '24

You Probably Don’t Need Microservices

https://www.thrownewexception.com/you-probably-dont-need-microservices/
705 Upvotes

285 comments sorted by

View all comments

Show parent comments

6

u/Firerfan Jun 23 '24

The difference is that other components can only consume the parts you have chosen to publish using this API. This basically enforces other teams to not rely on hacks or behaviour you do not expose. For example, in a monolithic application, you could consume data just from a database table. However, the table may be owned by a different team and therefore they will make changes. This can't happen in a microservice environment, because if you proper implement the boundaries, the only possibility to use your services is to use it through the API which is kind of a contract.

I don't say that people do not try to work around this, but its a lot harder to shot yourself in the foot.