0

We have multiple nodes with SpringBoot app using Hibernate with Ehcache (configured to talk to other nodes whose IPs we hardcode at startup).

We are moving to cloud model with autoscaling so won't have IPs upfront to be fed to Ehcache. We are evaluating if we could use Redisson-Redis framework as Hibernate Level 2 cache.

I checked the documentation and would prefer local cache mode. However, I am not sure how eviction would work in that case: if one of the app nodes updates entity in local cache via Hibernate, how do other app nodes evict that.

In Ehcache case, I believe the app node would broadcast eviction event to other app nodes (whose IPs are configured at startup or discovered via multicast TCP) which will evict locally but not sure how it would work in Redisson (maybe via pub/sub behind the scene using Redis) ?

gaurav
  • 3
  • 5

1 Answers1

0

if one of the app nodes updates entity in local cache via Hibernate, how do other app nodes evict that

In this case Redisson uses Redis based publish\subscribe to notify all cache instances.

Nikita Koksharov
  • 10,283
  • 1
  • 62
  • 71