Article Martin Kleppmann's blog

How to do distributed locking

Why I kept it

Ten years after this essay, I hit the same kind of problem building AI agents on tryalexandria.fr. On long-horizon tasks, with many tool calls and a lot of data access, each step has to happen once, even when part of the state sits on the client and I do not control delivery. I handle it with PGMQ on Supabase: a Postgres queue that is easy to run.

François Paupier

Martin Kleppmann's blog8 February 2016Public source

Read the article
Unsafe access to a resource protected by a distributed lock.
View full preview Diagram from the essay · Martin Kleppmann. View in context ↗
  • Distributed systems
  • Locking

In this reference

Martin Kleppmann's essay on distributed locking.

Cite the original work

Martin Kleppmann (8 February 2016). How to do distributed locking. Martin Kleppmann's blog. https://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.html

View BibTeX
@misc{how_to_do_distributed_locking,
  author = {Martin Kleppmann},
  title = {{How to do distributed locking}},
  howpublished = {Martin Kleppmann's blog},
  url = {https://martin.kleppmann.com/2016/02/08/how-to-do-distributed-locking.html},
  year = {2016}
}
← Back to the library