Redissonspringlocalcache manager in distributed systems
Hi I have read about the redissonspringlocalcache manager that it is keeping a local cache backed by redis. Please correct me if I am wrong. Please tell me how it works in distributed mode.
Eg. If we have 10 ec2 instances deployed connecting to same redis. Suppose there is a case which has been invalidated by one machine. How early can the other 9 machines would be knowing that their local cache is invalid and they need to call the redis to update it.
Do it use background polling to check if it is enabled.?
Hi!
I have just updated Spring Local Cache configuration example on wiki page. As you can see there is a new syncStrategy setting. It has two options:
INVALIDATE - Default. Invalidate cache entry across all LocalCachedMap instances on map entry change UPDATE - Update cache entry across all LocalCachedMap instances on map entry change
In both cases synchronization works in almost real-time mode using Redis PubSub invoked on each local cache change operation.
So do the application need to allocate resources/connection for these pubsub mechanism? If yes, Is there any recommendations?
One pussub subscription is used per Spring Local Cache instance. Total maximum subscriptions for Redisson are counted as subscriptionsPerConnection*subscriptionConnectionPoolSize
Do these Ec2 instances subscribe to redis master / redis slave? Is there any way to provide configuration to redisson to create these subscriptions on slaves/master
subscriptionMode setting allows you to select which type of node use for subscription https://github.com/redisson/redisson/wiki/2.-Configuration#subscriptionmode