Difficulty: Intermediate
What does 'SET key value NX' do?
It only sets the key if it doesn't already exist. It's the building block for distributed locks.
Atomicity, Redlock
JavaScript is required for the interactive version of this page, including the code playground and progress tracking. Browse all InternHack tutorials.