Skip to content

Test/59 혼잡도 조회 api 캐싱 적용에 따른 성능 측정#60

Merged
Yooonjeong merged 3 commits intodevfrom
test/59-혼잡도-조회-api-캐싱-적용에-따른-성능-측정
Jul 9, 2025

Hidden character warning

The head ref may contain hidden characters: "test/59-\ud63c\uc7a1\ub3c4-\uc870\ud68c-api-\uce90\uc2f1-\uc801\uc6a9\uc5d0-\ub530\ub978-\uc131\ub2a5-\uce21\uc815"
Merged

Test/59 혼잡도 조회 api 캐싱 적용에 따른 성능 측정#60
Yooonjeong merged 3 commits intodevfrom
test/59-혼잡도-조회-api-캐싱-적용에-따른-성능-측정

Conversation

@Yooonjeong
Copy link
Contributor

❓ 기능 추가 배경

'도서관 혼잡도 조회' API는 대규모 트래픽 발생 시 DB 부하를 줄이고 빠른 응답 속도를 제공하기 위해 Redis 캐싱이 적용되어 있음
실제 대규모 동시 요청 상황을 시뮬레이션하여, 캐싱 적용 여부에 따른 성능 차이(API 호출 수, 실행 시간)를 측정

➕ 추가/변경된 기능

  • ExecutorService 사용하여 다수의 사용자가 동시에 API를 요청하는 상황을 시뮬레이션하는 테스트 코드 추가
  • 캐시 적용 전/후 시나리오에 대한 API 응답 시간 및 DB 쿼리 실행 횟수 측정
  • 주요 테스트 결과
    • 응답 속도 (100명 동시 요청): 1,313ms → 46ms (96.5% 단축)
    • DB 부하 (1,000명 동시 요청): 캐시 적용 후, 동시 요청이 10배 증가해도 DB 쿼리 수는 2회로 유지 (쿼리 수 99.9% 감소)
  • test 코드 추가에 따른 CI 코드 수정

🗎 관련 이슈

< #59 >

@Yooonjeong Yooonjeong linked an issue Jul 9, 2025 that may be closed by this pull request
2 tasks
@github-actions
Copy link

github-actions bot commented Jul 9, 2025

Test Results

3 tests   3 ✅  4s ⏱️
2 suites  0 💤
2 files    0 ❌

Results for commit 1840a66.

♻️ This comment has been updated with latest results.

@Yooonjeong Yooonjeong merged commit 7f11ebe into dev Jul 9, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TEST] 혼잡도 조회 API 캐싱 적용에 따른 성능 측정

1 participant