In a Redis cluster how do I determine the peak memory usage of all nodes using Spring Data Redis Reactive API?

96 views Asked by At

I wanted to build an L2 Hibernate Cache using a Redis cluster in Spring Boot (I've done that part already) but I want it to stop using Redis when a certain threshold is reached.

So I was thinking of either remaining memory bytes or remaining memory percentage be a parameter I pass into the cache system. That's relatively easy enough.

The question I have is how to actually determine the value so I can compare it across all the nodes of the cluster so if any of the nodes are almost full it will stop.

I am thinking it is around the use of the MEMORY STATS API and somehow get a list of all the nodes in the cluster and then do a max.

Just need to find out the actual numbers to use. There is total.allocated so I guess that's the upper limit. Looking specifically using the Reactive API as well.

0

There are 0 answers