Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I'm confused, is EBS eventually consistent? I assume that it's strongly consistent as otherwise a lot of other linux things would break

If you're thinking about using NFS, why would you want to distribute your locks across other machines?



Why would anyone want a distributed lock?

Sometimes certain containerized processes need to run according to a schedule, but maintainers also need a way to run them manually without the scheduled processing running or starting concurrently. A shared FS seems like the ”simplest thing that could possibly work” distribution method for locks intended for that purpose, but unfortunately not all cloud storage volumes are strongly consistent, even to the same user, and may take several ms for the lock to take hold.


Wouldn't a database give you better consistency guarantees in that case? NFS locking semantics are a lot more complicated than just a `SELECT .. FOR UPDATE`


Sure, but that would require a separate database for this one use case. Mixing infra concerns into an app db doesn’t sound kosher, either, and a shared volume is already available.

Seems easier to have a managed lockfile for each process, diligently checking that the lock has actually been acquired. Performance is not a concern anyway, as long as acquire takes just a few ms we’re golden.

FWIW, it’s not NFS.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: