We're just issuing an echo here, which is the simplest command in the Gearman protocol. You send an echo packet to the server, the server responds back with what you sent it. The numbers here give a sense of how much overhead different approaches are adding.
The test here is with the word "ping". Substantially larger payloads are likely to be interesting, along with measures on time-to-first packet in the reply, as the node.js implementation is streaming end-to-end and will start replying before the original echo request actually completes. This also means that the entire echo body never need be held in memory.
-
Client, server in one process, no packet encode/decode:
echo: 4.07 wallclock secs @ 12289.63/s (n=50000)
-
Client, server in one process, stream stubs: