Merge pull request #13827 from pon0marev/improvement/redis-pool-config

Redis pool latency optimization by reducing excessive pings
This commit is contained in:
Viacheslav Klimov 2025-08-07 10:32:04 +03:00 committed by GitHub
commit 4f18df907b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 14 additions and 14 deletions

View File

@ -742,9 +742,9 @@ redis:
# Minumum number of idle connections that can be maintained in the pool without being closed
minIdle: "${REDIS_POOL_CONFIG_MIN_IDLE:16}"
# Enable/Disable PING command sent when a connection is borrowed
testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:true}"
testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:false}"
# The property is used to specify whether to test the connection before returning it to the connection pool.
testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:true}"
testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:false}"
# The property is used in the context of connection pooling in Redis
testWhileIdle: "${REDIS_POOL_CONFIG_TEST_WHILE_IDLE:true}"
# Minimum time that an idle connection should be idle before it can be evicted from the connection pool. The value is set in milliseconds

View File

@ -79,10 +79,10 @@ public abstract class TBRedisCacheConfiguration {
@Value("${redis.pool_config.minIdle:16}")
private int minIdle;
@Value("${redis.pool_config.testOnBorrow:true}")
@Value("${redis.pool_config.testOnBorrow:false}")
private boolean testOnBorrow;
@Value("${redis.pool_config.testOnReturn:true}")
@Value("${redis.pool_config.testOnReturn:false}")
private boolean testOnReturn;
@Value("${redis.pool_config.testWhileIdle:true}")

View File

@ -114,9 +114,9 @@ redis:
# Minumum number of idle connections that can be maintained in the pool without being closed
minIdle: "${REDIS_POOL_CONFIG_MIN_IDLE:16}"
# Enable/Disable PING command send when a connection is borrowed
testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:true}"
testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:false}"
# The property is used to specify whether to test the connection before returning it to the connection pool.
testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:true}"
testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:false}"
# The property is used in the context of connection pooling in Redis
testWhileIdle: "${REDIS_POOL_CONFIG_TEST_WHILE_IDLE:true}"
# Minimum amount of time that an idle connection should be idle before it can be evicted from the connection pool. Value set in milliseconds

View File

@ -147,9 +147,9 @@ redis:
# Minumum number of idle connections that can be maintained in the pool without being closed
minIdle: "${REDIS_POOL_CONFIG_MIN_IDLE:16}"
# Enable/Disable PING command send when a connection is borrowed
testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:true}"
testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:false}"
# The property is used to specify whether to test the connection before returning it to the connection pool.
testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:true}"
testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:false}"
# The property is used in the context of connection pooling in Redis
testWhileIdle: "${REDIS_POOL_CONFIG_TEST_WHILE_IDLE:true}"
# Minimum amount of time that an idle connection should be idle before it can be evicted from the connection pool. Value set in milliseconds

View File

@ -114,9 +114,9 @@ redis:
# Minumum number of idle connections that can be maintained in the pool without being closed
minIdle: "${REDIS_POOL_CONFIG_MIN_IDLE:16}"
# Enable/Disable PING command send when a connection is borrowed
testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:true}"
testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:false}"
# The property is used to specify whether to test the connection before returning it to the connection pool.
testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:true}"
testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:false}"
# The property is used in the context of connection pooling in Redis
testWhileIdle: "${REDIS_POOL_CONFIG_TEST_WHILE_IDLE:true}"
# Minimum amount of time that an idle connection should be idle before it can be evicted from the connection pool. Value set in milliseconds

View File

@ -115,9 +115,9 @@ redis:
# Minumum number of idle connections that can be maintained in the pool without being closed
minIdle: "${REDIS_POOL_CONFIG_MIN_IDLE:16}"
# Enable/Disable PING command send when a connection is borrowed
testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:true}"
testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:false}"
# The property is used to specify whether to test the connection before returning it to the connection pool.
testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:true}"
testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:false}"
# The property is used in the context of connection pooling in Redis
testWhileIdle: "${REDIS_POOL_CONFIG_TEST_WHILE_IDLE:true}"
# Minimum amount of time that an idle connection should be idle before it can be evicted from the connection pool. Value set in milliseconds

View File

@ -114,9 +114,9 @@ redis:
# Minumum number of idle connections that can be maintained in the pool without being closed
minIdle: "${REDIS_POOL_CONFIG_MIN_IDLE:16}"
# Enable/Disable PING command send when a connection is borrowed
testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:true}"
testOnBorrow: "${REDIS_POOL_CONFIG_TEST_ON_BORROW:false}"
# The property is used to specify whether to test the connection before returning it to the connection pool.
testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:true}"
testOnReturn: "${REDIS_POOL_CONFIG_TEST_ON_RETURN:false}"
# The property is used in the context of connection pooling in Redis
testWhileIdle: "${REDIS_POOL_CONFIG_TEST_WHILE_IDLE:true}"
# Minimum amount of time that an idle connection should be idle before it can be evicted from the connection pool. Value set in milliseconds