You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As I mentioned in my other post, I've been playing around with ngx_mruby a fair bit over the past few days and so far, until I got to Redis, I couldn't see any meaningful performance difference between Lua and mruby. Certainly nothing siginificant enough to make me not choose to write Ruby over Lua. 😉 That is, until I got to Redis.
I use Redis as a distributed rate limiter and in the OR world, have benchmarked it well into the 20k rps range on a single instance. With mruby_redis, it seems as though I am getting approx. half the performance. On my local machine the lua implementation performs around 9k rps, while the mruby version is around 4.5k rps. One difference right off the bat is that I don't think mruby-redis supports any async features at the moment, correct? While the OR Redis client is all properly non-blocking. So this is not a very fair comparison.
I saw an old pr where you had been playing around with it but ultimately closed it. Is there any intention to resurrect an async Redis client in any way? I did see that @Asmod4n's library has an async client but have not tested it yet. That was going to be my next task. Edit: it looks like the mruby-hiredis gem needs mruby 3 (mruby 3 changed some number handling), so this is not an option.
Thanks again.
The text was updated successfully, but these errors were encountered:
Hello again @matsumotory!
As I mentioned in my other post, I've been playing around with
ngx_mruby
a fair bit over the past few days and so far, until I got to Redis, I couldn't see any meaningful performance difference between Lua and mruby. Certainly nothing siginificant enough to make me not choose to write Ruby over Lua. 😉 That is, until I got to Redis.I use Redis as a distributed rate limiter and in the OR world, have benchmarked it well into the 20k rps range on a single instance. With
mruby_redis
, it seems as though I am getting approx. half the performance. On my local machine the lua implementation performs around 9k rps, while the mruby version is around 4.5k rps. One difference right off the bat is that I don't thinkmruby-redis
supports any async features at the moment, correct? While the OR Redis client is all properly non-blocking. So this is not a very fair comparison.I saw an old pr where you had been playing around with it but ultimately closed it. Is there any intention to resurrect an async Redis client in any way? I did see that @Asmod4n's library has an async client but have not tested it yet. That was going to be my next task. Edit: it looks like the
mruby-hiredis
gem needs mruby 3 (mruby 3 changed some number handling), so this is not an option.Thanks again.
The text was updated successfully, but these errors were encountered: