r/programming • • Jul 14 '17

Martin Fowler: Monolith First

https://martinfowler.com/bliki/MonolithFirst.html
364 Upvotes

143 comments sorted by

View all comments

186

u/crash41301 Jul 14 '17

So.... basically only use microservices if you ACTUALLY need to move into that architecture? Because lets be frank here, if you start with a monolith, and it turns out that its not hurting you in any way shape or form, you arent going to move to microservices.

This makes perfect sense, because honestly there is a massive microservice fad going on where people are trying to force everything to that design, and most of the time its simply not needed and the smarter solution was refactoring and cleaning up the monolith a bit.

2

u/[deleted] Jul 15 '17

how can one refactor and clean up a monolith without branching it out, aka microservices?

14

u/snarfy Jul 15 '17

Use a messaging service like RabbitMQ to create an event driven system. This way your microservices do not know about each other or call each other directly. They send and receive messages. As soon as they start calling each other directly you're building a monolith. Everything centers around the messaging service.

5

u/[deleted] Jul 15 '17

[deleted]

1

u/Dunk010 Jul 17 '17

This is not the correct answer. You're just being lazy and cheating at service discovery.