rethink-java-driver
rethink-java-driver copied to clipboard
Set TCP_NODELAY on the RethinkDB connection to avoid Nagle's algorithm delay
We were seeing simple local gets (which should have taken ~1ms according to the query profiler) take ~40ms with this driver. @danielmewes suggested setting TCP_NODELAY on the SocketChannel to avoid delays caused by Nagle's algorithm. This fixed our problem.
This fix should be strictly positive for response times.