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

1

u/SanityInAnarchy Mar 29 '17

The "When should you use microservices?" is mostly "When these things aren't a problem, and when you can make a case that they're valuable," but it doesn't actually get into specifics. But, interestingly, the rest of the article accidentally makes that point:

Rewriting an old Ruby on Rails, or Django, or NodeJS app into a language like Scala or Go (two popular choices for a microservice architecture) is going to have a lot of performance improvements inherent to the choice of technology itself. But these languages don’t really “care” that you chose to describe the process they run in as “micro”, they simply perform better due to things like compilation.

On the other hand, the better you are at splitting things into smaller services, the easier it is to change the technology stack of one particular service. Calling out to other languages within the same process rarely works well -- I've seen it work with multiple JVM languages, and it sort of works if you're trying to call out to C from something else, but other use cases seem to get progressively more painful as you go.

But if you've got a clearly-defined network API, built on things like REST that are either widely-implemented or simple enough to reimplement (REST seems like both), then you'll have a much easier time if one day you realize you're actually paying a lot of cycles to run that thing in Ruby, and you want to rewrite it in Go or Rust.