ZooKeeper

ZooKeeper

Apache Druid는 Apache ZooKeeper (ZK)를 사용해 현재 클러스터 상태를 관리해요.

출처: 문서

본문

Apache Druid는 Apache ZooKeeper (ZK)를 사용해 현재 클러스터 상태를 관리해요.

최소 ZooKeeper 버전

Apache Druid는 ZooKeeper의 모든 안정 버전을 지원해요. ZooKeeper의 안정 버전에 대한 정보는 ZooKeeper releases를 참고하세요.

ZooKeeper 연산

ZK 위에서 일어나는 연산은 다음과 같아요:

Coordinator 리더 선출

리더 선출은 Curator LeaderLatch 레시피를 사용해 다음 경로에서 수행해요:

${druid.zk.paths.coordinatorPath}/_COORDINATOR

Historical과 Realtime의 segment "publishing" 프로토콜

이 프로토콜에는 announcementsPath와 liveSegmentsPath가 사용돼요.

모든 Historical 프로세스는 announcementsPath에 자신을 게시해요. 구체적으로, 다음 위치에 ephemeral znode를 생성해요:

${druid.zk.paths.announcementsPath}/${druid.host}

이는 그 프로세스가 존재함을 나타내요. 그런 다음 아래 위치에 permanent znode도 생성해요:

${druid.zk.paths.liveSegmentsPath}/${druid.host}

segment를 로드하면서 다음과 같은 형태의 ephemeral znode를 붙여 넣어요:

${druid.zk.paths.liveSegmentsPath}/${druid.host}/_segment_identifier_

Coordinator나 Broker 같은 프로세스는 이 경로들을 감시해서 어떤 프로세스가 현재 어떤 segment를 서비스하는지 알 수 있어요.

더 알아보기 (Learn more)

  • Coordinator — 리더 선출과 segment 관리를 담당하는 서비스.
  • Historical — segment를 게시하는 서비스를 알아봐요.
  • Broker — ZooKeeper 메타데이터로 쿼리를 라우팅하는 서비스.