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

Refactor :: Notification N+1 이슈 및 캐싱 적용 #346 #350

Merged
merged 4 commits into from
Nov 26, 2024

Conversation

yeseong0412
Copy link
Member

#️⃣ 연관된 이슈

#346

📝 작업 내용

  1. Notification 에서 N+1 문제가 발생하는걸 파악했고 이를 해결하였습니다.
  2. 캐싱 적용을 통한 응답 속도를 개선하였습니다.
    2.1. 기존 조회 캐싱방식과 다르게 C, U, D 에 대한 반응도 해야해서 로직이 조금 변동되었습니다.

📎 ETC

기타

학사일정 K6 테스트 결과 응답속도가 97.93% 개선 되었습니다.
N+1, 캐싱 적용 됬으니 Notification도 유의미한 결과가 도출될꺼라 예상합니다.

기존 쿼리를 두 단계로 나눠서 N+1 문제를 변경함
기존 쿼리에선 N+1 이 발생해 조회를 여러번 했는데 이를 2번 쿼리를 나누어 날려 빈도수를 줄이고 속도 개선을 함
기존 schedules 랑 달리 생성, 수정, 삭제 시 cache 값 변동이 필요하여 기존과 다른 로직 변경
@yeseong0412 yeseong0412 added the Refactor 리팩토링 사항 label Nov 26, 2024
@yeseong0412 yeseong0412 requested a review from seu1a November 26, 2024 12:08
@yeseong0412 yeseong0412 self-assigned this Nov 26, 2024
Copy link
Member

@seu1a seu1a left a comment

Choose a reason for hiding this comment

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

좋습니다 👍🏻

@yeseong0412 yeseong0412 merged commit b1bf1c3 into main Nov 26, 2024
1 check passed
@yeseong0412 yeseong0412 deleted the refactor/#346 branch November 26, 2024 23:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Refactor 리팩토링 사항
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants