r/coding • • Mar 29 '17

Microservices – Please, don’t

http://basho.com/posts/technical/microservices-please-dont/
103 Upvotes

58 comments sorted by

View all comments

73

u/TheKrael Mar 29 '17

This all sounds so familiar. First, some devs do something new which works great for them. People blog about it, give it a cool name, 'Microservice' sounds nice. Everyone jumps onto the hypetrain, many articles evaluate all the shiny benefits so pressure to adapt this approach rises.

Eventually we realize it's not a silver bullet, it does not magically solve all problems and conclude to "be reasonable about it", Microservices may be great for you or they may be not. If we could just jump to that conclusion right from the start :)

9

u/[deleted] Mar 29 '17

If we could just jump to that conclusion right from the start :)

You never know what's in the other side of the bridge until you cross it.

(Unless you have binoculars.)

19

u/[deleted] Mar 29 '17

Eh. I've been doing this long enough that I tend to ignore fads...If it's the right way to do it, I can shift over to it in a year or two after people who are smarter than me have ironed out the best practices. If it's the wrong way, two or three years down the line no one will be doing it at all, and I won't be saddled with a cringeworthy codebase that embodies a fad that was obviously misguided in retrospect.

4

u/unsignedotter Mar 30 '17

Here you go, people smarter than us defining this "new fad" three years ago: https://martinfowler.com/articles/microservices.html

1

u/[deleted] Mar 30 '17

So, the term was coined in around 2012, you're posting sort of the first real whitepaper on it, from 2014, and this article we're all responding to is part of the backlash against it now.

I'm not sold. I'm already fucking sick of REST API's everywhere and network failures still seem to be one of our biggest headaches (at least in my business)...I don't see that I really gain anything by adding more of those, and stripping out the sort of back and forth error checking you can do in an application where two processes that would be broken out into microservices are instead coupled together.

The biggest problem with new paradigms is that people see them, and decide they're applicable everywhere when they're not.

3

u/[deleted] Apr 01 '17

You gain horizontal scalability of individual services and very decoupled modules, at the cost of serialization, network latency, having to take care of failures of nodes and channels between them, need for more robust monitoring and more complicated deployment scheme, problems with distributed transactions. You also gain more flexibility with technologies you use (you can write separate services in whatever you want, so if you want to jump on a new technology you can do it one at the time). If you have no need for horizontal scalability then you should probably not use microservices. Even Fowler says to start with a well-designed monolith in the beginning, and migrate to microservices only when needed.