3 ms·
> A single-threaded server is fine if you're only mildly IO bound, which is the case when you're serving files-as-resources. It's fine if you're also evented,
by masklinn 5y ago
> A single-threaded server is fine if you're only mildly IO bound, which is the case when you're serving files-as-resources.
It's fine if you're also evented, but that's not the case here, http.server literally can only interact with one connection at a time, the next connection(s) will be queued up waiting for http.server to finish its thing and accept them.
> My understanding anyway is that http.server is explicitly not for production use!
Sure, but "I'm at a lan party and have the installer for $game so we don't explode the 'net connection" is not the sort of "production use" that's intended by this statement.
Neither is "I want to open this HTML file I wrote which has a bunch of static assets booting up the webapp".
- londons_explore 5y agoIt also means a mis-configured client that doesn't close the connection can hang the server. Looking at you HttpClient-on-esp8266...