Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-redlock 을 이용한 분산락 For Redis #67

Open
sseunghoon opened this issue Jan 18, 2024 · 0 comments
Open

node-redlock 을 이용한 분산락 For Redis #67

sseunghoon opened this issue Jan 18, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@sseunghoon
Copy link
Member

sseunghoon commented Jan 18, 2024

📄 이슈 내용

  • 여러 개의 서버 노드들에게 동시성을 보장하면서도 동일한 데이터를 수정할 수 없도록 하기 위한 분산락 도입 (Race Condition 방지)
  • 현재는 하나의 서버 노드만이 존재한다는 가정하에 async-mutex 라이브러리를 사용하여 락을 구현한 상태

📝 상세 내용

  • Redisson 과 같은 라이브러리를 사용하고 싶으나 node 환경에서 사용할 수 없다
    node-redlock 을 사용하여 이를 구현한다.
  • RoomService | GameService | ClientService 의 await this.mutexManager.getMutex(dto.roomId).runExclusive 부분 교체

🙋‍♀️ 의논해봐야 할 것

🔗 참고 자료

@sseunghoon sseunghoon added the enhancement New feature or request label Jan 18, 2024
@sseunghoon sseunghoon self-assigned this Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant