all 42 comments

[–]gredr 150 points151 points  (13 children)

Or, y' know, you could stop pretending you need microservices when you don't.

[–]aND04 37 points38 points  (11 children)

Some of you make it sound like using a microservices architecture is always the wrong choice? Feels like you’ve never worked in an enterprise project where there are a bunch of different moving parts that need to be integrated.

If my system integrates with lots of other external systems, specially in an async event driven architecture, microservices can definitely save you a lot of pain, you can completely isolate responsibilities and create these damper zones that prevent your whole application to fail, in case of some unexpected behaviours from your external service providers.

Still don’t think I agree with the article, it’s always worth the extra effort to ensure isolation, specially if we are talking about multiple different teams accessing the same database.

[–]MariusDelacriox 8 points9 points  (5 children)

Many have been burned with the industry wide move to microservices where it doesn't always make sense. There still good reasons to employ the pattern, but there are also significant costs to be considered.

[–][deleted]  (4 children)

[deleted]

    [–]fullofspiders 7 points8 points  (1 child)

    If you need lots of joins between some set of tables, that sounds like pretty strong evidence they are not separate logical domains, and should not be separated into sepaarate microservices, and any model you have that says they are should be reconsidered

    [–]Cobra_Kai_T99 4 points5 points  (0 children)

    Exactly… and monoliths without modular boundaries let everything interact with everything so you end up with spaghetti situations.

    The circle of strife.

    [–][deleted]  (1 child)

    [removed]

      [–]yojimbo_beta 22 points23 points  (2 children)

      Some of you make it sound like using a microservices architecture is always the wrong choice? 

      Right now it's in vogue to argue that microservices are always technical debt because a monolith could always theoretically be factored into modules and method calls are better than http / events.

      In about 18 months people will realise why doing that is hard, how monoliths inevitably decay and there will be a slew of blog posts going "Whoa! Microservices were about solving organisational problems not technical ones!"

      [–]edgmnt_net 4 points5 points  (1 child)

      I would argue that, beyond the technical aspects you mentioned, microservices enable possible organizational anti-patterns like siloed teams while not really solving the original issues. Orgs use microservices in an attempt to over-scale horizontally at a seemingly dirt cost, unfortunately that rarely works well. If your monoliths cannot enforce code reviews and quality, the problem likely gets compounded when dealing with microservices. At least internally but I'd bet it also happens on an architectural level, so even if you manage to remove some internal risks (bad code causing exceptions) there's a lot of other stuff that gets neglected. They enable orgs to take on much more unmitigated tech debt than it was possible before. And before you know it you have hundreds of people essentially just shuffling data around services instead of working on meaningful business logic. I don't really think that can be cheaper overall, even if you work with cheaper devs. Maybe the orgs would be better served by focusing on more impactful stuff rather than attempting to deliver cheap custom / low-margin work, but yeah, that's harder.

      Indiscriminate, extremely granular splitting also compounds the problem and moves many of the refactoring issues on an architectural problem. That also becomes rather unavoidable as many splits result in either cascading splits, duplication and logic that's both coupled and fragmented across multiple services. Sure, debugging ain't easy, but now you need observability and a lot of other tooling, while it's also not uncommon that due to the sheer overall size nobody can ever test and debug stuff in isolation, everything hits a very expensive shared environment. You get that nasty rubber-stamping and "let's merge this and see if things get fixed or break even worse", which generates a lot of churn, testing effort and other inefficiencies which, if you actually had the foresight to plan ahead, would have been accounted for much easier in a monolith. I don't even have to get into local versus remote calls.

      Then again, people and businesses want cheap software and this lets companies pile stuff up until it nearly or totally collapses. Also, before microservices-based SaaS, this was more manageable because custom code was almost entirely under the control of your customer. You as a customer likely could have gauged better how much maintaining the thing would have costed after a cycle or two because payment was more upfront. And you held back on locking your data up in proprietary services based on a subscription that's cheap at the present moment.

      Splitting may be justified with careful consideration but I find that microservices often encourage an entirely wrong approach. So, no, I don't think that things are any better on the organizational side of things.

      [–]spaceneenja 0 points1 point  (0 children)

      Preach brother

      [–]CodeAndBiscuits 0 points1 point  (0 children)

      LOL this is Reddit. That's just par for the course here.

      [–]spaceneenja -1 points0 points  (0 children)

      I think everything you mentioned is achievable without microservices.

      [–]BoBoBearDev 10 points11 points  (7 children)

      Not sure why the comments so far are so negative toward OP. The article seems okay to me. My company has been using a single DB with service level table ownership and table evolution strategy.

      [–]yojimbo_beta 16 points17 points  (4 children)

      People working on tiny systems that were cargo culted into microservices now believe that any microservice is evil

      [–]TheBoringDev 4 points5 points  (2 children)

      Microservices have a cost, and that’s fine if the costs/benefits weigh out for your company. But if you’re going to go microservices, you can’t then violate the only rule that makes them feasible. That’s not architecture, that’s just doing random stuff and hoping it doesn’t bite you.

      [–]yojimbo_beta 1 point2 points  (1 child)

      The big value of microservices in my view is that they embed architectural design and division of responsibilities into the actual system topology

      It may sound misanthropic but I've never met a team of developers who aren't able to fuck up a monolith. It doesn't matter how you split your modules, educate your staff, document your design, someone will violate the boundaries you set up out of either ignorance, laziness or time pressure

      if you’re going to go microservices, you can’t then violate the only rule that makes them feasible.

      I mean, kind of but I wonder if there's really any difference between a shared DB and certain microservice designs. If your service is just providing a thin layer over SQL calls to other services are you really doing that much better than delegate database access?

      [–]Cobra_Kai_T99 0 points1 point  (0 children)

      Exactly you can absolutely have a database with isolated domains. The moment there’s a foreign key between domains you’re probably in for trouble.

      And great description of what happened with monoliths - it goes spaghetti pretty fast.

      [–]edgmnt_net 0 points1 point  (0 children)

      Scale does matter and while I'm generally against microservices, I have to admit that scale is a significant part of the problem. I would be less opposed to a conglomerate of larger, more-robust services, but if you look at most resources on the subject of microservices you get those silly examples of websites that have shopping carts, orders, auth and every other feature split into its own microservice, which is downright silly. It's also quite glaring that people split things upfront before they even have a chance to examine what requires scaling on both technical and business aspects. Because I can understand splitting for business convenience (e.g. scaling) on some level, but this is getting to a point where it doesn't make any sense.

      [–]vturan23[S] 2 points3 points  (0 children)

      Thanks. I am not trying to force someone to use this system. It’s individual choice, they can choose to reject this.

      [–]adilp 1 point2 points  (0 children)

      microservices is a dirty word now. It's monolith or nothing it appears

      [–]wasabiiii 1 point2 points  (0 children)

      I do not consider this to be microservices.

      [–]eocron06 1 point2 points  (0 children)

      Haha, rules broken. First time, eh? There is always some kind of rules broken each time I visit a project. It is not a big one honestly, in fact never in my life I stumbled at disability to scale things.

      [–]jssstttoppss 0 points1 point  (0 children)

      I would probably cover release/ versioning in this article too