DEV Community

Bitan Sarkar
Bitan Sarkar

Posted on Originally published at bitsar.net AI-assisted

sync = true protects one JVM, not the cluster

Originally published at bitsar.net.

Twelve pods, one Redis, and @Cacheable(sync = true) on the method. I read that as a protected endpoint. It coordinates callers inside one JVM, so a cold key was still twelve calls to the same slow dependency. This is what I found when I went looking for the clustered version of that annotation, why I think it does not exist, and what it took to build one.

Source, benchmarks, the full parameter guide and nine open issues: github.com/BitanSarkar/coalesce-java.

Top comments (0)