Skip to content

Comment on An open question (rant) about Node.jsparent

Comments

Try to do that on a production server that has to handle 1000 requests readFileSyncing at the same time ...

sync apis are just a conveniance for console applications, they are not meant for a web server.

So yes node.js DOES impose async programming for everything or node doesnt scale.

Sync is great for initialization. Due to the fact you only start up once, you can be as reckless with your performance hindering practices as much as you want as it will never amount to anything more than a few hundred extra milliseconds of startup time.

Sync is great for initialization.

This is an interesting point. I've found in practice that the speed of server startup times depends on the scale of operations. For example, at a small scale, a 600 ms vs. a 1.2 sec startup makes little difference.

However, at scale such differences can matter. More so when something is going wrong that's causing erratic restarts.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.