Microservices

Around 2012 I was writing NodeJS microservices for a web crawler as part of a larger PHP application. Microservices weren't cool back then, I was doing it because PHP's sequential execution did not favor our web crawler. These microservices and the application were hanging out in the same repository.

In 2014 I was working on a project(for a separate company) where the technical director was convinced that we have to start with a micro service approach. I went along with the suggestion and started building everything out as separate services in their own repositories. 3 months into the project I realized that I am not getting any benefits from the microservice architecture, however, I am paying the microservice tax of complexity. Within one month I rewrote nearly all of the application in plain boring Symfony2/PHP and it was not only simpler, it was also faster and more reliable.

Bandwagon

Today the industry is all over microservices, if you are not doing microservices with Docker, you are doing it wrong. There is an endless supply of articles explaining how microservices are being used at AWS, Google etc.

This article sums things up nicely: https://circleci.com/blog/its-the-future/

As with all things hyped on the internet, one needs to be highly skeptical. A couple of years back AngularJS was the hot new kid on the block, today I hear people talk about "legacy Angular applications".

Microservice tax

At the start of this article I hinted that microservices aren't free, we have something I like to call the microservice tax.

The following Hacker News comment sums the microservice tax up nicely:

You need to be this tall to use [micro] services:

Link: https://news.ycombinator.com/item?id=12508655

Conclusion

Most projects don't have Google's or Amazon's problems, looking at what tech giants do can be misleading.

Building your application in a microservice format can be a form of premature optimization: http://basho.com/posts/technical/microservices-please-dont/

If you are unsure what to do: just build a monolith and when you notice that some parts of your monolith would want to live on their own, extract them out into microservices.