6 ms·
I'm pretty convinced that microservices are one of those things that make sense 5% of the time and the other 95% is cargo culting.
by bawolff 4y ago
I'm pretty convinced that microservices are one of those things that make sense 5% of the time and the other 95% is cargo culting.
- wg0 4y agoAs for me,I have been trying to discover that 5% that cannot be done without microservices.
- bawolff 4y agoLike any tool, there is nothing that cannot be done without microservices. However that doesn't mean they never make sense. Microservices have certain costs and certain benefits. I can believe there are certain situations where the benefits outweigh the costs. Its just not most situations. But that doesn't mean it never exists. I could believe it makes sense in extremely large apps with huge number of different groups working on them, where the communication complexity outweighs the other complexities microservices bring.
- qaq 4y agoThat's very hypothetical. Building a distributed system just might always be way more resource intensive than comparable monlith regardless of number of developers involved.
- avereveard 4y agoRemove reliability intercorrelations, so for example that your cart api and payment gateway is up and collecting orders no matter to what happens to the front-end services. But then for perfect decorrelation you'd also need independent databases behind the microservices, and queues between them for horizontal communication,and few are actually going all in with that, and so fall in the 95% where they go trough te motion and the effort of splitting microservices,but reap no actual benefit from it.
- kristopolous 4y agoThere's a bunch of things I'd like to have them do. If they could span across machines like clusters that would be amazing. If I could trivially package them up and deploy them locally with intrinsically less effort and wall-time then the old way, that'd be amazing. If I could somehow get the horizontal scaling promises and redundancy as some kind of built-in, like I can with say, memcache, that's be cool. If I could do these kinds of "hard" things with them more trivially, that'd be really nice. There's a lot of things I want them to do but it's a god-damn bull-riding rodeo every time I try to get there. And before you reply, I know you're an expert and can do all these things trivially. That's amazing. The vast majority of the industry creates a giant fragile spaghetti knot with them and I am not a full time k8s admin nor do I want this to be a career trajectory. It should be like you know, wine, ffmpeg, imagemagick, virtualbox, lua, qemu, redis, gnuplot, lvm2, gdb, ssh, sqlite; tools like that. It's pretty easy to get them to do really nice things. Those things deliver on their promises and potential pretty nicely. It's nice that nobody feels a need to hype curl or squid. They just work. Isn't that nice? I mean look at gdb's website: https://www.sourceware.org/gdb/ https://www.sourceware.org/gdb/ it doesn't even have CSS animations --- in fact, it doesn't even have CSS.
- freeone3000 4y agoYour asks seem easily answered with docker + kubernetes. Actually, this is in fact the use case for kubernetes — a fault tolerant distributed system running arbitrarily, simply packaged code. This has to be what you’ve tried — what issue are you running into?
- NBJack 4y agoKubernetes isn't something I'd put in the same sentence as 'easy'. Docker is a close contender for the same. I still recall the day when my local Docker builds necessitated a new router to properly manage streaming traffic at home while I downloaded a few GBs of layer images. Or the time I wanted to setup a 'simple' hosted Kubernetes cluster of my own in my lab for testing, only to discover the nightmare that is networking on it. Then there was the grim discovery that Docker containers were much more sensitive to the hosting environment than I had assumed, resulting in some fun "but it worked and tested fine" moments. Did they all work eventually for me? Yes. Was it simple? Not by my standards. If you find all that simple, kudos to you.
- alkibiades 4y agomicroservices make a lot of sense organizationally where each feature team can own their own feature service.
- selcuka 4y agoI would argue that in such cases those are not "micro" services anymore, they are services. In that case it makes sense to develop and deploy them separately, then find a way to make them talk to each other. Microservices is a different architectural decision.
- wg0 4y agoOR each team can write their features as a python package, rust crate, go module to be included in the main app. Libraries, versioned.
- emodendroket 4y agoWhich brings along all kinds of headaches that greater segregation solves. You can go in circles all day about this stuff.
- avereveard 4y agoYeah I see a lot of things that could be libraries packaged as services, so now each invocation incur in network latency and every transaction needs a two phase commit. And because each service need its own replica, deployment pipeline, and versioned internal api, production and deployment cost skyrocket
- bcrosby95 4y agoBecause, you see, if you surround shit with other shit, that original shit doesn't look quite so bad in comparison. So take your shit monolith, surround it by shit services that distributed it across a shitty network, and now your original self inflicted shit design is just 1/3rd of the shit you gotta deal with. Totally not as bad as it used to be!
- 4y ago
- deleted 4y ago[deleted]
- princevegeta89 4y agoMicroservices have lately seemed to me to be a buzzword for the ears of executives and stakeholders. To someone who isn't technical enough, it seems really "cool" from the outside, but on the inside, it's more than often a shitshow with teams and managers messing around to get these services working with each other properly while wasting a lot of time. If you ask me, if the time and focus is invested properly, it would be much more efficient to run a monolith instead. That's what some small number of great teams end up doing.
- Garlef 4y ago> lately "lateley" as in "for the last 5 years"?
- andreiursan 4y agomore like ~10 years. 2014: https://martinfowler.com/articles/microservices.html https://martinfowler.com/articles/microservices.html but also 2015: https://martinfowler.com/bliki/MonolithFirst.html https://martinfowler.com/bliki/MonolithFirst.html
- my_usernam3 4y agoYeah that seems closer to my experience. From my perspective, 2016ish was peak. At least thats when I had to to argue the most against trying to needlessly break up services.
- bottlepalm 4y agoNot only that, if you spoke out against microservices you were labeled not a ‘team player’ outcasted to maintain ‘old’ code that runs the entire company as a bunch of hot new devs create a mountain of crap services only to quit when they got bored.
- silisili 4y agoI absolutely agree, buuuut also realize we as programmers don't even have the same definition of what a microservice is. A lot of people here say...one service per team. But to me that is, or can be, a monolith. Often a team is a product line, so you have one service for that product. Is that a monolith? I don't know either, I guess. I -do- know most people who go around promoting that sweet microservice life end up being the worst. They seem to want every db table to be its own service, introduce tons of message passing and queues, etc, for absolutely no reason. I think we can probably all agree that is about the worst way to go about it.
- oaiey 4y agoYes! It is about splitting your business in reasonable chunks/domain/boundaries. Pizza rules/rewrite rules ... that is all nonsense. But doing it right, is nevertheless hard. Because cutting your business into chunks ... is not as easy as it always looks.
- bottlepalm 4y agoEvery service needs it’s own database. Then you need to handle all the DLQ errors between services as well.
- klabb3 4y agoDevils advocate, but is it possible microservices need a shared feature-ful message passing layer, and good tooling, to be working well? Eg schema, auth, flow control, ttl, persistence, partitioning etc in the message layer, a la Kafka? I mean it’s kind of implied that microservices can only work if they can talk to each other, and “talking” is a lot more nuanced than we tend to think.
- bottlepalm 4y agoComm requires massive overhead versus simply 'calling a function'. Calling a function doesn't fail. Maybe the code in it does, but not the call to the function itself. This is why microservice costs often far outweighs the benefits, but they rarely consider the cost in their crusade to 'break up the monolith'
- The_Colonel 4y agoI agree, my intuition would put it to 1% vs. 99% (difficult to quantify of course). I haven't yet seen a project/product which would need microservice architecture for technical reasons. If you need to scale, you can just scale monoliths (perhaps serving in different roles). The use case for microservice architecture is IMHO an organizational / high level architecture driven. I've worked in a big company (20K employees) which was completely redesigning its back-office IT solution which ended up as a mesh of various microservices serving various needs (typically consumed by purpose built frontends), worked on by different teams. There monolith didn't make sense, because there was no single purpose, no single product. But if I'm building a product, I will choose monolith every time. Maaaaybe in some very special cases, I will build some auxiliary services serving the monolith, but there needs to be a very good reason to do so.
- suction 4y ago[dead]
- rostos 4y agoThat organizational/architecture benefit is strong though.
- citrin_ru 4y agoIt’s depends on how you slice services. For one micro-service per a team I see benefits. On another end of the spectrum a single team managing 10-20 micro-services with more than one service per developer. IMHO it creates more problems than solves. Also it is usually a waste of HW resources because a library call it is cheaper then a network request.
- whstl 4y agoI think it depends on more than that. A single team managing 10 microservices that actually make sense to be microservices (like the PDF renderer example above [1]) is kinda good and perfectly manageable. A team with one single microservice that would actually work better if it was part of a monolith is already in the "creates more problems than it solves" territory. [1] https://news.ycombinator.com/item?id=35812294 https://news.ycombinator.com/item?id=35812294
- mehdix 4y agoOnce I was called to a meeting in a sibling department as a cloud advisor. They wanted to migrate to AWS cloud. The conversation went as below. - Does your app work fine? - Yes. - Do you have any problems? - No. - Why do you want to migrate then? - Silence.
- OtomotO 4y ago- Because we are innovative and it's the future! /s
- deanCommie 4y agoCustomer doesn't know their own requirements? Your job is to figure out what they actually need even if they don't understand it? Seems pretty par the course. There are dozens of reasons to migrate to the cloud. Do they apply to everyone? No. Are they always worth the cost? No. But the whole "cloud vs not cloud" argument that happened, got settled ("cloud"), and is now being restarted by the DHH-like is not data-driven and full of exaggerations and fear-mongering from both sides. Then you add on top of that that the main product of moving to the cloud is "operations" which is typically measured in "hours of human capital being impacted outside of core working hours". When the market is booming, tech humans are expensive and fickle, and don't want to undertake more operations than they should have to, and companies are forced to pay cloud providers. But in today's 2023 climate, any company looking around to decide how much to spend on cloud just says "Why would we pay for something when we can just ask our engineers to work more hours, and invite them to quit if they don't like it, oh wait nobody else is hiring anyway" No cost calculator of $$$ saved considers that overtime is free in our industry. tl;dr the cloud backlash is overblown, more companies/businesses would benefit from cloud than not.
- doctor_eval 4y ago- Because boss said we have to.
- 123pie123 4y agobecause they want "cloud" on ther Resume/ CV
- amoss 4y ago
- YetAnotherNick 4y agoMicroservices works better if you don't trust other team. While having trust seem like a basic thing, this is absolutely not the case for a lot of companies. With microservices, it is easy to see services which are down or have high error rate or latency, have clear API contract and call out the team for breaking API contract, and assign cost for which the teams have incentive to reduce, or at least not increase it.
- __turbobrew__ 4y agoAnother pain with monoliths is that they can only be deployed if the entire monolith is passing all tests. When you cannot deploy your changes because someone else on an entirely orthogonal team broke something in the monolith which is not related to you it gets old really quick. Large monolithic repos with many independent targets for testing and deployment work the best at huge scales. If you are only a few hundred engineers, monorepo with monolithic deployments and tests work fine.
- bottlepalm 4y agoTests passing should be a gate to merge into main. Tests can also be run in parallel.
- kubanczyk 4y agoTwo green changes merged to a green main can produce a red main. This is not a commonly known fact. Just to take an example of GitHub, this check is disabled by default: > Require branches to be up to date before merging > Whether pull requests targeting a matching branch must be tested with the latest code.
- arp242 4y ago> Two green changes merged to a green main can produce a red main. I'm sure this happens occasionally, but I've never experienced it, and it seems to be rare enough that it's not that big of a concern. Especially since it'll be easily remedied by either just fixing the error or just reverting one or both of the changes.
- est 4y ago> make sense 5% of the time Micro-services were invented by an outstanding software outsourcing company to milk billable hours and offload responsibilities in large org. If you want to save cost and not-that-large business, go for monolith-first. Keep it modular.
- oblio 4y agoWhich company? Thoughtworks?
- MattPalmer1086 4y agoThis right here is one of the reasons I got out of software development. Not micro services in particular, but just the unthinking application of some new pattern to everything. Everyone wants to do the new cool thing. Everyone wants it on their CV. To be followed some years later by everyone saying how awful it is, and moving on to the next fad. Rinse, repeat, round and round we go with no actual intelligence being applied.
- mpweiher 4y agoYes. However, I think there is something hiding inside the µservices movement that is actually much more generally applicable and useful: API-first development. And of course good old OO.
- cglong 4y agoMy team owns an API monolith that hosts several completely unrelated endpoints. I keep thinking this would be a good candidate for breaking into microservices, but I do wonder if I'm buying into the hype.
- Smaug123 4y agoMassive architectural refactors are so attractive (at least to the kind of mind that likes Factorio) and so expensive. At least make sure you've got some concrete benefits that you think might arise from breaking apart the monolith, so you can do some semblance of a cost-benefit analysis!
- bottlepalm 4y agoYou are. People like you nuked all productivity we had at my last company.
- cglong 4y agoWell, I've been sitting on this thought for two years now, so they probably weren't exactly like me :)
- adql 4y agoThat is probably the best use case for microservices (althought I'd just call them "services" at that part). That assuming they are big enough to warrant that in the first place. IMO if it is a dozen unrelated endpoints but all of that still takes less than dev/month to manage it's probably entirely wasted effort to "fix it" And if any of them grows to warrant dev/month or more.... separate that one and only that one out of that.
- cmrdporcupine 4y agoWhen you say unrelated, are you sure? Do they share -- or should they share -- a common underlying relational data model? My biggest grief with microservices is the fact that it's effectively become a war on having a coherent logical normalized relational data model inside an organization.
- thatwasunusual 4y agoThe problem I see in many projects, is that they start out as - or implementing - a microservice architecture. I think this is backwards; you should start with a monolith and separate out concerns into microservies if it makes sense, not because it's "cool."
- knightofmars 4y agoI agree, but aside from it being seen as "cool", what drives some engineers to go microservice first architecture is having experienced the inability of an organization to acknowledge that they actually do need to re-write a monolith as two or more services or undergo a general re-architecting of the monolith. Getting buy-in from the business is extremely difficult as clearly communicating the actual effort and impact that re-architecting the monolith would require is nearly impossible. This is usually due to poor separation of domains via lack of modules within the monolith, spaghetti code, circular or other strange dependency trees, tables with relationships or data that should never have existed in those tables, and a whole other set of other bizarre issues that were due to lack of planning and general discipline by engineers along the way. If you have a microservice first architecture, the perception is, it's easier to describe effort to re-write an individual service or split it into two services as there is a clearly delineated body of work. Bizarre service-to-service dependencies may still exist and a poorly implemented microservice architecture is still a potential challenge. Point being, organizations incentivize bad economic decisions on the part of engineers through the inability to recognize that rework is a necessary aspect of developing software and by constantly eschewing rework in favor of feature delivery it sends a strong message to the engineer about what to prioritize.
- nomilk 4y agoI had to google what 'cargo culting' meant. But I laughed when I found out. https://en.wikipedia.org/wiki/Cargo_cult_programming#:~:text=Cargo%20cult%20programming%20is%20a,that%20serve%20no%20real%20purpose https://en.wikipedia.org/wiki/Cargo_cult_programming#:~:text....
- latexr 4y agoDo you have a link to documentation on that method of highlighting text? Hard to search for due to the all the non-letter characters.
- oefrha 4y agoText fragments: https://wicg.github.io/scroll-to-text-fragment/ https://wicg.github.io/scroll-to-text-fragment/ Currently supported on all non-Firefox major browsers. https://caniuse.com/url-scroll-to-text-fragment https://caniuse.com/url-scroll-to-text-fragment
- deleted 4y ago[deleted]
- latexr 4y agoThank you. Seems Brave is an exception amongst Chromium browsers. They don’t implement it for privacy reasons. https://github.com/brave/brave-browser/issues/22906 https://github.com/brave/brave-browser/issues/22906
- sorcix 4y agohttps://chromestatus.com/feature/4733392803332096 https://chromestatus.com/feature/4733392803332096
- esjeon 4y agoYeah, but writing a big chunk of new code always involves either gambling or cargo culting, until you nail the actual requirements and the design. MSA is just a methodology to contain risks from the uncertainty, and it never says you must build everything in MSA. It's often better to migrate mature code into (semi-)monolithic services.
- siva7 4y agoThe problem is more like that many people don't understand the tradeoffs and when to use microservices. This becomes even more obvious when you ask them what their current architecture is and what problems they hope to solve for that needs a transition to another architecture.
- bewo001 4y agoThe reason for doing microservices I've been given by a two person developer team that had created a 15+ microservice single-server k8s monster was: 'this is how it is done today' Yeah, IT is like the fashion industry.
- 444Duarte 4y agoThe article is about Serverless, which is not necessarily microservices
- klabb3 4y agoYes but can we also consider “3p APIs that should have been a library” as microservices? It feels like that model has sneaked in as common practice but it suffers the same (and more) problems as multiple (1p) microservices.
- ImPleadThe5th 4y agoI really feel like microservices primarily solve people/team organizing problems more than it solves any computing problems.
- haspok 4y agoIt's called Conway's law.
- datadeft 4y agoMicroservices make sense for a lot more than 5%. If fact I think it is much closer to the 80/20, 80% working on serverless, 20% not. Video streaming obviously not going to work on AWS Lambda to begin with.
- adql 4y agoThey really don't unless you routinely put a bunch of tiny self-contained apps. The "pain" of figuring out how to deploy your "normal app" quickly amortizes over just how much easier and more reliable code is.
- datadeft 4y agoI finally realised after using Lambda for almost a decade (started to use it when it was released 9 years ago) that instead of think about apps that you map to lambda functions you should think about features instead. A simple example: I have a SPA that has the following features: auth(login, logout), dashboard, feature a, feature b. I can write a few very simple lambda functions and deploy these the same way (IaC). What do we (my team) win? We can implement each function in a language we want. You have a feature that is too slow? Rewrite it in Rust. You have an amazing Python lib for feature a? Use Python. What else? We almost never touch auth, so if a feature has a bug it does not impact the entire application. Security is better because we can allow individual functions to access part of the infra they really need to access. Lambda functions can call other lambda functions as well. Downside is that we cannot use a shared cache that is easy with a monolith. People need to design the boxes well which functionality goes to which lambda function. We have to use distributed trace ids to track requests.
- adql 4y agoI kinda thought about making "monolithic lambda", where there is just interface to get the request, respond to request, logging, and maybe some queue to talk with other components, for some of my personal tools. Basically cut down the cruft when deploying another small self-contained feature but still keep the code running (savings of few MB memory are meanigless if you just have few dozen features that might run at the same time anyway). Then I realized it's basically reinventing the ancient idea of "application server" like JBoss and EJB... which is kinda the case for lambda anyway.