Hacker News new | ask | show | jobs
by kqueue 5812 days ago
Event driven servers should not block on disk i/o, dns queries, or db calls [by using/writing async libs]. At least the well written ones. Else the Server Is likely to be dos-ed. The author is wrong in using a db call as an example. Secondly, the author totally ignored the time it takes to launch a thread vs not launching one at all in an event driven model and that affects the # of new connections/sec. Finally, switching between threads is not a very cheap operation since it causes a context switch, which directly affect the response time of the server.