4 ms·
Does textbook equate to real-world, though? Don't real world applications either use a thread per socket (i.e. per TCP stream) or something like epoll? Genuine
by smaddox 8y ago
Does textbook equate to real-world, though? Don't real world applications either use a thread per socket (i.e. per TCP stream) or something like epoll?
Genuine questions, because I really don't know.
- the8472 8y agoReal world implementations would use OS-specific socketopts to create multiple listen sockets sharing the same port and then use one socket per thread.
- _wmd 8y agoYou're among the 1% of engineers who both care enough to know and actually know about these kinds of facilities. For the rest of them, whatever they got at school or off Stack Overflow is as far as it goes, unless some business priority demands something different - and even in that case "throw more hardware at it" is often the route taken
- gpderetta 8y agoThe rest of them is probably, hopefully, using some library abstraction that implement this optimization.
- blattimwind 8y agoI dunno about the BSDs but SO_REUSEPORT is a fairly recent addition. Was there a way to achieve this before then?