본문 바로가기

Redis3

[Redis Client] Jedis vs Lettuce (Lettuce를 쓰자) Jedis vs Lettuce (Lettuce를 쓰자) 이미 많은 글에서 차이를 다루고 있고, 결론은 최신 프로젝트에서는 Lettuce 를 쓰자 입니다. 기록용으로 왜 Lettuce 써야하는지 핵심만 적어봅니다. Jedis Redis용 Java 클라이언트 https://github.com/redis/jedis GitHub - redis/jedis: Redis Java client designed for performance and ease of use. Redis Java client designed for performance and ease of use. - GitHub - redis/jedis: Redis Java client designed for performance and ease of use.. 2022. 6. 12.
(Redis) Redis란? 우아한 Redis 발표영상 후기 https://www.youtube.com/watch?v=mPB2CZiAkKM Cache란? - Cache는 요청결과를 미리 저장해 두었다가 나중에 빠르게 서비스 해주는것을 의미 다이내믹 프로그래밍? 앞의 연산결과를 다시 사용하는 것이 핵심! 예시) factorial -> 20880!을 계산해두면 20881! 은 금방한다 속도 디스크 < 메모리 2:8 파레토 법칙 : 실제 모든 요청은 20의 사용자가 결정한다. Cache 구조 1 - Look aside Cache 1. 웹 서버는 데이터가 존재하는지 Cache 먼저 확인 2. Cache에 데이터가 있으면 Cache에서 가져옴 3. Cache에 없으면 DB에서 읽어옴 4. DB에서 읽은 데이터를 Cache에 저장 Cache 구조 2 - Write Back .. 2020. 7. 18.
(Spring/Redis/@Cacheable) Spring Cacheable로 캐싱기능 적용 Spring Redis @Cacheable Spring Cacheable 쿠팡 메인페이지의 상품섹션 일부입니다. 유저 만족도에 중요한 응답속도를 높히기 위해 여러 영역에 여러방법으로 캐시가 적용되어 있을 것으로 예상해봅니다. Spring 환경에서는 캐시적용에 Spring에서 제공하는 @Cacheable 인터페이스를 사용할 수 있습니다. @Override @Cacheable(value = "example", keyGenerator = "customKeyGenerator", cacheManager = "cacheManager") public List example(Param p1, Praram p2) ... } : 위 설정으로 특정 메소드, 파라메터 기반으로 캐시를 생성합니다. ex) 상품목록 파라메터를 기.. 2020. 3. 21.