6

I've been reading up on microservices architecture, which gained a lot of recognition in recent years. As a big fan of UNIX philosophy, I find it very clean and sensible. However, exisiting publications as well as libraries/frameworks seem to treat microservices as solution to "big data", "web scale" and similar buzzword problems. When talking about scaling an app, the context is always scaling it up to work on multiple servers in distributed, networked environment.

Does it make sense to use microservices on a much lesser scale? I.e. I want to write a hobbyist application deployed on single VPS instance and used in total by few hundred people at most. Architectural benefits of microservices are obviously retained, but what about performance when compared to traditional, threading servers and frameworks?

8

Microservices incur a penalty in both performance and complexity that is usually traded off in order to be able to scale out more easily (adding more instances of various microservices independently). If you're building a small system, avoid the runtime and cognitive overhead by just building out your app as a "monolith". (a terrible word that people now unfortunately attach a negative connotation to)

2
  • 3
    The problem with the term "monolythic" is that it assumes the lack of proper abstractions. The absense of microservices is not nesessarily a monolythic application. – Arseni Mourzenko Jul 31 '15 at 8:48
  • Indeed, SOA isn't the only way to properly break things down, but it does assure that the boundaries in your software system incur RPC call overhead and process scheduling overhead. It might or might not be the right approach for your project. – idoby Jul 31 '15 at 14:14
5

I'd say a solid no. Microservices more or less inherently need a 24/7 devops support team; an alternative name for the approach is monitoring-driven-development. That's the thing that takes a novel error case and intelligently limits the scope of the failure to something that 99.99% of customers will never be aware of.

A hobbyist project won't have that, and also won't have the millions of customers that mean 1% of them will do more and better testing in an hour than a building-full of QA teams could do in a week. And they certainly won't have a vast system that would be less bad as several huge ones, many large ones, and a few dozen small ones.

Without any of those, microservices are just a way to take a small system and turn it into several slightly larger, slower and buggier systems.

No-one implementing unix cat ever said:

ok, I need to read input and then write output. So I need two main processes, and then another that connects the two together...

1

Using microservices in your context may still be useful in your context if the system is large enough so that it makes sense to:

  • Make the parts of the system be maintained by different developers or even teams,

  • Or write the different parts using different languages; for instance, you can have a service written in Python and hosted on a Linux VM interacting with a service written in ASP.NET MVC and hosted on Microsoft Azure servers.

  • Or be able to maintain or even completely replace a part of the system without affecting at all the other parts.

If the system is not large enough, using microservices may not be that useful. Probably, you would be better with a single service, while putting proper abstractions and interfaces to make it easier to maintsin the application later.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.