skip to Main Content

Consider a scenario my application needs only 100 jedisPool connections to fetch data from redis server. What happen if I configure 500 as max pool size keeping in mind that my application needs more connections in future. Does it affect the redis performance. If yes, what is the severity of this problem?

Thanks in advance

2

Answers


  1. To my understanding, the max pool size is just a max limit.
    If you set it to 500, and your APP only needs 100, the pool will not actually create 500 connections int it. So i guess this will not affect performance issues to your case.
    And there are other params to manage the connections:
    config.setMaxIdle();
    config.setMaxTotal();

    you may make a test, and use cmd “info” to see the connections.

    Login or Signup to reply.
  2. The default max clients for Redis is 10000, you can check it with CONFIG GET maxclients. So if you ever get to 500 connections is quite manageable. If you will have multiple Jedis clients then consider the product nodes*maxTotal. See https://redis.io/topics/clients

    You can expect a soft performance decrease as your number of clients increases. You probably want to run some benchmarks.

    I tried redis-benchmark -t set -r 100000 -n 1000000 -c 500 where -c 500 is the number of clients. From 50 to 500 clients I got a 12% decrease in requests-per-second.

    Check this out for JedisPool optimization.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search