

I assume this is caused by the printf style API. Why it gets defeated by other clients I can only guess. In theory, C with Hiredis should be the top performer. On the other hand Java performed very well - better than C. Disappointingly Javascript wasn't capable of executing the benchmark as described and I had to split the 1,000,000 commands in 10 pipelines of 100,000 commands each.
RUBY REDISCLIENT DRIVER
Fortunately, the C/Hiredis driver changes the picture.įor Javascript, I tried both Node.js and io.js. Using redis-rb with a plain Ruby driver is sad.
RUBY REDISCLIENT DRIVERS
Ruby's redis-rb client supports different drivers and performs accordingly. awesome!īut also the other results I find fascinating. This graph makes the numbers easier to grasp:Ĭrystal-Redis takes the performance crown. ResultsĪfter these improvements and measuring more clients/languages, the results are: Language Surprisingly, Go with the Redigo library outperformed C with Hiredis, the officially recommended client library for C.Īry, the Crystal founder, was so friendly to help with Crystal-Redis' performance and tweaked Crystal itself - which improved the result greatly. Since I was learning Go on the side, I ported this benchmark to two Go clients. As hoped and expected, Crystal was much faster than Ruby, and slightly slower than C. Initially, I measured Crystal-Redis against Ruby and C. It focuses the measurement on the overhead caused by the client library and by the programming language. This is great for a benchmark because it minimizes the impact of the operating system. Pipelining means that the client queues up all requests, sends them in one big batch, and then receives all responses in another batch. The benchmark does the following: It connects to Redis and performs 1,000,000 Redis commands SET foo bar in pipeline mode. I built a simple benchmark and ported it.įirst I measured Crystal against Ruby and C, but then I enjoyed the process and compared also against Go, Node.js and Java. In order to know where I stand with the library, I needed to compare Crystal-Redis with other client libraries in other programming languages. Since the major reason to use Redis and Crystal is performance, I wanted to make Crystal-Redis fast. Middlewares must give block result as return value.Recently, I have published a Redis client library for Crystal called Crystal-Redis. To register a middlewares, provide callable object (object that respond to call) Middlewares are hooks that RedisCluster provide to observe RedisCluster events.

circuit_interval: How long failed count will be remembered in second.

