[Redis Hackathon Submission - Distributed lock performance]
Tags: redishackathon, redis, distributedsystems
Published: 2022-08-24 11:54:45

### Overview of My Submission
[Note]: # (Share what you built, how you built it, and the inspiration behind the idea! Please make sure the project links to the appropriate GitHub repository, and includes the [MIT](https://choosealicense.com/licenses/mit/), [Apache](https://www.apache.org/licenses/), [BSD-2](https://opensource.org/licenses/BSD-2-Clause), [BSD-3](https://opensource.org/licenses/BSD-3-Clause), or [Commons Clause](https://commonsclause.com/) license and a README.)


### Submission Category: Wacky Wildcards

### [Optional: Video Explainer of My Project]
https://drive.google.com/file/d/1m27xAuTyrT3qgHy5JRAyhhrS0pBODqJc/view?usp=sharing

[Note]: # (This is where you can embed the optional bonus video you created to accompany your submission. Ensure your video is published publicly to YouTube and you’ve used the embed tag here to share it with us. By opting to include a video, you will be eligible for BONUS prizes. Learn more in the announcement post.)

### Language Used
Java/Spring Boot/Redis

### Link to Code
https://github.com/poojave/redis-hackathon

[Note]: # (Our markdown editor supports pretty embeds. Try this syntax: `{% https://github.com/poojave/redis-hackathon %}` to share a GitHub repository)

BTW, your Github code’s README file should contain the details as [per this template](https://github.com/redis-developer/hackathon-docs/blob/main/README.md).

### Additional Resources / Info
Properties of distributed locks
    1. Fault tolerant - Distributed lock manager
    2. Deadlock free - TTL
    3. Mutually exclusive - Unique locking number

[Note:] # Screenshots/demo videos are encouraged!

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p1o4vd6l301j86hztzs8.png)
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4qp0lzmvaqoplmiw7r1g.png)
 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dem87t2z4yr1iiis4fod.png)
  
Inferences:
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9rz4q34m87apupvbb536.png)				
					
Machine details:
RAM - 16 GB
MacBook Pro M1
Storage - 250 GB					

1. >500 worker threads were involved for 10K tasks.					
2. Redis only used 4.5 MB out of total space 30MB. But why? I need to further investigate it.					
3. It only scaled to max 137 keys at a time					
4. It took 50 mins approx to complete the process for 10K tasks					
5. The 50 mins could be less If the keys creation would have scaled & Redis memory used could have much.					
6. When the write/sec scaled, we have observed latency in writes to some extent. This seems unacceptable on a broad level.					
7. One good things is when we increased the tasks to 10 times the total completion time goes 3 times only. It shows it is scalable for large application.					
8. In future would run the experiement with Cockroach DB and Cassandra too to compare further.				

## Open source tools used or Reference:
[Note:] # (https://github.com/liliumbosniacum/redis) 
### Collaborators


- - - 

[Note]: # (Please ensure  that the footer content below is part of your post when publishing. Please delete this note in parentheses but do not delete the content below.)


* _Check out [Redis OM](https://redis.io/docs/stack/get-started/clients/#high-level-client-libraries), client libraries for working with Redis as a multi-model database._
* _Use [RedisInsight](https://redis.info/redisinsight) to visualize your data in Redis._
* _Sign up for a [free Redis database](https://redis.info/try-free-dev-to)._