79685825

Date: 2025-07-01 09:32:55
Score: 1
Natty:
Report link

I am taking example of Java as I am comfortable with it. In a single JVM, locks like synchronized or ReentrantLock work well.

But in a clustered environment (e.g. multiple Spring Boot apps behind a load balancer), each node has its own memory, so:

Locking in memory doesn’t prevent another node from performing the same action.

You need a shared coordination mechanism — like Redis, Zookeeper etc...

Reasons:
  • No code block (0.5):
  • Low reputation (0.5):
Posted by: Pushpendra Kushvaha