LoginSignup
3
1

More than 5 years have passed since last update.

原文:

# endpoint_snitch -- Set this to a class that implements
# IEndpointSnitch.  The snitch has two functions:
# - it teaches Cassandra enough about your network topology to route
#   requests efficiently
# - it allows Cassandra to spread replicas around your cluster to avoid
#   correlated failures. It does this by grouping machines into
#   "datacenters" and "racks."  Cassandra will do its best not to have
#   more than one replica on the same "rack" (which may not actually
#   be a physical location)
#
# IF YOU CHANGE THE SNITCH AFTER DATA IS INSERTED INTO THE CLUSTER,
# YOU MUST RUN A FULL REPAIR, SINCE THE SNITCH AFFECTS WHERE REPLICAS
# ARE PLACED.
#
# Out of the box, Cassandra provides
#  - SimpleSnitch:
#    Treats Strategy order as proximity. This improves cache locality
#    when disabling read repair, which can further improve throughput.
#    Only appropriate for single-datacenter deployments.
#  - PropertyFileSnitch:
#    Proximity is determined by rack and data center, which are
#    explicitly configured in cassandra-topology.properties.
#  - GossipingPropertyFileSnitch
#    The rack and datacenter for the local node are defined in
#    cassandra-rackdc.properties and propagated to other nodes via gossip.  If
#    cassandra-topology.properties exists, it is used as a fallback, allowing
#    migration from the PropertyFileSnitch.
#  - RackInferringSnitch:
#    Proximity is determined by rack and data center, which are
#    assumed to correspond to the 3rd and 2nd octet of each node's
#    IP address, respectively.  Unless this happens to match your
#    deployment conventions (as it did Facebook's), this is best used
#    as an example of writing a custom Snitch class.
#  - Ec2Snitch:
#    Appropriate for EC2 deployments in a single Region. Loads Region
#    and Availability Zone information from the EC2 API. The Region is
#    treated as the datacenter, and the Availability Zone as the rack.
#    Only private IPs are used, so this will not work across multiple
#    Regions.
#  - Ec2MultiRegionSnitch:
#    Uses public IPs as broadcast_address to allow cross-region
#    connectivity.  (Thus, you should set seed addresses to the public
#    IP as well.) You will need to open the storage_port or
#    ssl_storage_port on the public IP firewall.  (For intra-Region
#    traffic, Cassandra will switch to the private IP after
#    establishing a connection.)
#
# You can use a custom Snitch by setting this to the full class name
# of the snitch, which will be assumed to be on your classpath.

意訳:

# [endpoint_snitch]
#
# IEndpointSnitch を実装したクラスを設定します。
# Snitch は 2 つの機能を持ちます:
# 
#  - ネットワーク・トポロジーに対し、リクエストを効率的に送る情報を Cassandra に教えます。
# 
#  - Cassandta が、異常を避けてクラスタにレプリカを広げる事を可能にします。
#    そのために、datacenter と rack にグルーピングします。
#    Cassandra は同じ rack (実際の設置場所を違うかもしれない) の上に 1 つを超えるレプリカを持たないために最善を尽くします。
# 
# もし、データを格納後のクラスタに対して Snitch を変更する場合は、full-repair を実行しなければいけません。
# Cassandra は次の Snitch を提供します:
# 
#  - SimpleSnitch:
#    ソースを見ると "rack1" と "datacenter1" を常に返す実装である。
#    理由は分からんが、read-repair を無効にするとキャッシュの局所性が改善されてスループットを改善できるらしい。
#    単一データセンターで構築するのに適している。
# 
#  - PropertyFileSnitch:
#    Proximity は rack と datacenter によって決定されます。
#    それは cassandra-topology.properties ファイルにて明示的に設定します。
# 
#  - GossipingPropertyFileSnitch
#    Proximity は rack と datacenter によって決定されます。
#    ローカルノードの rack と datacenter は、cassandra-rackdc.properties ファイルにて定義し、gossip によって他ノードに伝えられます。
#    もし cassandra-topology.properties ファイルが存在している場合は fallback として使用され PropertyFileSnitch への移行を可能にします。
# 
#  - RackInferringSnitch:
#    Proximity は、各ノードの IP アドレスの第 2, 第 3 オクテットによって推測される rack と datacenter によって決定されます。
#    もしあなたの IP アドレスのルールが異なる場合は、カスタム Snitch を作成する例として最も使用されます。
# 
#  - Ec2Snitch:
#    Appropriate for EC2 deployments in a single Region. 
#    Loads Region and Availability Zone information from the EC2 API. 
#    The Region is treated as the datacenter, and the Availability Zone as the rack.
#    Only private IPs are used, so this will not work across multiple Regions.
# 
#  - Ec2MultiRegionSnitch:
#    Uses public IPs as broadcast_address to allow cross-region connectivity. 
#    Thus, you should set seed addresses to the public IP as well.
#    You will need to open the storage_port or ssl_storage_port on the public IP firewall.  
#    For intra-Region traffic, Cassandra will switch to the private IP after establishing a connection.
# 
# カスタム Snitch を使用したい場合は、カスタム Snitch の完全修飾クラス名を設定します。
# また、カスタム Snitch は Cassandra のクラスパスに含める必要があります。

おわり

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1