Hacker News new | past | comments | ask | show | jobs | submit login

Almost all modern frameworks allow a request to be executed on multiple cores, though if all you're doing is HTML/JSON rendering there would very rarely be any performance advantage to doing so (though if there's an async point it will probably happen, i.e. one core will execute the part up until the call to the backend and then a different core may well pick up the continuation when the result comes back). The actual compute time to render HTML/JSON is utterly minimal (even if you're doing it in a super-slow language like Ruby or Python that requires a hashtable lookup for every function call); if you're doing linear algebra in your web frontend then you'll notice slowness (especially as a lot of SoCs may not have much FPU), but for typical frontend workloads the CPU usage is just utterly irrelevant compared to the cost of the backend I/O.



I understand how to use async for backends, I wrote quite a little bit about it [1]

"one core will execute the part up until the call to the backend and then a different core may well pick up the continuation when the result comes back"

This surely helps for one request if your backend or all your microservices are all on one machine, and you have several cores. But if you have your microservices on different machines, multi core will not help you speed up one request if it does not break down rendering of a page in chunks and distribute them to cores (and e.g. combine them with something like Facebook BigPipe (2010 tech)).

And yes multiple cores help with SEDA architectures but request and url parsing (which might be a SEDA stage) is too fast to have any real impact.

[1] http://codemonkeyism.com/a-little-guide-on-using-futures-for...


So what is it that you think is going to make a web app perform poorly on these cheap servers? They're slow, but they're nowhere near slow enough that the time taken to render HTML for a realistic page on one of these cores is going to be a bottleneck. Each individual core has poor throughput, but there are a lot of cores. Doing a bunch of backend calls in series for a single page will make your webapp slow but that's always true, don't do that (likewise microservices). If you're doing heavy compute for a single request then yes your system will perform poorly on these servers, but that's not usual for a web workload.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: