In Artanis, the request handling could be scheduled when the socket buffer is full (depends on server.bufsize). And let other request’s handler run. Just like the scheduling of OS but it’s in the userland.
So if it’s the buffer issue when scheduling, then there’s no way to flush before break since we can’t tell if the scheduling caused by buffering or blocking.
Ragnarok takes advantage of SO_REUSEPORT introduced since GNU/Linux 3.9 to provde a feature named server.multi which could be enabled in config. This feature allows users to start several Artanis instances which are all listenning on the same port to take advantage of multi cores. And the events are dispatched by the Linux kernel.
(to be continued …)