Skip to content

Step 13: 쿼리 캐싱 혹은 Redis 를 이용한 로직 이관을 통해 성능 개선 보고서#31

Merged
kilhyeonjun merged 3 commits intomasterfrom
feature/step-13
Nov 7, 2024
Merged

Step 13: 쿼리 캐싱 혹은 Redis 를 이용한 로직 이관을 통해 성능 개선 보고서#31
kilhyeonjun merged 3 commits intomasterfrom
feature/step-13

Conversation

@kilhyeonjun
Copy link
Copy Markdown
Contributor

@kilhyeonjun kilhyeonjun commented Nov 7, 2024

요구사항

  • 조회가 오래 걸리는 쿼리에 대한 캐싱, 혹은 Redis 를 이용한 로직 이관을 통해 성능 개선할 수 있는 로직을 분석하고 이를 합리적인 이유와 함께 정리한 문서 제출

작업 내용

리뷰포인트

  • 궁금한 사항은 코멘트 남겨놨습니다. 확인 부탁드립니다!
  • 리뷰어님들이 생각했을 때 더 좋은 패턴이 보일 경우 공유해주시면 좋을 것 같습니다.

Comment on lines +49 to +51
### TODO: STEP14 - 대기열 성능 개선

대기열 성능 개선 작업은 다음 과제에서 진행할 예정입니다. No newline at end of file
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

STEP 14에서 이어서 작성할 예정입니다.
STEP 14 요구사항

  • 콘서트 예약 시나리오(대기열 인원수 제한 없음)

    대기열 구현에 대한 설계를 진행하고, 설계한 내용과 부합하도록 적절하게 동작하는 대기열을 구현하여 제출

    • Redis, Queue, MQ 등 DB가 아닌 다른 수단을 활용해 대기열 개선 설계 및 구현 (”Nice to have”)

Comment on lines +33 to +39
@Cacheable(value = CacheName.CONCERT, key = "#param.id")
Concert getConcert(GetConcertByIdParam param);

@Cacheable(value = CacheName.CONCERT, key = "#param.id")
Concert getConcert(GetConcertByIdWithLockParam param);

@Cacheable(value = CacheName.CONCERT_SCHEDULE, key = "#param.id")
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ConcertRepository에 @Cacheable를 사용했습니다.
캐싱을 한다는 부분을 도메인이 모르게 ConcertRepositoryImple(구현체)에 작성하여 인프라스트럭처에서 관리하는게 더 좋았을까요?

Copy link
Copy Markdown

@LenKIM LenKIM Nov 9, 2024

Choose a reason for hiding this comment

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

이건 구현체에 캐시 코드를 작성하게 될 경우에, 문제가 생길 수 있습니다. 실제로 repository 쓰는 클라이언트는 작성해주신 interface 만 알고 있으니까요.

@kilhyeonjun kilhyeonjun merged commit de291c0 into master Nov 7, 2024
@kilhyeonjun kilhyeonjun deleted the feature/step-13 branch November 7, 2024 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants