Re:Why choose async/await over threads?
by baq on Monday March 25, 2024 @05:32AM
(#39814201)
Backend JS just spins up another container and/or lambda and if it's too slow and requires multiple CPUs in a single deployment, oh well, too bad.
[ Parent
| on HN ]
Re:Why choose async/await over threads?
by zelphirkalt on Monday March 25, 2024 @06:22AM
(#39814457)
That is of course a huge overhead, compared to how other languages solve the problem.
Re:Why choose async/await over threads?
by fennecfoxy on Wednesday March 27, 2024 @06:47AM
(#39837469)
Backend JS does whatever the hecky you _want_ it to do.
The Cluster module has been around for a long time: https://nodejs.org/api/cluster.html
Tbf a lot of the time you're running it in a container and you allocate 1 vcpu there, only downside is maybe a little extra memory overhead. And for most lambdas I think they're suited to being single threaded (imo).