cube icon indicating copy to clipboard operation
cube copied to clipboard

Add redisPool `numTestsPerEvictionRun` option

Open rongfengliang opened this issue 4 years ago • 3 comments

Is your feature request related to a problem? Please describe.

redisPool use node-pool npm package. default numTestsPerEvictionRun=3 maybe too small if we have many requests

with numTestsPerEvictionRun option we can control how fast redis connections will be released. if posible i can make pr

some links

https://github.com/coopernurse/node-pool

rongfengliang avatar Apr 18 '21 10:04 rongfengliang

@rongfengliang Yeah. Makes sense to make it ~200-300. Need to test it thoroughly though. cc @ovr

paveltiunov avatar Apr 20 '21 02:04 paveltiunov

Yeah, it's a good idea, but there are some things, that should be done to fix stability of the RedisPool:

  1. numTestsPerEvictionRun
  2. I think we should use maxWaitingClients to protect an unexpected case when there are promises that are waiting for a free connection. Probably, it should max * 3
  3. Finish with release https://github.com/cube-js/cube.js/pull/2575
  4. test connection after releasing.

ovr avatar Apr 26 '21 19:04 ovr

👋 a quick reminder that we will be replacing Redis with Cube Store as announced in this blog post.

rpaik avatar Jul 28 '22 05:07 rpaik

I believe that this issue is not relevant anymore since Cube Store has replaced Redis for query queue and cache management.

Docs: https://cube.dev/docs/product/deployment#redis

Announcement: https://cube.dev/blog/how-you-win-by-using-cube-store-part-1

igorlukanin avatar Sep 01 '23 12:09 igorlukanin