In connection.js -> processRequest this implementation is faster.
if (request.data) connection.write(request.command + '\r\n' + request.data + '\r\n');
else connection.write(request.command + '\r\n');
Using 2 writes instead of only one usually causes this ( on the memcache side ):
read(72, 0x7f6b7d72304f, 3) = -1 EAGAIN (Resource temporarily unavailable)
It tries to read the bytes but they are not available, still it waits and tries again , and the second time the correct data is received ( however in set, for example, it may or may not succeed ). Sending it all at once solves this problem and makes the command perform faster
In connection.js -> processRequest this implementation is faster.
if (request.data) connection.write(request.command + '\r\n' + request.data + '\r\n');
else connection.write(request.command + '\r\n');
Using 2 writes instead of only one usually causes this ( on the memcache side ):
read(72, 0x7f6b7d72304f, 3) = -1 EAGAIN (Resource temporarily unavailable)
It tries to read the bytes but they are not available, still it waits and tries again , and the second time the correct data is received ( however in set, for example, it may or may not succeed ). Sending it all at once solves this problem and makes the command perform faster