4 ms·
Some other commenters have discussed it, but one thing to make very clear that I think a lot of people are missing: 1. I fervently believe, after having lots o
by hn_throwaway_99 7y ago
Some other commenters have discussed it, but one thing to make very clear that I think a lot of people are missing:
1. I fervently believe, after having lots of experience with both microservices and monoliths, that microservices do not provide any technical advantage over monoliths. If anything, they can make a lot of technical details more difficult.
2. Microservices, however, can solve some particularly thorny organization problems for large teams with respect to how these large teams build complex software systems.
Thus, in my experience microservices can serve a useful purpose, but they will only be as successful as your organizational-wide communication is.
Furthermore, for the developers replying "I don't see why I'd ever use microservices for project xyz", well, if you're a team of 1, there is hardly ever a need to use microservices.
- gbuk2013 7y agoYMMV and also depending on what counts as a microservice but I currently write and maintain (as part of a very small team) several services that run on 200+ (physical, virtual and cloud) devices around the world and a monolith simply wouldn’t be able to do the job for boringly real technical reasons. Another team writes and maintains a few more. We also have some monoliths that provide customer facing UIs and aggregate data for our support teams and they are perfectly fine for that. Right hammer for the right nail and all that.
- lukevp 7y agoYou can have a distributed monolith. Monolith doesn’t mean there’s a single deployment. It’s about the interaction between domains. So if you have an app with a database on each device and the app layer is 1 application, one deploy, that’s still a monolith.
- doingmyting 7y agoI'll respectfully beg to differ here. A small app with a few functions at a small company, I completely agree. But once you have a large scale system you'll thank your lucky stars for microservices. Everything from deployments to development is a much better experience than in a large monolith. It's much easier to reason about and it's much easier to see where and why something failed if and when that happens.
- mfDjB 7y agoI wonder if there is a difference in terminology between the way I use microservices and the industry? I have worked on a number of systems, both monoliths and microservices, and when a service gets big enough (think Spotify or Uber) monoliths simply don't scale. I will agree that doing microservices before you have to is unnecessary complexity and what I would consider overengineering, however if the consensus is they provide no technical advantage I have to disagree, here are some that come to mind: 1) A monolith will have to consume a large amount of resources per request due to having all the models available at runtime. Lets say I have a system that handles 100 RPS but only 1 RPS uses that model, and that model is GB's of RAM and requires GPU, that means I will have to have this memory and GPU allocated for every request, making scaling much more costly. (Note: your mileage will vary depending on your complexity) 2) A monolith is a central point of failure, if I make a mistake in that service it can affect all of my requests, rather than just the request that calls out to that microservice, this is a difference between my entire service going down and just a feature. These are just 2 I thought of off the top of my head, but I wonder why I seem to be out of step with HN consensus here.
- winrid 7y agoCounter points, based on experience: 1. Yes, if you have an application that works this way you will have to manage your deployment to compensate. But you can use configuration as feature flags to keep a monolith but when you deploy it to X servers you enable one feature set and to Y servers you enable another. So you get the benefits of developing in a monolith but the isolation of microservices. 2. See #1, but also use proper error handling. It's been a while since I've seen a single request take down the whole app.
- philosopher1234 7y agoYou can also compile different binaries from a single monorepo
- winrid 7y agoGood solution too!
- jzoch 7y agoif you dont see the technical advantages you simply arent at the scale. Its that simple. Speaking as someone who works at a company with one of the largest monoliths in the world, microservices become necessary lest you deal with incredibly difficult problems at massive scale.
- hopia 7y agoCan you expand on this for us who do not work at large companies with massive scale services?
- castratikron 7y agoYou ship your org structure
- yxhuvud 7y ago> that microservices do not provide any technical advantage over monoliths Sometimes there is a real benefit of having a service that can fail without impacting everything else. That is a technical upside, but it doesn't apply in most cases. But it do apply in some cases where you just want to limit any problems from impacting too many part of the platform at once. The service could of course still be both micro or not.
- jaredklewis 7y ago> 1. I fervently believe, after having lots of experience with both microservices and monoliths, that microservices do not provide any technical advantage over monoliths. If anything, they can make a lot of technical details more difficult. Sure, monoliths are certainly easier to work with, and I think they should be the default starting point for most companies. But regarding technical advantages, what if different parts of the program have different performance profiles and scale differently?
- david-s 7y agoIf a single code base has multiple non-isolated deployables designed to be published simultaneously, and/or having a shared data store, is it a collection of microservices or a monolith? I've taken to calling it a scalable monolith.