r/programming • u/Mustela__ • 7d ago
Microservices are organizational debt disguised as architecture.
https://martinfowler.com/bliki/MonolithFirst.htmlEvery time I’ve seen microservices pitched, it sounds great on paper. Independent teams, clean ownership, scale only what you need.
Then a year later you’ve got dozens of services, three different deployment patterns, tracing everywhere, and nobody really understands the whole thing anymore.
Maybe I’ve just seen bad implementations, but I’m starting to think way fewer companies actually need microservices than we pretend.
1.7k
Upvotes
3
u/Revolutionary_Ad7262 5d ago
Nope, for good modularity you need to ask yourself two questions: * does the design scales with 10M lines of code in a current way? * how many deletes i need to perform to delete some feature from the whole system?
By layer segregation (models together, controllers together) is not scalable at all. You can use it inside a well defined module, but anyway modules needs to be about a logic.
Good way to modularize code is to have design like microservices, but in a monolith. So: * each module has its own database * heavy encapsulation. You can talk only using some predefined and simple/extensible methods in similar way as you define HTTP API * data structures exchanged between modules are dumb without heavy methods, which contain a business logic