Hi, We're using nodejs to perform writes to redis and in this case we want to send the same set operation to multiple N servers and wait for all servers to respond so we can ensure high consistency of our data.
If we run the official node_redis client benchmark ( https://github.com/mranney/node_redis/blob/master/multi_bench.js) for one redis server, then we get very high throughput rates as expected for example : SET large str, 1/5 min/max/avg/p95: 0/ 2/ 0.58/ 1.00 11673ms total, 1713.36 ops/sec SET large str, 50/5 min/max/avg/p95: 0/ 5/ 1.45/ 2.00 584ms total, 34246.58 ops/sec SET large str, 200/5 min/max/avg/p95: 0/ 11/ 5.48/ 9.00 549ms total, 36429.87 ops/sec SET large str, 20000/5 min/max/avg/p95: 226/ 422/ 304.96/ 415.00 601ms total, 33277.87 ops/sec We've modified the multi_bench test to set into different servers as follows: var exec = 0 var c = this.clients[cur_client].length for(var i in this.clients[cur_client]){ var cli = this.clients[cur_client][i] cli[this.args.command](this.args.args, function (err, res) { if (err) { throw err; } exec++; if(exec == c){ self.commands_completed++; self.command_latency.update(Date.now() - start); self.fill_pipeline(); } }); We were expecting a notable decrease response times in consequence of the replication, but unfortunately, times were way lower than expected. Results sending operation to 3 redis nodes: SET large str, 1/15 min/max/avg/p95: 0/ 3/ 0.73/ 1.00 14739ms total, 1356.94 ops/sec SET large str, 50/15 min/max/avg/p95: 0/ 7/ 3.72/ 5.00 1491ms total, 13413.82 ops/sec SET large str, 200/15 min/max/avg/p95: 1/ 24/ 13.95/ 20.00 1401ms total, 14275.52 ops/sec SET large str, 20000/15 min/max/avg/p95: 225/1468/ 989.14/1410.55 1747ms total, 11448.20 ops/sec Is this a nodejs limitation?. Is there something in our code we can change to improve this test?. Thanks in advance, Marcos. PS: We used 2048k data size in all our tests as we're expecting to handle that amount of data. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
multi_multi_bench.js
Description: JavaScript source
