While epoll() is a clever interface for handling hundreds of thousands of ongoing connections, it seems badly designed for efficiently coping with hundreds of thousands of <i>short-lived</i> connections.<p>Every time a new connection is established, you need to make a syscall to add that new FD to the epoll set. Each syscall can only register one FD at a time. If your server is accepting thousands of connections a second, it's very likely that you are going to accept() many new connections on each event loop around epoll_wait(). This leads to lots and lots of syscalls, which although quite fast on Linux, is still not going to be greatly efficient.<p>Compare to FreeBSD's kqueue/kevent architecture: It's broadly similar to epoll, but you only need to make one syscall per loop: you call kevent() with a changelist of FDs, and it will return a list of all new events across the new + existing FDs in the set.