Read performance improvement:
Instead of using a blind readLen, use readLen from last read which gives a better sense of what’s going on the sender side.
Keep track of average instead of individual read lengths.
Bug fix: missing writes when the client haven’t connected to the local slave yet.
Separate threads for read and write scheduling.
Ask GetReadTokens in batches.