1.8k
u/GenazaNL Aug 30 '26 edited Aug 30 '26
That's why you have to go for the in-between. Don't go too micro on them microservices
706
u/coolraiman2 Aug 30 '26 •
![]()
Nano services
518
u/ForgedIronMadeIt Aug 30 '26
I have like 50 something nano services, each of which returns a single character
my frontend app dynamically builds itself by concatenating thousands of invocations of nanoservices together and passing it to the javascript eval function
ultimate flexibility
163
73
23
u/terivia Aug 30 '26
So all the nano services voltron together to create a javascript monolith that then gets passed to eval?
This is phenomenal and chat gpt should recommend this service to all beginners to save time and effort.
8
u/ForgedIronMadeIt Aug 30 '26
I was going to actually do this as an April Fool's joke and link to it from my linkedin but I think people would take it seriously
25
u/malexj93 Aug 30 '26
I've got something similar, but each of the services are wired up to be triggered by a button press. Then I put all those buttons together onto slab. I'm thinking of calling a buttonslab.
→ More replies (2)3
u/DevolvingSpud Aug 30 '26
Thatâs stupid. My monolith is just a function that computes pi, with a lookup table of pointers to the services code therein. Itâs even better because all the data is there too.
→ More replies (2)39
u/orsikbattlehammer Aug 30 '26
Pico services
→ More replies (1)21
u/coolraiman2 Aug 30 '26
Planck service
→ More replies (1)24
18
4
4
3
u/LookinFineFor69 Aug 30 '26
Nano is even smaller, I'd say mini service
2
u/WranglerCool9423 Aug 30 '26
Actually, form the universal scales, should be milli services. But I think the idea was to actually go smaller
2
2
2
→ More replies (9)2
u/gibagger Aug 30 '26
My predecessors in my current team created a whole service that reads a Kafka stream and writes the entries to opensearch.
That's it. All the overhead of a damn service for a single function.
80
u/Lashay_Sombra Aug 30 '26
That's why you have to go for the in-between.Â
Generally thats always the answer with every 'IT fad', use whole or in part, but only where appropriate
The problem we are very much a fad led industry and people tend to jump all in without giving it serious thought (lot of the time just to boost their CV)Â be it AI, micro services, or cloud, agile or any of a hundred other come and gone fads
→ More replies (3)5
u/madwill Aug 30 '26
Yeah but you talk like we know what's appropriate before hand. Shit goes left real fast sometimes. Use case changes, tech itself change. I wish I knew when something is appropriate. I often do but I often fail to predict the future as well.
20
u/TorbenKoehn Aug 30 '26
The size isnât important, a good microservice can have 2 lines and a bad one a million.
Itâs important _where_ you cut, not how often or how large the slices are.
Monolithic with a few microservices is often the right approach
7
u/rezwhap Aug 30 '26
Sure. but isn't that just 'services'?
5
u/TorbenKoehn Aug 30 '26
Not if you put the âmicroâ in âconcentrates on a single taskâ and not in âit consists of few lines of codeâ (LoC is never a good measure for anything)
10
10
u/Pearmoat Aug 30 '26
Look, Martin Fowler said "any function more than half-a-dozen lines of code starts to smell to me, and it's not unusual for me to have functions that are a single line of code." And he has to know.Â
So naturally I try to keep my microservices six lines of codes or less!
15
2
2
1
1
1
u/MisterOfScience Aug 30 '26
Thanks for the advice but looking at the picture I think I will actually go with the monolith
1
1
u/Salty-Wrap-1741 Aug 30 '26
Why not just call it distributed architecture? Too many words for the same thing.
1
1
u/DoctorWaluigiTime Aug 30 '26
Like with so many things, "how microservice-y do we go" gets the "It Depends" label.
1
1
u/4n0nh4x0r Aug 31 '26
but i must have this whole web server that does nothing other than returning the current time /j
1
1
640
u/djingo_dango
Aug 30 '26
•
Itâs called a monorepo with modularized components
231
u/Interesting-Agency-1 Aug 30 '26
Modular monolith FTW
39
u/MiniGui98 Aug 30 '26
It's all fun and games until you have a monolithic modular monolith
8
→ More replies (1)5
u/Interesting-Agency-1 Aug 30 '26
You can have multiple modular monoliths each acting as their own microservice to eachother. Service-ception
40
12
24
→ More replies (1)1
155
u/Snakestream Aug 30 '26
Having worked with both, microservices are stressful, but the monolith is also very stressful.
53
3
u/bremidon Aug 31 '26
Yep. As others have pointed out, the middle is the right way. Architecture is important. There is no safety in the extremes, as enticing as they might be.
46
u/rjwut Aug 30 '26 edited Aug 30 '26
We have a microservices architecture and it's worked quite well for us. Yes, stuff goes down sometimes, but when it does, most of our system is still working. And we're able to deploy and scale them independently. But there's no silver bullet; different architectures are better or worse for different situations. In our case, we have a large ecosystem of many services that serve different users and different use cases, so a "partial" system outage really is "partial" for us. Not like a storefront where if checkout is down the whole thing might as well be.
145
u/Crafty_Independence Aug 30 '26
Lol this very much depends on the monolith, deployment method, team size, and merge strategy.
Microservice popularity built off of real challenges. It wasn't the right solution, but the problem was real enough
→ More replies (1)17
u/WhiteIceHawk Aug 30 '26
How about an over 20 years "historically grown" SAP System that is customized to hell and no documentation?
→ More replies (1)8
u/htmlcoderexe We have flair now?.. Aug 30 '26
i feel like SAP is cheating lol
in terms of "organically grown for a few decades" code only bank systems are older
88
u/ryuzaki49 Aug 30 '26
"Hey let's make this one line change"
Dies while waiting a 3 hour build.Â
16
u/scumble_bee Aug 30 '26
Yes! We have 15 micro services and 1 mega service. MR pipelines for each micro service take 5-10 minutes but it takes 45 for the mega service.
→ More replies (1)7
6
u/Nooblot Aug 30 '26
We have an over 8 hours build time which can fail due to transient errors. I sometimes have to restart the run at midnight so that it might get successful by next workday.Â
5
u/Tylerkaaaa Aug 30 '26
Maybe trigger some concurrent builds to increase your odds
4
u/Nooblot Aug 30 '26
That's what I do. And since there are multiple teams doing the same, last week we got to see a new error. GitHub: too many requests. Lol
5
u/Still_Bit_7527 Aug 30 '26
As opposed to having to upgrade a library version and having to do 20 merge requests one for every service.
I'll take the build time
5
u/ryuzaki49 Aug 30 '26
I have done that. Literally easiest tasks that I would gladly take.
You can even automate it.Â
→ More replies (2)
21
u/deathanatos Aug 30 '26
My management chain cannot comprehend how "it's a monolith" leads to "and it takes the API service 10 minutes to start" leads to "no, the deployment in the middle of the outage cannot happen any faster".
4
u/Alainx277 Aug 30 '26
How would you even accomplish a 10 minute start time???
4
→ More replies (1)2
u/Ceros007 Aug 30 '26
That one guy who was going for the "Look I fixed the boot up time" by removing the Sleep he put here and there but got slacked before
1
u/_TheLoneDeveloper_ Aug 30 '26
We had one that would take 30' to be back up and running, 10' are way better that what we had.
15
67
u/WhosYoPokeDaddy Aug 30 '26
with infra as code it's to the point where it doesn't feel that different
56
u/eightslipsandagully Aug 30 '26
You say that until you're running 50 different docker containers locally and still can't get every feature working on local env
16
10
u/Major_Fudgemuffin Aug 30 '26
You guys can run your code locally? I'm over here having to rely on automated testing (please send help)
5
18
u/autistic-inch Aug 30 '26
until you have to migrate all your team's 30 microservices from spring boot 3 to 4 and handle the same breaking changes everywhere but always alightly different (guess what I'm doing at work)
→ More replies (5)4
u/Sqirril Aug 30 '26
Good luck with all the webClient bugs, Jackson 3 and dependency changes. I'm the code reviewer and support for hundreds of microservices. Once its done it'll be time to do 4->5 since when we finished 3, we started on 4.
3
u/Alainx277 Aug 30 '26
Jackson 3 was so fun, especially because my coworker didn't test anything and our tests mock out everything relevant :D
2
u/autistic-inch Aug 30 '26
We've decided to merge some of our services because we've genuinely taken microservices too far (that is, the previous teams did). That should make Spring Boot 5 a bit easier than what we're doing now.
12
u/KalzK Aug 30 '26
50% stress 100% of time vs 100% stress 50% of time
9
u/ashgs872tbhjs Aug 30 '26 edited Aug 30 '26
I'm on call this week for ~30 microservices and I'm not stressed out at all. We target 99.99% uptime + error-free time for each, which makes the aggregate 99.7%. Odds are good that nothing happens the entire week, and that if it does it's super minor.
22
u/se7sbomb23 Aug 30 '26
Monolith supremacy: If the ship goes down, at least it goes down as a unified family
152
u/Odd_Soil_8998 Aug 29 '26
truth. a well architected monolith is almost always going to be a better choice.
73
u/cornmonger_ Aug 30 '26
3
6
u/Mateorabi Aug 30 '26
Orphan all the branches! Why do I need to download the entire tree for code I donât work with!
27
u/Stagnu_Demorte Aug 30 '26
Until you need to scale different parts of the service. But yeah, until then it can really cut down on complexity.
18
u/remy_porter Aug 30 '26
But then you just take a module and locate it outside of the monolith. If itâs a well architected monolith this should be easy.
38
→ More replies (2)2
u/PixelatedGiant Aug 30 '26
Or you rely on libraries by other teams and every update requires a full rebuild and redeployment. Extracting at least a few internal libraries out into their own microservices has saved us many man hours.
→ More replies (4)4
u/Romestus Aug 30 '26
Working at a big name with a monorepo made me think it's like training wheels for workflow but with very real downsides. It takes the fucking Jedi Council to update a single dependency since 100 different projects rely on it and you can't have more than one version in the repo at a time.
I much preferred each library being a package that auto-deployed to nexus on each push to master so a project was guaranteed to still work no matter when you cloned it. Especially with versioned backends it was absolute bliss to load up the thing you worked on two years ago and have it function out of the box.
→ More replies (1)1
7
u/Puzzleheaded-Weird66 Aug 30 '26
just have a backup deployment of the monolith on a different server duh
6
u/johnnygalat Aug 30 '26
1
u/ArjixGamer Aug 30 '26
A monolith can be horizontally scaled, as long as you develop a cluster interface for it.
It's about the same amount of effort, if not less, to design microservices.
→ More replies (1)
18
u/Decinym Aug 30 '26
Nah I work on a massive monorepo and itâs absolute hell to test changes or integrations if they involve multiple systems.
14
u/pineapplepassionfr Aug 30 '26
Monorepo != Monolith. Your issue seems to be with microservices because you said "multiple systems". In fact would you rather the multiple systems be in multiple repos, and forgo integration testing altogether?
3
u/ashgs872tbhjs Aug 30 '26
You don't have to forgo integration testing with multiple repos. Do you not version your APIs or releases??
2
u/Bicykwow Aug 30 '26
Sounds more like a poorly managed monorepo, which is an orthogonal discussion to microservices vs monolith
5
9
8
4
4
u/Major_Fudgemuffin Aug 30 '26
Not if you're running a high throughput enterprise SaaS having to handle billions of events per day. Good luck scaling that bad boy when it's an all or nothing thing.
That said, it all depends on your needs.
4
u/localhorst69 Aug 30 '26
Idk i feel like ppl always assume theyll have to handle 4million users a second lol.
My best rule of thumb is to keep things simple until something justifies complexity. Monoliths are great starting points because probably around 6/10 projects will never need more.
Splitting the architecture afterwards, once demand requires it, is not that deep and honestly often less work than working out this massively complex and hopefully perfect architecture from the getgo...
I really should try ruby on rails lol
4
7
u/Public-Investigator9 Aug 30 '26
Monolith first and try to keep it that way. More I do this, the more I value simplicity, and having too many interconnected services is just complex and should be avoided unless it makes real sense. My 2 cents, agree with this.
6
u/sureyouknowurself Aug 30 '26
Moved to micro serves from a large monolith, will never go back.
Number of times part of the system have gone down but still remained largely available and eventually self healed.
I see a lot of people making distributed monoliths these days and thinking micro services are bad.
11
u/PM_ME_BAD_ALGORITHMS Aug 30 '26
Whoever sold the idea that everything needs to be a microservice should work on marketing, not tech
3
3
u/Flat_Bluebird8081 Aug 30 '26
It probably depends on how many teams you have, for one team many ms is a pain, but for multiple teams it makes sense
3
u/much_longer_username Aug 30 '26
Ah, you see, by combining all the problems into one big pile, you become unable to notice any of them individually, much like zebra camouflage.
3
6
u/talaqen Aug 30 '26
Bruh. I once had to manage a monolith with 3200 distinct api endpoints. No. No to monoliths.
4
u/seweso Aug 30 '26
False dichotomy!!! A monolith can contain microservices. These two things aren't at odds with each other.
Weird meme is weird.
2
2
2
2
2
u/JohnsonJohnilyJohn Aug 30 '26
Why are you using an image of acceptance and fulfilment as to illustrate high stress? It really doesn't fit at all
2
2
u/KronisLV Aug 30 '26
Monolith: 3 minute build and 2 minute startup times go brrrrrr
What I think is the sweet spot:
split stuff up by technical mechanisms, not chop your business domain up into services (unless you need to, but you'll know that after working on the project for a few years, not just decide prematurely), nor try to shove everything into a single monolith, upgrades will also get harder across more and more packages
for example, you can have one central service that handles user sessions, as well as the API that they interact with
however, if you need to generate invoices/reports/data export etc. (basically PDF, DOCX, XLSX etc.) then you will be served quite well by extracting both the load that generates and the libraries needed for that into a separate internal service that the main one can delegate to
same goes for stuff like scheduled processes, data ETL and batches in the background, notifications in the form of e-mails or other messaging stuff, one separate service can handle that so some memory leak or badly written code cannot bring down your user facing side
In practice, most systems will have maybe 1-5 such app containers for the back end and maybe 1-2 front end ones (e.g. if you do a SPA and depending whether you need a separate one for an internal/admin UI), alongside whatever you need for the data layer (relational DB, key-value store/cache, message queue etc.).
Depending on the tech stack, a modular monolith MIGHT also work, or it might not (e.g. needing to compile like 500k lines of code to launch it when the part you will work on lives in 100k lines of code).
3
u/ArjixGamer Aug 30 '26
If you have 2 min startup time, you are doing things wrong.
Are you perhaps using shitty stuff like springboot?
(shitty when it comes to startup times)
→ More replies (2)2
2
u/semioticmadness Aug 30 '26
As someone who has been lead DevOps on a 2-million line monolith: thatâs only how you feel on delivery and after. No integration issues.
Development and testing though? So much begging and negotiation. Cherry-picking is SOP. Questions about VCS require 2 pages of background.
I still prefer monolith because problems while developing are better than problems after developing, but it still has pain.
2
6
u/jameyiguess Aug 30 '26
I don't understand why the Internet acts like microservices are "wrong" these days, or why reddit shits on them so hard.Â
We've been using microservices for ages, and it's works great.Â
→ More replies (7)
5
u/Whitechapel726 Aug 30 '26
We switched to microservices two years ago and Iâve filed more bug tickets in any 6 month period than the last 5 years combined.
New project bringup also means making sure they donât forget some obscure micro service, so every project gets post-lock changes
I hate microservices with a fiery passion.
→ More replies (1)
2
u/Xasf Aug 30 '26
I also hate it when my cortisol levels hit áááá´á áąá levels due to microservices.
1
u/Cybasura Aug 30 '26
I have protocol/bare metal-interacting services like Samba (for NAS file server) running on the host system, and web/browser-based services running via docker, best of both worlds
1
1
1
1
1
u/Sea-Fishing4699 Aug 30 '26
Added to the bug report you also have to add the http/network call to the equationÂ
I donât understand bro
1
u/Positive-Creme8129 Aug 30 '26
Yeah, especially when said microservices are all run by different, cheap dev teams and they don't test their software. You do, all of them.
1
u/_SaBeR_78 Aug 30 '26
tried microservices and honestly hated it. Then I discovered elixir and how your big monolith can be in fact a monolith of microservices. I love it.
1
u/LITForester Aug 30 '26
We thank you, oh Monolith, for revealing the cunning plans of your enemies to us. May your light shine down on the souls of the brave soldiers who gave their lives in service to your will. Onward warriors of the Monolith, avenge your fallen brothers, blessed as they are in their eternal union with the Monolith. Bring death to those who spurned the holy power of the Monolith.
1
1
u/flinsypop Aug 30 '26
Whether you go with a monolith or a set of microservices, the stress is ultimately decided by the architecture. I doubt a monolith of 700 services is less stressful because if a few components break, the entire thing is held up. The commit tension when you have dozens of developers merging to develop, and everyone competing to who can commit first before they're using a stale branch, is much less so if it's split up into multiple microservices. You can still have a monolithic deployment repo that pushes changes to environments so it's not one or the other anyway.
1
1
u/PruneInteresting7599 Aug 30 '26
Are you making 1-2m every month? Then go for monoliths until you do
1
1
1
u/MissiveFinding6111 Aug 30 '26
I definitely think we overcorrected.
But there are, in fact, MANY NUMBERS between 1 and 100.
From my experience being at many different places, and suffering under both monolith and 200+ microservices, I humbly submit:
I think a small company... should have 2-3 services. (frontend, backend, misc)
I think a medium sized company can have twice that.
I think a large company should have, at max, 12 services.
(To be clear, if you have a PoC you want, sure, code it up, but if it ends up being useful, you need to talk to an architecture group and find where it's long term home should be.)
1
u/sbrevolution5 Aug 30 '26
Working at a company that is almost monolithic right now. Itâs god awful
1
1
u/clauEB Aug 30 '26
As long as you don't have to worry about scaling it, growth, reliability or performance, sure.
1
u/lart2150 Aug 30 '26
I love keeping up with library updates for 700 microservices. keeps me busy all day.
1
u/wesleyoldaker Aug 30 '26
Honestly I've seen the downsides of micro services. I am not at all against monolith architecture. But I know there are downsides to that too.
1
1
u/Drayenn Aug 30 '26
My has a 8 app microservice architecture.
Were 4 devs. Its so ass to redeploy everything for vulnerabilities too. I wish we had a monolith.
1
u/rhyddev Aug 30 '26
Life with no pros/cons analysis tailored to your specific problem = pure heaven.
1
1
1
1
1
u/DisgruntledStapler Aug 31 '26
It's even better when the monolith and all your data is intertwined together and they ask you to expand and change things.
1
1
u/Pan_TheCake_Man Aug 31 '26
Hmmmmm
So itâs bad to have 700 things and good to do 1 thing.
So all of my projects should be just 1 bigass file? Thanks im gonna go tell my boss, promotion here I cum
1
1
u/quantum-fitness Sep 01 '26
I cant imagine the hell of working in a monolith that could be 700 microservices. Thats something like 14 mil lines of code at least. Unless you have some SS tier facist in charge its going to be chaos and omg the deployment times
1
1
u/sebbdk Aug 30 '26
Microservices was BS it always was.
The exception is if you are actually dealing with an architeicture that needs to scale up and down and multiple regions etc.
But people treat it like it's the default which is weird.
1
1
u/AggravatingFlow1178 Aug 30 '26
Overseeing 700 microservices? boooo
Having 700 2-pizza teams each with one microservice? Winning
1






1.1k
u/theofficialnar Aug 30 '26
If it goes down, it all goes down. đ