2 ms·
>What’s the point of multithreading if your app is going to spend 99% of its time waiting for data to arrive over a socket? What's the point of building an app
by crimsonalucard 9y ago
>What’s the point of multithreading if your app is going to spend 99% of its time waiting for data to arrive over a socket?
What's the point of building an app if this is what it's doing. Obviously this is not the case for the majority of web services. The minimum viable requirement for a robust website is that it can serve requests without blocking itself. You don't get this with a single threaded process.
The reactor model popularized by nodejs and nginx is the alternative exception to the concurrency model of traditional servers. At best the only type of memory you can use the app itself for is caching.