TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Distributed Locking With DynamoDB

21 pointsby ryandotsmithover 12 years ago

3 comments

zzzeekover 12 years ago
There's two variants I've observed with the term "distributed locking", which this article kind of gets at, though IMO not enough to make it clear to someone who also needs to read a section called "What's a lock".<p>Most of the time, when people talk about a "distributed lock", the emphasis is on the fact that the <i>clients</i> are distributed. You can set up a Redis server, and lots of different hosts can contact it and hit the SETNX message to see if some key is locked.<p>But then other folks would say, that's not distributed at all - because the redis server everyone's hitting SETNX on is a single point of failure. It's the <i>servers</i> that need to be distributed. That's a harder task, because the servers need to coordinate on whether or not key "X" is truly available or not in an atomic way, and that's the "consensus algorithm" thing that doozerd and I've also heard Zookeeper does, which I can only start to imagine how that works.<p>Based on the DynamoDB docs at <a href="http://docs.amazonwebservices.com/amazondynamodb/latest/developerguide/WorkingWithDDItems.html#WorkingWithItemsConditionalUpdate" rel="nofollow">http://docs.amazonwebservices.com/amazondynamodb/latest/deve...</a> it seems like conditional updates work across distributed replicas, though it's only implied.
评论 #4681750 未加载
balakkover 12 years ago
For those working with Azure, you can take a lease on a blob to manage concurrency:<p><a href="http://blog.smarx.com/posts/managing-concurrency-in-windows-azure-with-leases" rel="nofollow">http://blog.smarx.com/posts/managing-concurrency-in-windows-...</a><p>It also has high availability, lease expiration timeouts etc.
philip1209over 12 years ago
The submitted link is a redirect - I believe the guidelines imply that submitted links should not be redirects or tracking links.