Questions tagged [distributed-lock]

53 questions
2
votes
0 answers

Lock service using SQL DataBase

I have a requirement to synchronize concurrent access to a shared resource modified by different processes which run on different hosts. I am thinking to synchronize this by creating a lock table in a sql database which is accessible from a service…
Sumit
  • 631
  • 1
  • 7
  • 12
2
votes
1 answer

What are the guarantees provided for various lock implementations in Redisson?

Redisson has several lock implementations ( RLock, RedissonMultiLock, RedissonRedLock), but what guarantees are provided in terms of safety and liveness for each of the lock types is not clear. Referring to this - https://redis.io/topics/distlock I…
user1571307
  • 335
  • 1
  • 2
  • 12
2
votes
0 answers

Distributed Hierarchy locking

I have a need to use distributed locking in my project. I am considering Zookeeper + Curator for this. During my investigations, I found that these two frameworks can solve for most of my project needs. But I have two use cases which I am not clear…
Naresh
  • 21
  • 2
2
votes
4 answers

global distributed lock that can be set to expire Java

I have a use case where I want to have a globally distributed lock. We started out using SELECT .. FOR UPDATE, but that quickly started to have problems as we scaled up the number of servers. Also it didn't account for processes that checked out…
Scott
  • 16,711
  • 14
  • 75
  • 120
1
vote
1 answer

Consistent hashing versus distributed locks for handling race conditions

In a distributed system where workload is distributed to multiple nodes, two of the ways of dealing with race conditions where multiple requests to operate on the same data concurrently are the use of consistent hashing and distributed locks.…
1
vote
0 answers

Performant Distributed Locking

I am evaluating the best approach to distributed locking. The oob reentrant locking support in Ignite is tied to the thread that acquires locks. Our requirements need locking and unlocking not tied to the same thread/process, one thread/process can…
Victor
  • 1,207
  • 2
  • 13
  • 21
1
vote
0 answers

Can I build a globally distributed lock with Cloudflare R2?

From the docs, R2 seems to be globally replicated and strongly consistent: https://developers.cloudflare.com/r2/data-access/workers-api/workers-api-reference/#bucket-method-definitions Does that mean I can create a Globally redundant distributed…
1
vote
0 answers

Redis Redlock based distributed lock retry question

Background: currently I am investigating the mechanism of distributed lock in order to implement it in our email service to deduplicate in the time the QPS is high. The main article I am reading is this one…
Drake
  • 165
  • 1
  • 11
1
vote
1 answer

What will happen if a shard fails in Redis Cluster?

We have a Redis cluster with 3 shards each with a replica node. If a is lock acquired in a shard and while the thread is holding the lock the master and replica node goes down. Will the cluster wait until the shard comes back live and not accept new…
Prashant
  • 37
  • 4
1
vote
0 answers

distributed lock with zookeeper. how to avoid repeatly check the min node

As we know that when implementing a distributed lock with Zookeeper and to avoid "herd effect", we will set watcher on the next lowest sequence number node. So, once the node is deleted , we can be notified immediately. If the connection to lowest…
Jack Ma
  • 153
  • 1
  • 11
1
vote
2 answers

Distributed locks in Microservice architecture

We have an architecture setup where we have the client application running in a server and we would want to have a Micro Service responsible for offering the Distributed Lock/Map/Cache functionality. This Micro service internally uses Redisson , a…
1
vote
2 answers

Options for Redis 5.0 Cluster with C++

I am exploring Redis 5.0 cluster with C++. I have already seen different options listed on Redis official site, but none of the C++ clients are marked recommended there. I tried C client "hiredis-vip", it worked for my initial prototype, however…
arz
  • 33
  • 3
1
vote
2 answers

Avoiding duplicate rows via redisson

I do have a table, Foo. I add rows to this table on certain events. The current overall design is such that duplicate messages cannot be avoided. This results in adding of duplicate rows to the table. I cannot put a unique constraint on the table…
Anil Bhat
  • 77
  • 9
1
vote
1 answer

How to set maximum number of permits for Redisson distributed lock

I have a Java module, that is run with AWS Lambda. This means that multiple instances of the module can be run at the same time. The module is used to access a certain API and retrieve data from it. The problem is that the API uses a leaky bucket…
1
vote
1 answer

DistributedLock Acquire Order

I grabbed the NuGet package for DistributedLock for my .NET application that will be running on multiple servers. For those that do not know it makes use of SQL Server's application lock functionality to provide a simple means of locking across…
Eves
  • 227
  • 1
  • 4
  • 17