-
Notifications
You must be signed in to change notification settings - Fork 0
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
refactor: redis를 활용한 조회 성능 최적화 #480
Conversation
1. mStartDate, mEndDate 역직렬화 문제를 위해 getter 선언 2. 기존에 사용되었던 getter 수정
1. 직렬화, 역직렬화 관련된 설정 추가 2. 캐시 TTL 5시간 설정
1. 모임 조회 : 모임, 모임장, 공동모임장 관련 데이터 캐싱 2. 모임 수정 : 1번에서 캐싱한 데이터 초기화
|
Hi there 👋 Using this App for a private organization repository requires a paid subscription. You can click If you are a non-profit organization or otherwise can not pay for such a plan, contact me by creating an issue |
main/src/main/java/org/sopt/makers/crew/main/entity/meeting/vo/ImageUrlVO.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dto 부분과 코멘트 남긴 부분 한 번 체크해주시면 감사하겠습니다!
더 좋은 의견있으시면 환영입니다!
main/src/main/java/org/sopt/makers/crew/main/entity/user/User.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/sopt/makers/crew/main/meeting/v2/dto/redis/CoLeaderRedisDto.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/sopt/makers/crew/main/external/redis/RedisConfig.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다 민규님!
코멘트 한번 봐주시면 감사하겠습니다.
main/src/main/java/org/sopt/makers/crew/main/entity/apply/Apply.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/sopt/makers/crew/main/entity/meeting/CoLeaderReader.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/sopt/makers/crew/main/entity/meeting/vo/ImageUrlVO.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/sopt/makers/crew/main/entity/user/User.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/sopt/makers/crew/main/entity/user/vo/UserActivityVO.java
Show resolved
Hide resolved
main/src/main/java/org/sopt/makers/crew/main/meeting/v2/dto/redis/CoLeaderRedisDto.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/sopt/makers/crew/main/meeting/v2/dto/redis/CoLeadersRedisDto.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/sopt/makers/crew/main/auth/v2/service/AuthV2ServiceImpl.java
Show resolved
Hide resolved
main/src/main/java/org/sopt/makers/crew/main/entity/user/User.java
Outdated
Show resolved
Hide resolved
main/src/main/java/org/sopt/makers/crew/main/entity/user/vo/UserActivityVO.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다 민규님!
코멘트 한개 남겼습니다! 해당 사항에 대해서 논의가 해결되면 머지해도 좋을 것 같습니다.
👩💻 Contents
구현 오버뷰
Reader 레이어
캐싱 방식
레디스 테스트 컨테이너
redisContainerBaseTest
클래스 보시면 되겠습니다!트러블슈팅 - 직렬화/역직렬화
트러블 슈팅 - 하이버네이트 Lazy 로딩 객체 직렬화/역직렬화
User
객체의 직렬화/역직렬화 문제도 있었습니다.User
) 까지 레디스에 저장하려고 했지만 그게 잘 되지 않았습니다.Meeting
를 조회할 때,Meeting
객체 내에 있는 User 가 427번 라인의meetingLeader
에도 저장되는 문제가 있었습니다. 하지만Meeting
객체 내에 있는User
는 Lazy loading 방식이어서null
로 저장되어 있기 때문에meetingLeader
도null
저장되는 문제가 있었습니다.유의사항
추가적으로 했던 것들
성능 개선 (warm-up 제외하고 3회 3000번 요청 진행)
local - redis 전
639 ms
581 ms
625 ms
dev - redis 전
2233 ms
2008 ms
1655 ms
local - redis 후
290 ms
280 ms
281 ms
dev - redis 후
1715 ms
1503 ms
1101 ms
그래도 1.5배 정도 빨라진 것 같습니다!
📝 Review Note
인프라
📣 Related Issue
✅ 점검사항