Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

watch 기능 검토 및 개발 #488

Open
minkikim89 opened this issue Aug 5, 2020 · 3 comments
Open

watch 기능 검토 및 개발 #488

minkikim89 opened this issue Aug 5, 2020 · 3 comments
Assignees

Comments

@minkikim89
Copy link
Contributor

memcached에서 지원하는 command 중
watch command에 대해 필요성을 검토한다.

watch command는 <set type, get type, remove type>의 변경을 감시하는
watcher를 등록 해 놓고, 변경 로그가 발생하면 watcher에 event를 전달하는 command 이다.
Redis의 monitor command와 비슷하며 ARCUS에서 필요성을 검토하여 필요하면 추가한다.

@ji3427
Copy link

ji3427 commented Aug 8, 2020

제가 진행하겠습니다.

@jeesup0103
Copy link

제가 진행하겠습니다.

@jeesup0103
Copy link

Memcached watch command 정리

  • watch command는 클라이언트를 watcher로 전환하여, 내부 이벤트(예: get, set, delete, eviction, connection 이벤트 등)가 발생할 때마다 해당 이벤트 로그를 전달합니다.

watch <arg1> <arg2> ...

지원 이벤트 종류 (arg):

  • fetchers: 항목 조회 시 발생 (get 명령)
  • mutations: 항목 저장 시 발생 (set 명령 등)
  • evictions: 항목이 캐시에서 제거될 때 발생
  • connevents: 클라이언트 연결/해제 이벤트
  • proxyreqs / proxyevents / proxyuser: 프록시 관련 요청 및 이벤트
  • deletions: 삭제 명령(delete) 성공 시 발생

출력 예시:

  • 하나의 연결을 watch fetchers 로 설정한 뒤에 다른 연결에서 get foo 명령어 입력시 watcher에서는 다음과 같이 출력
    • ts=1466120156.99667 gid=1 type=item_get key=foo status=not_found
  • watch evictions 로 설정하면 다음과 같이 출력
    • ts=1466120156.304163 gid=57180 type=eviction key=n%2Cfoo1539 fetch=no ttl=-1 la=0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants