卡桑德拉:什么是正确的配置EC2多地区? [英] Cassandra: what is the correct configuration for EC2 multi-region?

查看:211
本文介绍了卡桑德拉:什么是正确的配置EC2多地区?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是正确的配置,在EC2实例的多阶区域设置?

应该采取什么listen_address,broadcast_address,rpc_address和种子的IP /地址是工作?

当你使用公网IP地址,当你使用私有IP地址?

解决方案

按照<一个href="http://www.datastax.com/documentation/cassandra/1.2/webhelp/index.html?pagename=docs&version=1.2&file=#cassandra/configuration/configCassandra_yaml_r.html">docs:

broadcast_address :(默认: listen_address )如果你的卡桑德拉群集部署在多个亚马逊EC2区域,并使用的EC2MultiRegionSnitch,设置broadcast_address到节点的公共IP地址和listen_address到专用IP

listen_address :(默认:本地主机),其他卡桑德拉节点使用连接到该节点的IP地址或主机名。如果未设置,主机名必须解析该节点的使用/ etc /主机名,/ etc / hosts文件,或者DNS的IP地址。不要指定0.0.0.0。

rpc_address :(默认:本地主机)的监听地址的客户端连接(节俭远程过程调用)。

seed_provider :(默认:org.apache.cassandra.locator.SimpleSeedProvider)逗号分隔的主机(IP地址)的列表,以作为联络点使用,当一个节点加入集群。卡桑德拉还使用此列表来学习环的拓扑结构。运行多个节点时,必须改变 - 从种子的默认值(127.0.0.1)名单。在多个数据中心群集, - 种子列表应包括从每个数据中心的至少一个节点(复制组)

试图总结:

  1. rpc_address 用于客户端连接,并没有任何关系多区域EC2
  2. listen_address broadcast_address 对于多地区EC2配置2个重要的选项
  3. 在一般配置任何这些回答2个问题的时候:

    1. 谁是连接? (另一个节点?客户?)
    2. 在什么IP地址是访问? (可以访问谁是连接到此网络接口?)

What is the correct configuration for a mulit-region setup in EC2 instances?

What should the listen_address, broadcast_address, rpc_address and seed ip/addresses be to work?

When do you use public IP address and when do you use private IP addresses?

解决方案

According to the docs:

broadcast_address: (Default: listen_address) If your Cassandra cluster is deployed across multiple Amazon EC2 regions and you use the EC2MultiRegionSnitch, set the broadcast_address to public IP address of the node and the listen_address to the private IP.

listen_address: (Default: localhost) The IP address or hostname that other Cassandra nodes use to connect to this node. If left unset, the hostname must resolve to the IP address of this node using/etc/hostname, /etc/hosts, or DNS. Do not specify 0.0.0.0.

rpc_address: (Default: localhost) The listen address for client connections (Thrift remote procedure calls).

seed_provider: (Default: org.apache.cassandra.locator.SimpleSeedProvider) A list of comma-delimited hosts (IP addresses) to use as contact points when a node joins a cluster. Cassandra also uses this list to learn the topology of the ring. When running multiple nodes, you must change the - seeds list from the default value (127.0.0.1). In multiple data-center clusters, the - seeds list should include at least one node from each data center (replication group)

Trying to summarize:

  1. the rpc_address is used for client connections and has nothing to do with multi-region EC2
  2. the listen_address and broadcast_address are the 2 important options for multi-region EC2 configuration
  3. in general when configuring any of these answer 2 questions:

    1. who is connecting? (another nodes? clients?)
    2. what IPs are accessible? (is this network interface accessible to who is connecting?)

这篇关于卡桑德拉:什么是正确的配置EC2多地区?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆