본문 바로가기
프로그래밍

Redis란 무엇인가?

by YuminK 2023. 8. 24.

Redis

레디스는 사용되는 인메모리 데이타 구조 스토어이다. 

캐시, 메시지 브로커, 스트리밍 엔진, 데이터베이스로 사용된다.

strings, hashs, lists, sets, sorted sets with range queries

 

appending to string, incrementing the value in hash

pushing en element to a list, computing set intersection

getting the member with higher ranking in a sorted set.

 

인메모리 데이터셋

일시적으로 데이터셋을 덤핑하든 디스크에 저장하는 방식, 커맨드를 디스크 기반 로그에 추가하여 영속성을 제공한다.

인메모리 캐시, 네트워크, 기능을 위해 영속성을 제거할 수 있다.

 

레디스는 트랜잭션, Pub/sub, 루아 스크립팅, keys with limited time to live.. 등을 포함한다.

 

ANSI C로 작성되어 있으며, Linux 기반에서 잘 작동한다.

윈도우 빌드를 지원하는 공식 지원은 없다. 

 

WSL2(Window subsystem for Linux)를 활성화해야 Window 환경에서 레디스를 사용할 수 있다. 

https://redis.io/docs/getting-started/installation/install-redis-on-windows/

 

C#/.NET guide

https://redis.io/docs/clients/dotnet/

 

윈도우 우분투 시작후 
redis-server
redis-cli
ping

redis 키 추가
get [key];
set key [value]

keys * //모든키 검색
keys s* //s로 시작하는 모든 키 검색
keys *2 //2로 끝나는 모든 키 검색

save
Program Files/Redis에 dump.rdb파일이 추가된다.

댓글