Skip to content

[refactor] Kafka 이용한 Stat 비동기 업데이트 적용#192

Open
dlsrks1021 wants to merge 4 commits into
devfrom
refactor/191
Open

[refactor] Kafka 이용한 Stat 비동기 업데이트 적용#192
dlsrks1021 wants to merge 4 commits into
devfrom
refactor/191

Conversation

@dlsrks1021
Copy link
Copy Markdown
Collaborator

@dlsrks1021 dlsrks1021 commented Oct 17, 2025

🛰️ Issue Number

🪐 작업 내용

기존 Stat 업데이트는 Redis-MySQL의 동시 쓰기 방식으로 동작했습니다.
이는 기존 Redis 적용 때 말씀드린 것처럼 유저 수의 증가에 따라 MySQL 부하를 줄 수 있고, 그에 따라 응답 시간이 증가할 수 있다는 단점이 있습니다.
이를 위해 이번 PR에서는 Kafka를 적용해 MySQL 업데이트는 비동기 배치 작업으로 수행할 수 있도록 했습니다.
간단한 동작 방식은 아래와 같습니다.

Stat update -> Kafka Producer -> [topic:stat-changes] -> Kafka Consumer -> MySQL

// 추가로 google java style action의 오류 문제를 JDK 버전 설정으로 해결했습니다.

📚 Reference

#111 [refactor] 랭킹 조회 Redis 적용

✅ Check List

  • 코드가 정상적으로 컴파일되나요?
  • 테스트 코드를 통과했나요?
  • merge할 브랜치의 위치를 확인했나요?
  • Label을 지정했나요?

@dlsrks1021 dlsrks1021 self-assigned this Oct 17, 2025
@dlsrks1021 dlsrks1021 added the refactoring 코드 리팩토링 label Oct 17, 2025
@dlsrks1021 dlsrks1021 linked an issue Oct 17, 2025 that may be closed by this pull request
1 task
Copy link
Copy Markdown
Collaborator

@jiwon1217 jiwon1217 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring 코드 리팩토링

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[refactor] Kafka를 이용한 비동기 MySQL 랭킹 업데이트 진행

2 participants