r/devops • u/Puzzled-Ad8231 • Aug 27 '26
Discussion Users vs Stress testing
So I made a serverless optimization platform which uses the concept of fusion functions to reduce cold starts and latency across the service calls. Now, this is an implementation of a research paper that I read somewhere. Diff from paper is that my project also gets live traces and metrics from x ray and cloudwatch, so I get real-time data to give better outputs. Have a better look: https://github.com/Vaivaswat2244/OptiFuse_go
To use this you need to connect your AWS with optifuse. I.e make a cloudformation stack to give optifuse access to read the traces and metrics. This actually becomes a problem for my friends and peers to test because they are too lazy to do this step. So I have no real user testings.
People especially hiring people ask me how many real users have used your service.
Now why do I need real users when I can stress test each microservice that I've built. And I can see my manifests working properly. Its deployed on AKS and is open for people to see. I also have a Prometheus grafana observability pipeline to see if all services are working properly.
Question is: real users vs Stress tests
On a side note, I am a student looking for internships, if you found the idea interesting, lmk GitHub is Vaivaswat2244
\/
3
u/hypertradeworx Aug 27 '26
a stress test holds everything warm, so it cannot produce the thing your tool exists to fix. cold starts come from the opposite traffic shape, a long idle with one request landing on it, and load generators are bad at going quiet.
the other half is cost, and that is where we got caught. we set min-instances=1 so cold starts would stop being our problem and it bought $206 of warm empty containers before anyone read the line item, which no test would have flagged because nothing was failing. does yours report idle spend as well as latency?
3
u/hypertradeworx Aug 27 '26
halving the count is real, but one start isn't a fixed price. a fused function carries the init of every branch you folded into it, imports and clients included, so 3 fat ones can come out worse on p99 than 6 thin ones even at half the starts.
which is also the answer to the hiring question. nobody is impressed by a user count from a student project, they want init duration and cost on the same workload before and after, and you can produce that off your own account without waiting for a friend to build a cloudformation stack
2
u/hypertradeworx Aug 27 '26
lambda sizes memory per function, so a fused function has to be provisioned for its heaviest branch. fold a 128mb handler in with one that needs 1769 and every invocation on the light path bills at 1769 for the same work, roughly 13x the gb-seconds it used to cost.
so 6 down to 3 is a cost win only where the branches were sized alike to begin with. max_memory as a ceiling doesn't catch that, the per-branch delta does
2
u/hypertradeworx Aug 28 '26
cost improving directly is the bit i'd re-check. lambda bills gb-seconds, not invocations, and a fused function has to be provisioned for the fattest branch inside it. fold one 1024mb branch in with five 128mb ones and all five now run at 1024 for their whole duration, so going 6 to 3 can raise the bill while the count halves.
is memory actually in the objective for you, or is max_memory only a constraint you check the candidate against afterwards?
2
u/8lue7or Aug 28 '26
I’m dealing with something similar on a project of my own, and I don’t think stress tests and real users answer the same question.
A stress test can show that the systems survives the load you created. But, it can’t tell you whether somebody understands the setup, trusts it enough to connect an AWS account or gets enough value from the result to use it again.
The fact that your friends stop at the cloudformation step is already user feedback. It may be laziness, as you said, but it could also mean you’re asking for a lot of trust before they’ve seen anything useful.
For an internship project, I wouldn’t chase a large user number. I’d try to get one or two people through the entire flow, see where they stop or hesitate, and explain what you changed because of it.
I think that would tell an interviewer more than another synthetic load test.
1
u/hypertradeworx Aug 28 '26
is min instances anywhere in that cost function? it's the other lever people reach for on p99 and it prices completely differently, you're paying for idle rather than for starts, so an optimiser that only trades fusion against cold start will happily recommend fusing when the cheaper fix was keeping one thing warm
we ran min-instances=1 on a service almost nobody hit and it was $206 of warm empty containers by the time anyone read the line item
2
u/hypertradeworx Aug 28 '26
the count halving doesn't halve the inits. lambda inits once per execution environment, not once per function, so folding 6 into 3 means each of the 3 takes roughly double the request rate and spins up roughly double the environments. you end up near the same number of cold starts, each one now loading two branches worth of imports.
where fusion genuinely wins is the hop. a call that used to cross two functions is now in-process, and that's a p50 story you can measure today on your own account
1
u/hypertradeworx Aug 28 '26
every constraint on that list is something you can measure before the fuse. the number the solver actually needs is the init duration of a function that does not exist yet, and that one is not in x-ray until you deploy it.
what does it assume there, sum of the branch inits or the max? sum overstates it, the runtime and the shared imports only load once. max understates it any time two branches drag in different sdk clients
1
u/hypertradeworx Aug 28 '26
we left min-instances=1 on a low traffic service and it billed $206 in warm empty containers before anyone looked at the line item. that's the cost i'd want sitting inside max_cost, because it isn't per invocation, it's per hour whether anything calls the thing or not.
if the cost side is modelled off calls, fusion wins latency arguments that a floor of one instance would have solved cheaper, and the solver has no way to see that it lost
1
u/hypertradeworx Aug 28 '26
min-instances=1 cost us $206 in a month, for warm containers on a service almost nobody was hitting. that's the price of just never cold starting, and it's what fusion has to beat to be worth the coupling, so i'd put it in the search as an option rather than leaving it outside
1
u/hypertradeworx Aug 28 '26
the live metrics are the input i'd stress, since that's the part the paper doesn't have. x-ray's default sampling rule is one trace a second plus 5% of everything above that, so on a service with real traffic the cold starts sitting in your trace set are a thin and fairly arbitrary sample of the ones that actually happened, and init duration is the one term in the objective you can't afford to fit off a handful of survivors.
do you read init duration out of traces or out of the REPORT line in cloudwatch logs? logs get every invocation, sampling never touches them