Re:Modern Javascript: Everything you missed over the last 10...
by kaba0 on Saturday May 15, 2021 @08:47PM
(#27170268)
A typical most basic website, awaiting requests and serving static/dynamic content is not a short-living process, I don’t see what is controversial about that.
[ Parent
| on HN ]
Re:Modern Javascript: Everything you missed over the last 10...
by chrisweekly on Sunday May 16, 2021 @08:23AM
(#27173194)
"[A long-running, traditional server process] awaiting requests... is not a short-living process."
That's an irrelevant tautology; the question was why you believe a long-running traditional server process is necessary.
Re:Modern Javascript: Everything you missed over the last 10...
by catlifeonmars on Saturday May 15, 2021 @11:25PM
(#27170940)
At the end of the day, most web servers are about serving requests. A short lived function model fits that more closely.
Re:Modern Javascript: Everything you missed over the last 10...
by kaba0 on Sunday May 16, 2021 @03:39AM
(#27171947)
So you think starting up a whole process, establishing connections to a db and serving the request would have any sort of acceptable latency and/or throughput? At that point, you could write your server in bash as well.. also, I think it would be ridiculously expensive.
Lambda is great for seldom run functions, like running some analysis/conversion on user uploaded profile pictures or the like.
Re:Modern Javascript: Everything you missed over the last 10...
by catlifeonmars on Friday May 28, 2021 @01:29AM
(#27312038)
Lambda containers serve multiple requests. You just write the code as if you were handling a single request. And on the contrary, Lambda latency is worst when you have spiky traffic patterns (such as for a seldom run function). Of course, if you can tolerate the cold start latency overhead, Lambda is also a cost effective solution for those seldom run functions.
Also, specifically for Aurora, Lambda supports transparent connection pooling. It is just no longer a concern of your application code.
Disclaimer: I work on serverless services at AWS. I’m definitely biased :)
Re:Modern Javascript: Everything you missed over the last 10...
by kaba0 on Friday May 28, 2021 @06:47AM
(#27313824)
Thanks for the correction! My point was not at all to “bash” Lambdas, just to point out the (in my opinion) incorrectness of grand(grand?)parent’s comment.
Though I suppose Lambdas don’t use separate traditional OS processes to serve requests, do they?
Re:Modern Javascript: Everything you missed over the last 10...
by chrisweekly on Sunday May 16, 2021 @08:14AM
(#27173143)
To answer your (intended-to-be-rhetorical) question: yes! NextJS webapps deployed to Vercel / AWS lambdas have excellent performance characteristics.