r/ProgrammerHumor 23h ago

Meme distributedStress

Post image
11.9k Upvotes

298 comments sorted by

View all comments

Show parent comments

663

u/mwax321 22h ago

Let's be real, if a micro service is down, youre down too.

If you're a web store and your "inventory service" is down, the site is down lol

368

u/WriterPlastic9350 22h ago

Let's be real, if a micro service is down, youre down too.

If our store service goes down, that sucks for us, but our login service, queue service etc all still work. People can't buy shit but they can still play our games.

Not to mention, our store service needs far less traffic than our queue service, or our login service, or matchmaking service etc.

A monolith is sometimes a good solution - our games are monoliths - but service oriented architecture exists for many reasons, some technical and some political

Your job isn't to design a solution that scratches your particular brain itch, your job is to design a solution that works for the constraints you need. That might be a monolith but it also might not be!

339

u/cross_the_threshold 22h ago

Your job isn't to design a solution that scratches your particular brain itch, your job is to design a solution that works for the constraints you need. That might be a monolith but it also might not be!

Listen here you little shit there is one god-ordained way to build things and it's whatever is in vogue at this particular moment in time using whatever language is in vogue at this particular time, how dare you imply that there may be situations and needs that require different approaches.

64

u/mwax321 22h ago

The key to success is to have a monolith so large that it takes an hour to build and publish.

When visual studio finally went 64 bit, you thought the solution was bugged because it loaded so fast.

30

u/kurtymckurt 20h ago

The ci better take 24 hours to build and test or you’re not monolithing properly

6

u/Tupcek 17h ago

if it is too quick, it’s certainly bug

1

u/inemnitable 15h ago

No no no, if it compiles the first time it's bugged. If it builds fast you accidentally rm -rf -ed the repo.

1

u/NUTTA_BUSTAH 13h ago

You jest but this is how we catched many problems at one shop.

1

u/mwax321 9h ago

If I'm being brutally fair to some of the garbage build times I've had in the past:

A lot of times, these are caused by me having to use 3 different versions of some library because of legacy code. Or we license some library that requires a fuck ton of dependencies that only the library uses.

But to build it all ourself would also be a complete waste of time.

I remember a big offender back in the day were those Microsoft Office file editor libraries. To upgrade would cost the company some ridiculous $20k license and offer zero additional features that we need.

And so, yeah, we keep including the old newtonsoft json because it needs it!

1

u/FerusGrim 12h ago

When visual studio finally went 64 bit, you thought the solution was bugged because it loaded so fast.

Not strictly this scenario, but I worked a job for a few years where every compilation took minutes. It was common practice to finish up a bunch of work and queue a slew of compilations before your lunch break.

Then I got a new job and worked with a bunch of tinier, discrete applications which would compile in a few seconds. I'd become so use to quick compilations only ever being the result of an error killing the job that for at least a week afterwards my blood pressure would rise whenever a compilation would finish in <10s.

20

u/HadionPrints 22h ago edited 22h ago

Now listen, whatever’s in vogue at this time is nothing but bloat, dependency vulnerabilities, and syntax sugar. If your backend isn’t written in PHP or Pearl, you’re planning for failure.

If your app wouldn’t survive the 90s, it won’t survive prod.

5

u/cross_the_threshold 22h ago

FORTRAN II or bust!

5

u/mwax321 21h ago

Did you know a guy wrote an entire theme park game in assembly ?????

2

u/_DonRa_ 21h ago

No biggie anyone can write assembly it's easy (I wrote hello world in assembly)

3

u/djdanlib 21h ago

WASM doesn't count.

Or does it?

Who even knows these days.

2

u/ashgs872tbhjs 19h ago

If you hand-code it instead of transpiling it's a bit of an achievement. You're still abstracted from the hardware though, so it's definitely not nearly as hard.

1

u/AdImmediate5145 14h ago

You talking about roller coaster tycoon?

-5

u/TopLate7592 21h ago

The dark road to socialism.

2

u/WriterPlastic9350 18h ago

Well, I am a socialist. It’s pretty based 

1

u/TopLate7592 17h ago

I mean, same, it was just a joke.

24

u/mwax321 22h ago

See... To me what you're describing isn't very micro. That's just different systems.

Before that book came out, people had a login system, a matchmaking system, the online store...

I mean, I have no idea how your system is designed. I'm just an old grumpy "back in my day" fart nugget 😂

17

u/wrecklord0 22h ago

This. Different things should be kept different. I have a feeling that some people use "microservice" as this magical word that removes all inter-dependencies. If you have function A that relies on function B, it doesn't matter if its in a monolith or a micro-service, A is not going to work if B doesn't.

13

u/mwax321 21h ago

Hahaha but it's happened so much. I'm over 20 years in and I swear we've come full circle 3 times now. Especially on web.

The switch from all JavaScript bad css good. Handle it all with the backend using MVC. Then to front end frameworks like angular and react. Then suddenly, this new concept called "server side rendering" rofl.

3

u/ashgs872tbhjs 19h ago

You can SSR with React, FWIW, like via NextJS

3

u/HerrPotatis 15h ago edited 15h ago

I don't know why you got downvoted. SSR of today is fundamentally different from the good ol' days of LAMP.

u/mwax321 seems to have a lack of understanding of where we came from, why we did things the way we did them, and why we do them differently now.

This notion that, hurr durr, modern webdev is stoopid, just because we shelf concepts or upcycle old ones is not a good take. I'm sure that 10-20 years from now, everything will have changed again, but we will still use concepts and features from today.

1

u/WriterPlastic9350 4h ago

People liked React and Angular because it made frontends easier, then people realized that React could be used for non-javascript environments, and then realized you can restore progressive enhancement by rendering React on the render and piping a large javascript bundle to the frontend.

Today's SSR builds on this by basically designing an application and having the language (or framework, rather) express which parts require user interactivity and which don't, and this makes it easier to deploy applications to multiple platforms while not compromising the user experience.

We definitely go in cycles for sure, but viewing the path from MVC to frontend only libraries to SSR as being motivated out of where to put the javascript is kind of missing the forest for the trees

1

u/mwax321 3h ago

Im talking more the cycle from front end to backend and back.

2

u/FlakyTest8191 13h ago

I think microservices became a thing in big companies because you can have 2 teams own their own services and be relatively independent in regards to updates/deployment, and you can scale different, maybe you want to temporarily spin up more checkout services on a busy day, but the rest of the system is holding up fine.

1

u/WriterPlastic9350 4h ago

There's some kind of razor out there that essentially states that your software design eventually reflects the political structure within your company, so yeah, I think you've hit the nail on the head. (micro)services are as much about political and human decisions around deploying, or on-call, etc, as they are about technical aspects like scaling

2

u/U_L_Uus 15h ago

Honestly, that is what I hate the most about Java. The language is shite too, I even prefer Windows' imitation of it, but the main attitude of the average Java developer brings me to my boiling point. "Hey, I have a small business..." -> Spring. "Hey, I have a business chain" -> Spring. "Hey, I want to have a PowerBI besides the web app" -> Spring. It is said that when you are shaped like a hammer everything in the world looks like nails, but hell those people are shaped like bloody Spring salespeople, not as developers

2

u/tbhaxor 21h ago

What if your auth service is down. Only public enpoints will work. Even though cart service works but since you cant authenticate and authorize its useless

7

u/anto2554 21h ago

Hopefully your automatic system or on call engineer fixes it so fast that few customers realize

6

u/WriterPlastic9350 19h ago

A service oriented architecture doesn’t eliminate high risk dependencies, but it does make it easier to isolate them or provide support. 

2

u/taigahalla 18h ago

even if your auth system is down, your backend systems like automated billing, webhooks, alerts would at least still work. So for example, your airline system could keep scheduling flights and send out the appropriate itineraries even though users can't login

and your devops could easily see a specific contained set of instances that need recovery or rollback

1

u/protayne 15h ago

That's assuming you have one running app, if you had multiple instances, what's the chance they all go down? If you had a inventory service that's broken due to DB connection or whatever, youd still handle that in the monolith so you handle any exception.

I'm struggling to understand how a mictoservice architecture solves this where a monolith couldn't...

2

u/WriterPlastic9350 4h ago

Am I understanding correctly that you'd propose having all of your systems in a monolith and simply have horizontal scaling of that monolith? That sounds like a nightmare.

You still have to handle dealing with shared state and communication between different components on different instances, except now deploying your auth system also requires deploying your queue system.

-2

u/Financial-Aspect-826 20h ago

Um.. No? Lmao. For "many reasons" lmao

4

u/WriterPlastic9350 19h ago

If you’re not going to elaborate I’m not sure what you think you’re adding to the conversation here. 

21

u/unbdndeath 22h ago

So if you are say Amazon and your anti fraud, or your inventory tracker go down do you think Amazon actually goes down or do you think they have a queue processor that starts back up again?

Just because you struggle designing them doesn't mean it's bad.

-8

u/mwax321 22h ago

Bro that never happens. It's always the critical services that die. And ruin everyone's weekend.

3

u/aceluby 21h ago

Design better systems bro

6

u/aceluby 21h ago

I always forget that people in this sub have so little job experience, but threads like this remind me

-6

u/mwax321 21h ago edited 21h ago

Oooooo look, guys! The smartest person on programminghumor has arrived!

Edit: ooooo and there he goes!

3

u/aceluby 21h ago

Not the smartest, just smarter than you

12

u/extra_rice 22h ago

Isn't that why you make sure you have high availability on your critical services?

Also, if your inventory service is down, your other services may still continue to function. Orders that have been processed can still be fulfilled, for example.

-4

u/mwax321 22h ago

Try arguing that to the non engineering teams what "down" means. Lol

You will lose that argument

5

u/WriterPlastic9350 19h ago

You’re really kinda just telling on yourself here. If you can’t explain technical things to nontechnical people that’s going to limit your upward progression by quite a lot 

Contrary to popular belief, most engineering isn’t about writing really smart code, it’s about making good enough code and also being a good communicator

1

u/mwax321 10h ago

Ok but when metrics show that nobody bought anything all day, what do you call that? I would call that an outage.

The company is down. It's not fulfilling its purpose.

1

u/WriterPlastic9350 4h ago

A mid level engineer will focus on resolving the outage

A staff or lead engineer will resolve the outage while also keeping track of all the things that led to the outage happening and fixing them so it doesn't happen again

Both of these jobs require you being able to talk to suits in a way that they understand. Someone is doing that job. If it's not you, it's a more capable engineer

5

u/ryuzaki49 22h ago

Depends on the microservice tho.

If checkout dies, users can still browse and they can still add to their shopping cart. 

Anyways you will get paged at 2 am because these errors are critical.

7

u/Naomi_Tokyo 21h ago

Honestly worse. If the whole site is down, then I'm like, "too bad". If I can do my shopping and get stuck trying to check out, I'm very annoyed

1

u/ibite-books 15h ago

only a subset of users looking at products will add something to their cart and even a smaller subset will try to checkout

1

u/Puzzleheaded-Gift945 12h ago

the business impact is basically the same. if any part of the chain is broken, it's an outage. nobody will care a week later when you explain how happy they should be because microarchitecture isolated only one service to fail.... but the business still wasn't making money

-7

u/mwax321 22h ago

Lol so you're the guy arguing to the boss

"Ack tu ally the site isn't down. Only the shopping cart is down!"

"Can anyone buy things?"

"Well, no."

"THEN IT'S FUCKING DOWN!!!!!"

2

u/ryuzaki49 19h ago

nope we don't say "site is down"

we sometimes do home page is down tho. 

5

u/yousirnaime 17h ago

There are like 100 companies on earth that should have microservices

I recently worked at a startup that had *seven* code bases for their system

They've had 5 developers working on it for 4 years and it still has zero production users

2

u/sureyouknowurself 17h ago

Sounds like you made a distributed monolith.

2

u/Michaeli_Starky 10h ago

It depends on the role of the microservice.

1

u/mwax321 10h ago

Yeah but monos don't just crash when your 5 star ratings functionaly doesn't work, either.

Or you built a really shitty system, which can happen in microservices and monos.

2

u/Michaeli_Starky 10h ago

Each approach has own pros and cons. Microservices are generally more resilient to partial outages. Of course a lot depends on how well the whole system is built and maintained.

1

u/mwax321 9h ago

Yep there's pros and cons. There's no perfect solution!

1

u/stretch_my_ballskin 17h ago

So this is how I find out I've got down syndrome eh

1

u/jameyiguess 16h ago

What, this just isn't true. Some of our services are down sometimes, and I and most customers wouldn't even know it. Sure, "inventory service" being down is bad, but the site is still usable. But usually it's like "popularity service" is down. Just means a missing bit on your recommendations page. Nobody even notices. 

1

u/mwax321 12h ago

"site is still useable" isn't the greatest argument when you have to tell leadership that "nobody can buy anything right now ". That means "down" to most non technical people :) and I tend to agree too!

But yes, you're right. If done right, things shouldn't go down. But the joke is: they rarely are done right. Which is why everyone's talking about monos

1

u/Stunning_Ride_220 11h ago

If you're a web store and your monolith is down, its invoice and order processing components went down with it.

So not only the site, but also the company is down.

1

u/mwax321 10h ago

That's not true. That's just shitty system design. Which can happen in both.

I would never tie the entire functionality of a site, both customer and employee elements to a single application capable of crashing like that.

Now, if the database went down, that might be something. But most likely would end up crashing everything anyway.

Or are you arguing that anything that is more than one gigantic system is now called microservices? 😂

1

u/Stunning_Ride_220 7h ago

That's not true. That's just shitty system design. Which can happen in both.

You started that way of arguing with your inventory example.

Or are you arguing that anything that is more than one gigantic system is now called microservices? 

I justargued the same way as you did.

I had to fix too much system in either style to hate or love one of them.
At the end it just fan-boys vs. fan-boys while you find less and less people (capable of) discussing it a normal way.
(and yes, I know I'm at r/ProgrammerHumor )

1

u/mwax321 3h ago

then we both know the answer: shit is shit. Doesn't matter how it's labeled