Recently, I had a conversation with a senior software engineer about this topic, and I found it very fruitful, so I organized the topic we discussed a bit as a record.
Optimistic and Pessimistic Locks
In a system with spike in traffic, these two locks are dealing with different issues