문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판 이전 판 다음 판 | 이전 판 | ||
nosql:redis [2013/01/02 10:36] kwon37xi [주의사항] |
nosql:redis [2024/07/12 10:16] (현재) kwon37xi |
||
---|---|---|---|
줄 1: | 줄 1: | ||
====== Redis ====== | ====== Redis ====== | ||
+ | * [[nosql: | ||
* [[http:// | * [[http:// | ||
- | * [[https:// | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
* [[http:// | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[https:// | ||
+ | * [[nosql: | ||
+ | |||
+ | ===== 기본 명령 ===== | ||
+ | * [[https:// | ||
+ | * [[http:// | ||
+ | * [[https:// | ||
+ | ===== Ubuntu 설치 ===== | ||
+ | <code sh> | ||
+ | sudo apt-get install build-essential | ||
+ | |||
+ | # 버전은 알아서 | ||
+ | wget http:// | ||
+ | tar xzf redis-3.0.0.tar.gz | ||
+ | cd redis-3.0.0 | ||
+ | make | ||
+ | </ | ||
+ | |||
+ | ===== 실행 ===== | ||
+ | < | ||
+ | # 실행 | ||
+ | src/ | ||
+ | |||
+ | # 간단한 테스트 | ||
+ | src/ | ||
+ | |||
+ | redis> set foo bar | ||
+ | OK | ||
+ | redis> get foo | ||
+ | " | ||
+ | </ | ||
+ | |||
+ | ===== Lettuce ===== | ||
+ | * Java 에서는 Jedis 보다는 Lettuce를 사용하는게 나은 듯. 2019현재 Lettuce만 replica를 지원함. 성능도 더 좋음. | ||
+ | * [[https:// | ||
+ | |||
+ | ===== Redis를 통한 대기열(Queue) 구현 ===== | ||
+ | * [[https:// | ||
+ | * Sorted Set 을 사용한다. | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
===== 주의사항 ===== | ===== 주의사항 ===== | ||
* Jedis Connection Pool을 사용할 경우 maxIdle, minIdle, maxActive 값을 통일 시키는 것이 성능에 더 유리했다. 잠시의 idle 상태일 때 커넥션을 끊었다가 다시 맺을 때의 부하가 매우 심했고, '' | * Jedis Connection Pool을 사용할 경우 maxIdle, minIdle, maxActive 값을 통일 시키는 것이 성능에 더 유리했다. 잠시의 idle 상태일 때 커넥션을 끊었다가 다시 맺을 때의 부하가 매우 심했고, '' | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * 설정에 대한 검증을 강화해야 합니다. 처음부터 aof를 안쓴느데, | ||
+ | * slave 가 sync 해야할때의 rdb는 옵션을 끄더라도 무조건 발생합니다. 이것이 메모리를 적당히 나눠서 rdb 관련 이슈를 줄여야 하는 이유중에 하나입니다. | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[http:// | ||
+ | * [[https:// | ||
+ | |||
+ | ===== Cache ===== | ||
+ | * Redis는 가급적 캐시 용도로는 사용하지 말자. | ||
+ | * [[https:// | ||
+ | |||
+ | ===== Client Size Cache ===== | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | ===== GUI ===== | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | ===== Multi threaded IO ===== | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | |||
+ | ===== 참조 ===== | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// | ||
+ | * [[https:// |