ASK: ASK slot ip:port (클러스터 리다이렉트)
Redis의미
Redis Cluster에서 slot이 다른 노드로 마이그레이션 중이며, 요청한 키가 일시적으로 대상 노드에 있을 수 있다. 서버는 이 요청에 한해 클라이언트를 대상 노드로 리다이렉트한다(임시 리다이렉트).
원인
resharding 중 마이그레이션되는 slot에서 이미 이전된 키에 접근함. MOVED와 달리 영구적이지 않으며 해당 시점에만 적용된다.
해결 방법
cluster-aware 클라이언트는 ASK 리다이렉트를 자동으로 처리한다: 대상 노드에 ASKING 명령을 보내고 요청을 재시도하지만 slot 맵을 영구적으로 갱신하지는 않는다. 적절한 클라이언트 라이브러리를 사용하고 redis-cli에는 -c 플래그를 사용한다. resharding이 완료되면 리다이렉트는 MOVED가 되어 영구적이 된다.
같은 데이터베이스의 다른 항목
- MISCONFMISCONF Redis is configured to save RDB snapshots, but it's currently unable to persist to disk
- CROSSSLOTCROSSSLOT Keys in request don't hash to the same slot
- MOVEDMOVED slot ip:port (클러스터 리다이렉트)
- NOSCRIPTNOSCRIPT No matching script. Please use EVAL
- EXECABORTEXECABORT Transaction discarded because of previous errors
- NOPERMNOPERM this user has no permissions to run the command or access one of the keys (명령 실행 또는 키 접근 권한 없음)
- ERR value is not an integer or out of rangeERR value is not an integer or out of range (값이 정수가 아니거나 범위를 벗어남)