Apache-storm-cluster-architecture

提供:Dev Guides
移動先:案内検索

Apache Storm-クラスターアーキテクチャ

Apache Stormの主なハイライトの1つは、フォールトトレラントであり、「Single Point of Failure」(SPOF)分散アプリケーションがなく、高速であることです。 アプリケーションの容量を増やすために必要な数のシステムにApache Stormをインストールできます。

Apache Stormクラスターの設計方法とその内部アーキテクチャを見てみましょう。 次の図は、クラスター設計を示しています。

Zookeeper Framework

Apache Stormには、 Nimbus (マスターノード)と Supervisor (ワーカーノード)の2種類のノードがあります。 NimbusはApache Stormの中心的なコンポーネントです。 Nimbusの主な仕事は、Stormトポロジを実行することです。 Nimbusはトポロジを分析し、実行するタスクを収集します。 次に、使用可能なスーパーバイザーにタスクを配布します。

スーパーバイザには1つ以上のワーカープロセスがあります。 スーパーバイザーはタスクをワーカープロセスに委任します。 ワーカープロセスは、必要な数のエグゼキューターを生成し、タスクを実行します。 Apache Stormは、nimbusとスーパーバイザー間の通信に内部分散メッセージングシステムを使用します。

Components Description
Nimbus Nimbus is a master node of Storm cluster. All other nodes in the cluster are called as worker nodes. Master node is responsible for distributing data among all the worker nodes, assign tasks to worker nodes and monitoring failures.
Supervisor The nodes that follow instructions given by the nimbus are called as Supervisors. A *supervisor *has multiple worker processes and it governs worker processes to complete the tasks assigned by the nimbus.
Worker process A worker process will execute tasks related to a specific topology. A worker process will not run a task by itself, instead it creates* executors* and asks them to perform a particular task. A worker process will have multiple executors.
Executor An executor is nothing but a single thread spawn by a worker process. An executor runs one or more tasks but only for a specific spout or bolt.
Task A task performs actual data processing. So, it is either a spout or a bolt.
ZooKeeper framework

Apache ZooKeeper is a service used by a cluster (group of nodes) to coordinate between themselves and maintaining shared data with robust synchronization techniques. Nimbus is stateless, so it depends on ZooKeeper to monitor the working node status.

ZooKeeperは、スーパーバイザーがnimbusと対話するのを支援します。 Nimbusとスーパーバイザーの状態を維持する責任があります。

ストームは本質的に無国籍です。 ステートレスの性質には欠点がありますが、実際には、Stormがリアルタイムデータを可能な限り迅速に処理するのに役立ちます。

ストームは「完全ではない」状態ではありません。 Apache ZooKeeperに状態を保存します。 状態はApache ZooKeeperで利用できるため、失敗したnimbusを再起動して、元の場所から機能させることができます。 通常、 monit などのサービス監視ツールはNimbusを監視し、障害がある場合は再起動します。

Apache Stormには、状態を維持する Trident Topology と呼ばれる高度なトポロジもあり、Pigなどの高レベルAPIも提供します。 これらすべての機能については、今後の章で説明します。