Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It is about multi request concurrency/parallelism.

If 20 users log in at the same time node and php would behave very differently.

Php would start 20 processes/threads and execute each in independently.

Node would dispatch 20 Request events to the event loop in the same process.

I will not argue the advantage of server-side async, but here it is clear that node needs it, as those 20 database queries will be executed from the same thread. Without async the 20th user would have 20 times as much latency as the first.



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

Search: