Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Every year, the Hungarian ministry of education organizes a "competency test". It works like any other central test, they tell the schools to make students fill it out at 8am on a particular day.
Last year it was online; half a million children clicked the button within 2 minutes, infra goes poof.
Not to worry, it's not a local issue so we can just prepare better and have them redo it. Two weeks later, half a million children were made to click the button at 8am again. Infra goes poof. -
If there is a company in Hungary that can build software for that kind of concurrency, it's not the one owned by the PM's son-in-law.
-
Voxera115732yOf cause you should do that, its called stress testing :P
But yes you should make sure your solution can handle it.
On the other hand, designing it to handle that much extra also hardens it because reality often does not play by the rules we setup. -
sam941162yIdk if scaling up is the right solution ... But that's just me
So when user clicks a button I assume it triggers a rest call to your backend
If your backend is already under stress and is not having enough resources to accept the request ... Can it not just throttle it ?
You can embed some exponential retry in your client layer when api gets throttled
Sure your user will experience latency but from what i experienced the request will still not be lost -
60 users? what is your backend server for, ants? to be fair, i have no idea what the computation load is behind said button, but something sounds really off here
-
Voxera115732y@fullstackclown I agree, and if whatever that button really is that heavy it probably should not run synchronously but rather async so that the button just queues up the action.
-
@fullstackclown It's a 10K$/month infra :)
I'm still looking like "what the fuck ?!!!"
"Button" is more of an example, but it's a good example :)
It toped the Premium 500 DTUs database on Azure (2.2K/month). -
@NoToJavaScript ah so you're running some sort of large GPU model - image or video production if I had to guess?
Never tell 60 users on a demo to "click on this button" at the same time.
Infra went "poof". No time to auto scale in this scenario.
Usual usage of app : 4 to 5 personns who do actions in the windows of 2 seconds.
rant