github redis/node-redis v.2.2.0
The peregrino falcon

latest releases: redis@4.6.13, client@1.5.14, redis@4.6.12...
8 years ago

The peregrino falcon is the fasted bird on earth and this is what this release is all about: Increased performance for heavy usage by up to 400% [sic!] and increased overall performance for any command as well. Please check the benchmarks in the README.md for further details.

Features

  • Added rename_commands options to handle renamed commands from the redis config (@digmxl & @BridgeAR)
  • Added disable_resubscribing option to prevent a client from resubscribing after reconnecting (@BridgeAR)
  • Increased performance (@BridgeAR)
  • exchanging built in queue with @petkaantonov's double-ended queue
  • prevent polymorphism
  • optimize statements
  • Added .batch command, similar to .multi but without transaction (@BridgeAR)
  • Improved pipelining to minimize the RTT further (@BridgeAR)

Bugfixes

  • Fix a javascript parser regression introduced in 2.0 that could result in timeouts on high load. (@BridgeAR)
  • I was not able to write a regression test for this, since the error seems to only occur under heavy load with special conditions. So please have a look for timeouts with the js parser, if you use it and report all issues and switch to the hiredis parser in the meanwhile. If you're able to come up with a reproducable test case, this would be even better :)
  • Fixed should_buffer boolean for .exec, .select and .auth commands not being returned and fix a couple special conditions (@BridgeAR)

If you do not rely on transactions but want to reduce the RTT you can use .batch from now on. It'll behave just the same as .multi but it does not have any transaction and therefor won't roll back any failed commands.

Both .multi and .batch are from now on going to cache the commands and release them while calling .exec.

Please consider using .batch instead of looping through a lot of commands one by one. This will significantly improve your performance.

Here are some stats compared to ioredis 1.9.1 (Lenovo T450s i7-5600U):

                  simple set
      82,496 op/s » ioredis
     112,617 op/s » node_redis

                  simple get
      82,015 op/s » ioredis
     105,701 op/s » node_redis

                  simple get with pipeline
      10,233 op/s » ioredis
      26,541 op/s » node_redis (using .batch)

                  lrange 100
       7,321 op/s » ioredis
      26,155 op/s » node_redis

                  publish
      90,524 op/s » ioredis
     112,823 op/s » node_redis

                  subscribe
      43,783 op/s » ioredis
      61,889 op/s » node_redis

To conclude: we can proudly say that node_redis is very likely outperforming any other node redis client.

Known issues

  • The pub sub system has some flaws and those will be addressed in the next minor release

Don't miss a new node-redis release

NewReleases is sending notifications on new releases.