Comment by jbryu
20 hours ago
I'm somewhat buffering right now - Everytime the current turn player types I buffer their input on the backend, and I have a job setup that broadcasts typing events every ~200ms using this buffer.
I could increase this interval, but I'd like to keep it as short as I can afford to to keep that realtime feel (i.e. other players can see what the current turn player is typing).
Are your sockets in blocking or non-blocking mode?
If you are sequentially sending updates to each client in blocking mode, one single slow client will block execution and slow everything down for everyone. Basically forcing all clients to run as slowly as the slowest client.
In non-blocking mode, only the slow client will suffer. You will need to buffer the output individually per client because each one will consume the data at different rates.
Are you already using libuv?
You should also consider making typing updates unreliable or at least less reliable since they presumably aren't critical for gameplay e.g. dropping typing updates to a client if their send buffer is full will drastically improve performance on slow connections.