Re:My £4 a month server can handle 4.2M requests a day
by dimitrios1 on Tuesday September 07, 2021 @07:42PM
(#28451192)
If I look at traces of all the service calls at my company within our microservices environment, the "meat" of each service is a fraction of the latency -- the part that's actually fetching the data from a database, or running an intense calculation. Often times its between 20-40ms
Everything else are network hops and what I call "distributed clutter", including authorizing via a third party like Auth0 multiple times for machine-to-machine token (because "zero trust"!), multiple parameter store calls, hitting a dcache, if interacting with a serverless function, cold starts, API gateway latency, etc...
So for the meat of a 20-40 ms call, we get about a 400ms-2s backend response time.
Then if you are loading a front end SPA with javascript...fugetaboutit it
But DevOps will say "but my managed services and infinite scalability!"
Re:My £4 a month server can handle 4.2M requests a day
by scns on Wednesday September 08, 2021 @06:11AM
(#28455131)
Like this? https://www.youtube.com/watch?v=y8OnoxKotPQ
Re:My £4 a month server can handle 4.2M requests a day
by dimitrios1 on Wednesday September 08, 2021 @09:09AM
(#28456429)
Exactly like that.
It turned out that the dashboard had been built on top of Wordpress. The way that it checked if the user had permission to access the dashboard was to query all users, join the meta table which held the permission as a serialized object, run a full text search to check which users had permission to access this page, and return the list of all users with permission to access the page. Then, it checked if the current user was in that list.
I switched it to only check permissions for the current user, and the page loaded instantaneously.