Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use TCP_NODELAY for improved latency
According to the NSQ protocol, consumers have to send `FIN`s for every message they receive, which makes them extremely slow with low `max_in_flight` values due to TCP buffering. Adding TCP_NODELAY option on `async.AsyncConn`'s sockets makes `nsq.Reader` substantially faster. My tests show increase from ~50 to ~4.5K messages per second on localhost.
- Loading branch information