본문 바로가기
기록

[AWS] ElastiCache Redis OSS 에서 Valkey 전환 고민

by Jop 2025. 5. 29.
반응형

안녕하세요 👋 오늘은 이전 글에서 AWS Summit Seoul 2025 방문 후기에 관련해서 작성한 내용 중에 Valkey의 장점에 대해서 듣고 전환시 이점과 가능 여부를 검토해봤습니다 🤔

 

배경 및 기술 검토 필요성

A. Redis OSS 라이선스 변경

  • Redis OSS의 라이선스가 SSPL로 변경되면서, 기업에서 상용 Redis를 사용하는 경우 라이선스 리스크가 발생
  • AWS는 이에 대응하여 Redis 7.2 기반의 오픈소스 포크 프로젝트인 Valkey를 정식 지원
  • Redis와의 높은 호환성 및 ElastiCache에서의 관리형 서비스 형태 유지

B. 금액 절감

 

AWS에서 ElastiCache 를 사용하거나 Valkey 엔진 페이지에 진입하다보면 위와 같은 문구가 계속 보이는 것을 확인할 수 있습니다.

이토록 AWS에서는 Valkey에 대해서 권장하고 있습니다. 현재 제가 확인해봤을때는 아래와 같은 장점이 있다는 것을 찾을 수 있었습니다.

 

 

Valkey - A Cheaper ElastiCache with One Click

Are you looking to reduce your AWS ElastiCache costs without compromising performance? CloudFix is excited to announce our new Valkey Finder/Fixer, designed to help you seamlessly migrate from…

cloudfix.com

 

  • ElastiCache Serverless 환경에서 최대 33% 낮은 요금
  • 노드 기반 클러스터 구성 시 최대 20% 절감
  • 최소 저장 데이터 크기 100MB로, 90% 이상 감소

C. 성능

  • Valkey는 Redis 7.2 기반으로, 단일 스레드 모델을 유지하면서도 일부 멀티스레드 처리 효율을 개선
  • AWS 내부 기준으로 Redis 대비 지연시간(latency) 감소, 더 나은 처리량(throughput)을 제공

Valkey란?

Redis는 2024년 3월, 라이선스를 BSD → SSPL + RSAL의 듀얼 라이선스 체계로 변경한다고 발표했습니다.

이에 따라 상업적 클라우드 서비스 기업이 Redis를 SaaS 형태로 제공하는 것이 제한되었고, 이로 인해 일부 기업들이 반발하며 대안 프로젝트(fork) 를 만들었습니다.

https://redis.io/blog/redis-adopts-dual-source-available-licensing/

 

Redis Adopts Dual Source-Available Licensing - Redis

Beginning today, all future versions of Redis will be released with source-available licenses. Read more on the blog.

redis.io

 

  • SSPL (Server Side Public License): MongoDB가 만든 라이선스로, SaaS 형태로 제공하면 소스코드 전체 공개 의무 발생
  • RSAL (Redis Source Available License): 자체 운영은 가능하되, 상업적 SaaS 제공은 금지

💡 Valkey 프로젝트 주요 특징

  • Redis 7.2.4 기능 100% 유지
  • BSD 라이선스 기반 → 기존 Redis 오픈소스처럼 자유 사용 가능
  • 활발한 커뮤니티 주도 개발 (비영리 단체 Linux Foundation 산하에서 관리)
  • RedisInsight와 같은 GUI 툴 일부는 미지원하지만 점차 대체 툴 생겨나는 중

 

Valkey 8.1 기능 및 특성 분석

https://docs.aws.amazon.com/ko_kr/AmazonElastiCache/latest/dg/VersionManagement.html#supported-engine-versions

  1. Redis OSS 버전 7.2.4까지의 모든 변경 사항이 포함됨
  2. ElastiCache Valkey 7.2.6과 비교
  • 메모리 효율성이 향상되어 사용자는 애플리케이션 변경 없이 노드당 최대 20% 더 많은 데이터를 저장
  • 자체 설계된 캐시를 위한 슬롯별 지표 인프라를 새로 도입하여 개별 슬롯의 성능 및 리소스 사용량에 대한 자세한 가시성을 제공
  • Valkey 8.0용 ElastiCache Serverless는 2~3분마다 지원되는 초당 요청 수(RPS)를 두 배로 늘려 13분 이내에 캐시당 5M RPS에 도달할 수 있으며, 밀리초 미만의 일관된 p50 읽기 지연 시간을 제공.

 

기존 Redis 사용 방식과의 차이점

현재 Redis에서 사용하고 있는 기능

redisTemplate 기능/메서드 Redis 명령어 설명
opsForValue().get GET key 단일 값 조회
opsForList().range LRANGE key 0 -1 리스트 전체 조회
opsForHash().entries HGETALL key 해시 전체 조회
opsForSet().members SMEMBERS key 집합 전체 조회
opsForZSet().range ZRANGE key 0 -1 정렬된 집합 전체 조회
opsForValue().multiGet MGET key1 key2 ... 여러 값 일괄 조회
delete DEL key1 key2 ... 여러 키 삭제
keys KEYS pattern 패턴에 맞는 키 목록 조회
opsForHash().delete HDEL key field [field ...] 해시 내 특정 필드 삭제
opsForValue().set SET key value 단일 값 저장
opsForHash().putAll HMSET key field value ... 해시 전체 저장
opsForZSet().add ZADD key score member 정렬된 집합에 값 추가
setKeySerializer(new StringRedisSerializer()) - 키 직렬화 방식 지정
expire EXPIRE key seconds 키 만료시간 설정
persist PERSIST key 키 영구 저장(만료 해제)
keys KEYS pattern 패턴에 맞는 키 목록 조회
keys KEYS pattern 패턴에 맞는 키 목록 조회
getExpire TTL key 키의 남은 만료시간 조회
keys, delete KEYS pattern, DEL key1 ... 세션 키 패턴 삭제
keys, delete KEYS pattern, DEL key1 ... 특정 세션 삭제
keys, delete KEYS pattern, DEL key1 ... 캐시 및 EhCache 키 삭제

 

https://valkey.io/commands/

 

Valkey · Commands

Search Commands: We couldn't find any results matching your search Check your spelling or try different keywords Bitmap Operations on the Bitmap data type BITCOUNT Counts the number of set bits (population counting) in a string. BITFIELD Performs arbitrary

valkey.io

Valkey Commands 문서를 기준으로 검토한 결과, Redis OSS와 동일한 명령어 체계를 유지하고 있으며, 핵심 기능 대부분이 그대로 제공됩니다. 즉, 기존 Redis 기반의 클라이언트, 스크립트, 운영 명령어 등이 Valkey에서도 수정 없이 그대로 동작할 수 있습니다.

 

기존 레디스 기능과 다르게 사용되어야하는 기능

  • Valkey Command Reference 문서를 참고해봤을때 기존과 기능 동일

https://valkey.io/commands/

 

Valkey · Commands

Search Commands: We couldn't find any results matching your search Check your spelling or try different keywords Bitmap Operations on the Bitmap data type BITCOUNT Counts the number of set bits (population counting) in a string. BITFIELD Performs arbitrary

valkey.io

 

 

ETC. 참고 문서

반응형

최근댓글

최근글

skin by © 2024 ttuttak