I keep reading this and I don't understand. ¿How can a single thread process be concurrent?
I keep reading this and I don't understand. ¿How can a single thread process be concurrent?
The select system call takes a set of file descriptors and returns which file descriptors you can read, because new data is available to read. These frameworks read from these file descriptors and dispatch the new data to a callback method. The event loop only processes one thing at a time, because it is single threaded. However, since reading from the file descriptor and processing the callback is usually fast, this scales very well. Once again, it only scales well for IO bound operations. This uses less memory than having a single thread for each HTTP request, and it definitely uses less memory than having a single process for each HTTP request.
With your answer I understand it is not concurrent but scales well anyway.