MaxScale uses epoll together with non-blocking socket descriptors. When MaxScale is notified there is something to read on a socket, it will read and handle the data until EAGAIN is returned. That is necessary as the sockets are added to epoll in edge-triggered mode. Now, if a client is capable of writing so fast that MaxScale never is able to empty the socket, then that client will be able to monopolize the thread handling that particular socket. Thus, it should be possible to not ready everything before returning to epoll and checking for sockets ready to be read.