Slow gets from redisson in CommandServiceAsyncGet
See original GitHub issueHi,
We are using redisson-client 3.6.0 with cluster mode enabled with elasticache, redis=3.2.6(encryption-at-rest enabled). These are the configurations for 2 separate clusters,
{
"clusterServersConfig": {
"idleConnectionTimeout": 60000,
"pingTimeout": 1000,
"connectTimeout": 10000,
"timeout": 5000,
"retryAttempts": 3,
"retryInterval": 1500,
"reconnectionTimeout": 3000,
"failedAttempts": 3,
"subscriptionsPerConnection": 5,
"clientName": "RegularCluster",
"sslEnableEndpointIdentification": true,
"sslProvider": "JDK",
"pingConnectionInterval": 0,
"keepAlive": false,
"tcpNoDelay": false,
"loadBalancer": {
"class": "org.redisson.connection.balancer.RoundRobinLoadBalancer"
},
"slaveConnectionMinimumIdleSize": 50,
"slaveConnectionPoolSize": 150,
"masterConnectionMinimumIdleSize": 50,
"masterConnectionPoolSize": 150,
"readMode": "MASTER",
"subscriptionMode": "SLAVE",
"subscriptionConnectionMinimumIdleSize": 1,
"subscriptionConnectionPoolSize": 50,
"dnsMonitoringInterval": 5000,
"nodeAddresses": [
"redis://elastic-cache-config-end-point:6379"
],
"scanInterval": 5000,
"slaveSubscriptionConnectionPoolSize": 50,
"slaveSubscriptionConnectionMinimumIdleSize": 1
},
"threads": 25,
"nettyThreads": 50,
"codec": {
"class": "org.redisson.codec.SnappyCodec"
},
"referenceCodecProvider": {
"class": "org.redisson.codec.DefaultReferenceCodecProvider"
},
"referenceEnabled": true,
"transportMode": "NIO",
"lockWatchdogTimeout": 30000,
"keepPubSubOrder": true,
"useLinuxNativeEpoll": false
}
{
"clusterServersConfig": {
"idleConnectionTimeout": 60000,
"pingTimeout": 1000,
"connectTimeout": 10000,
"timeout": 5000,
"retryAttempts": 3,
"retryInterval": 1500,
"reconnectionTimeout": 3000,
"failedAttempts": 3,
"subscriptionsPerConnection": 5,
"clientName": "HighAvailCluster",
"sslEnableEndpointIdentification": true,
"sslProvider": "JDK",
"pingConnectionInterval": 0,
"keepAlive": false,
"tcpNoDelay": false,
"loadBalancer": {
"class": "org.redisson.connection.balancer.RoundRobinLoadBalancer"
},
"slaveConnectionMinimumIdleSize": 50,
"slaveConnectionPoolSize": 150,
"masterConnectionMinimumIdleSize": 50,
"masterConnectionPoolSize": 150,
"readMode": "MASTER",
"subscriptionMode": "SLAVE",
"subscriptionConnectionMinimumIdleSize": 1,
"subscriptionConnectionPoolSize": 50,
"dnsMonitoringInterval": 5000,
"nodeAddresses": [
"redis://elastic-cache-config-end-point:6379"
],
"scanInterval": 5000,
"slaveSubscriptionConnectionPoolSize": 50,
"slaveSubscriptionConnectionMinimumIdleSize": 1
},
"threads": 25,
"nettyThreads": 50,
"codec": {
"class": "org.redisson.codec.SnappyCodec"
},
"referenceCodecProvider": {
"class": "org.redisson.codec.DefaultReferenceCodecProvider"
},
"referenceEnabled": true,
"transportMode": "NIO",
"lockWatchdogTimeout": 30000,
"keepPubSubOrder": true,
"useLinuxNativeEpoll": false
}
We see a degraded performance on all our apis and the bottle-neck seems to be from redisson. We are using spring caching and noticed that all the keys with a particular cacheName are being stored in a single shard instead of being distributed. How do we solve for actually distributing this across different shards?
We are contemplating switching to redisson.pro if it’s going to help. But does the configuration look good and will redisson.pro help with the issues?
Please find attached screenshots that is showing the bottle-neck
Issue Analytics
- State:
- Created 6 years ago
- Comments:9 (4 by maintainers)
Top Results From Across the Web
Why Redis get in async function is too slow? - node.js
Using await basically means "wait for this instruction to be completed before you do anything else". Not using it would make your script ......
Read more >Timeout Exception but no slow query in slowlog on Redis ...
When we look in Redis server's slowlog (tracks all query >10ms), there is no entry.When reducing the slowlog config value, I get some...
Read more >Optimize Redis Client Performance for Amazon ElastiCache ...
Buffering a sequence of commands in memory and sending them to the Redis server as a single batch. We refer to this method...
Read more >High-Concurrency Practices of Redis: Snap-Up System
If all queries are processed slowly, each service thread retrieves a new persistent connection, which will be consumed gradually. If this is the ......
Read more >Redis persistence
AOF can be slower than RDB depending on the exact fsync policy. ... From now on, every time Redis receives a command that...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@PC-AKumar
What is the average size of objects you’re stored into spring cache?
I have just released
3.6.0-3
version it containsorg.redisson.spring.cache.RedissonSpringClusteredLocalCachedCacheManager
class. It supports local cache and works in cluster.@mrniko We store roughly 17kb on an average, median will probably around 50
Thanks for the update with near cache, will try it out.