JSCODE Logo
프로그래밍 과외블로그후기멘토진
회사명 : JSCODE대표 : 박재성사업자 등록번호 : 244-22-01557통신판매업 : 제 2023-인천미추홀-0381 호
학원 명칭 : 제이에스코드(JSCODE)원격학원학원설립ㆍ운영 등록번호 : 제6063호

서울특별시 구로구 경인로 20가길 11(오류동, 아델리아)

Copyright ⓒ 2025 JSCODE - 최상위 현업 개발자들의 프로그래밍 교육 All rights reserved.

이용약관개인정보처리방침
← 블로그 목록으로 돌아가기

Redis를 적용하기 전후 성능 비교해보기 (Postman)

JSCODE 박재성
JSCODE 박재성
2025-12-06
author
JSCODE 박재성
category
Redis
createdAt
Dec 6, 2025
series
비전공자도 이해할 수 있는 Redis 입문/실전
slug
performance-comparison-before-after-redis-spring-boot
type
post
updatedAt
Dec 6, 2025 04:33 AM
🧑🏻
성능 개선을 할 땐 반드시 수치를 측정하면서 비교해야 한다. 성능 개선을 할 때 ‘느린 것 같아요’, ‘빨라진 것 같아요’라고 얘기하는 건 잘못된 습관이다. 성능 개선을 할 때는 실제로 얼마나 느린지를 측정해야 하고, 개선을 한 뒤에 얼마나 빨라졌는 지를 측정해야 한다. 즉, 정확한 수치로 얘기할 수 있어야 한다.

✅ Redis 적용 전

BoardService
@Service public class BoardService { ... // @Cacheable(cacheNames = "getBoards", key = "'boards:page:' + #page + ':size:' + #size", cacheManager = "boardCacheManager") public List<Board> getBoards(int page, int size) { Pageable pageable = PageRequest.of(page - 1, size); Page<Board> pageOfBoards = boardRepository.findAllByOrderByCreatedAtDesc(pageable); return pageOfBoards.getContent(); } }
캐싱을 적용시키는 어노테이션을 주석 처리한 뒤 Postman으로 테스트를 해보자.
 
notion image
여러번 요청을 보내보니 평균적으로 200ms 정도의 속도가 나오는 걸 확인할 수 있다. (개인이 가지고 있는 컴퓨터의 성능에 따라 수치는 다를 수 있다.)
 

✅ Redis 적용 후

@Service public class BoardService { ... @Cacheable(cacheNames = "getBoards", key = "'boards:page:' + #page + ':size:' + #size", cacheManager = "boardCacheManager") public List<Board> getBoards(int page, int size) { Pageable pageable = PageRequest.of(page - 1, size); Page<Board> pageOfBoards = boardRepository.findAllByOrderByCreatedAtDesc(pageable); return pageOfBoards.getContent(); } }
주석 처리를 해제한 뒤에 다시 한 번 테스트를 해보자.
 
notion image
여러번 요청을 보내보니 평균적으로 20ms 정도의 속도가 나오는 걸 확인할 수 있다. 10배 정도 속도가 향상됐다.
 
author
category
Redis
createdAt
series
비전공자도 이해할 수 있는 Redis 입문/실전
slug
type
series-footer
updatedAt
Dec 6, 2025 04:33 AM
📎
이 글은 비전공자도 이해할 수 있는 Redis 입문/실전 (조회 성능 최적화편) 강의의 수업 자료 중 일부입니다.