| |
| |
| <!DOCTYPE html> |
| <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]--> |
| <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]--> |
| <head> |
| <meta charset="utf-8"> |
| |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| |
| <title>cassandra-rackdc.properties file — Apache Cassandra Documentation v4.0-rc2</title> |
| |
| |
| |
| |
| |
| |
| |
| |
| <script type="text/javascript" src="../_static/js/modernizr.min.js"></script> |
| |
| |
| <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script> |
| <script type="text/javascript" src="../_static/jquery.js"></script> |
| <script type="text/javascript" src="../_static/underscore.js"></script> |
| <script type="text/javascript" src="../_static/doctools.js"></script> |
| <script type="text/javascript" src="../_static/language_data.js"></script> |
| <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script> |
| |
| <script type="text/javascript" src="../_static/js/theme.js"></script> |
| |
| |
| |
| |
| <link rel="stylesheet" href="../_static/css/theme.css" type="text/css" /> |
| <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> |
| <link rel="stylesheet" href="../_static/extra.css" type="text/css" /> |
| <link rel="index" title="Index" href="../genindex.html" /> |
| <link rel="search" title="Search" href="../search.html" /> |
| <link rel="next" title="cassandra-env.sh file" href="cass_env_sh_file.html" /> |
| <link rel="prev" title="cassandra.yaml file configuration" href="cass_yaml_file.html" /> |
| </head> |
| |
| <body class="wy-body-for-nav"> |
| |
| |
| <div class="wy-grid-for-nav"> |
| |
| <nav data-toggle="wy-nav-shift" class="wy-nav-side"> |
| <div class="wy-side-scroll"> |
| <div class="wy-side-nav-search" > |
| |
| |
| |
| <a href="../index.html" class="icon icon-home"> Apache Cassandra |
| |
| |
| |
| </a> |
| |
| |
| |
| |
| <div class="version"> |
| 4.0-rc2 |
| </div> |
| |
| |
| |
| |
| <div role="search"> |
| <form id="rtd-search-form" class="wy-form" action="../search.html" method="get"> |
| <input type="text" name="q" placeholder="Search docs" /> |
| <input type="hidden" name="check_keywords" value="yes" /> |
| <input type="hidden" name="area" value="default" /> |
| </form> |
| </div> |
| |
| |
| </div> |
| |
| <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> |
| |
| |
| |
| |
| |
| |
| <ul class="current"> |
| <li class="toctree-l1"><a class="reference internal" href="../getting_started/index.html">Getting Started</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../new/index.html">New Features in Apache Cassandra 4.0</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../architecture/index.html">Architecture</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../cql/index.html">The Cassandra Query Language (CQL)</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../data_modeling/index.html">Data Modeling</a></li> |
| <li class="toctree-l1 current"><a class="reference internal" href="index.html">Configuring Cassandra</a><ul class="current"> |
| <li class="toctree-l2"><a class="reference internal" href="cass_yaml_file.html">cassandra.yaml file configuration</a></li> |
| <li class="toctree-l2 current"><a class="current reference internal" href="#">cassandra-rackdc.properties file</a><ul> |
| <li class="toctree-l3"><a class="reference internal" href="#gossipingpropertyfilesnitch">GossipingPropertyFileSnitch</a><ul> |
| <li class="toctree-l4"><a class="reference internal" href="#dc"><code class="docutils literal notranslate"><span class="pre">dc</span></code></a></li> |
| <li class="toctree-l4"><a class="reference internal" href="#rack"><code class="docutils literal notranslate"><span class="pre">rack</span></code></a></li> |
| </ul> |
| </li> |
| <li class="toctree-l3"><a class="reference internal" href="#aws-ec2-snitch">AWS EC2 snitch</a><ul> |
| <li class="toctree-l4"><a class="reference internal" href="#ec2-naming-scheme"><code class="docutils literal notranslate"><span class="pre">ec2_naming_scheme</span></code></a></li> |
| </ul> |
| </li> |
| <li class="toctree-l3"><a class="reference internal" href="#either-snitch">Either snitch</a><ul> |
| <li class="toctree-l4"><a class="reference internal" href="#prefer-local"><code class="docutils literal notranslate"><span class="pre">prefer_local</span></code></a></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| <li class="toctree-l2"><a class="reference internal" href="cass_env_sh_file.html">cassandra-env.sh file</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="cass_topo_file.html">cassandra-topologies.properties file</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="cass_cl_archive_file.html">commitlog_archiving.properties file</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="cass_logback_xml_file.html">logback.xml file</a></li> |
| <li class="toctree-l2"><a class="reference internal" href="cass_jvm_options_file.html">jvm-* files</a></li> |
| </ul> |
| </li> |
| <li class="toctree-l1"><a class="reference internal" href="../operating/index.html">Operating Cassandra</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../tools/index.html">Cassandra Tools</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../troubleshooting/index.html">Troubleshooting</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../development/index.html">Contributing to Cassandra</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../faq/index.html">Frequently Asked Questions</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../plugins/index.html">Third-Party Plugins</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../bugs.html">Reporting Bugs</a></li> |
| <li class="toctree-l1"><a class="reference internal" href="../contactus.html">Contact us</a></li> |
| </ul> |
| |
| |
| |
| </div> |
| </div> |
| </nav> |
| |
| <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> |
| |
| |
| <nav class="wy-nav-top" aria-label="top navigation"> |
| |
| <i data-toggle="wy-nav-top" class="fa fa-bars"></i> |
| <a href="../index.html">Apache Cassandra</a> |
| |
| </nav> |
| |
| |
| <div class="wy-nav-content"> |
| |
| <div class="rst-content"> |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| <div role="navigation" aria-label="breadcrumbs navigation"> |
| |
| <ul class="wy-breadcrumbs"> |
| |
| <li><a href="../index.html">Docs</a> »</li> |
| |
| <li><a href="index.html">Configuring Cassandra</a> »</li> |
| |
| <li>cassandra-rackdc.properties file</li> |
| |
| |
| <li class="wy-breadcrumbs-aside"> |
| |
| |
| <a href="../_sources/configuration/cass_rackdc_file.rst.txt" rel="nofollow"> View page source</a> |
| |
| |
| </li> |
| |
| </ul> |
| |
| |
| <hr/> |
| </div> |
| <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> |
| <div itemprop="articleBody"> |
| |
| <div class="section" id="cassandra-rackdc-properties-file"> |
| <span id="cassandra-rackdc"></span><h1>cassandra-rackdc.properties file<a class="headerlink" href="#cassandra-rackdc-properties-file" title="Permalink to this headline">¶</a></h1> |
| <p>Several <span class="xref std std-term">snitch</span> options use the <code class="docutils literal notranslate"><span class="pre">cassandra-rackdc.properties</span></code> configuration file to determine which <span class="xref std std-term">datacenters</span> and racks cluster nodes belong to. Information about the |
| network topology allows requests to be routed efficiently and to distribute replicas evenly. The following snitches can be configured here:</p> |
| <ul class="simple"> |
| <li><p>GossipingPropertyFileSnitch</p></li> |
| <li><p>AWS EC2 single-region snitch</p></li> |
| <li><p>AWS EC2 multi-region snitch</p></li> |
| </ul> |
| <p>The GossipingPropertyFileSnitch is recommended for production. This snitch uses the datacenter and rack information configured in a local node’s <code class="docutils literal notranslate"><span class="pre">cassandra-rackdc.properties</span></code> |
| file and propagates the information to other nodes using <span class="xref std std-term">gossip</span>. It is the default snitch and the settings in this properties file are enabled.</p> |
| <p>The AWS EC2 snitches are configured for clusters in AWS. This snitch uses the <code class="docutils literal notranslate"><span class="pre">cassandra-rackdc.properties</span></code> options to designate one of two AWS EC2 datacenter and rack naming conventions:</p> |
| <ul> |
| <li><p>legacy: Datacenter name is the part of the availability zone name preceding the last “-” when the zone ends in -1 and includes the number if not -1. Rack name is the portion of the availability zone name following the last “-“.</p> |
| <blockquote> |
| <div><p>Examples: us-west-1a => dc: us-west, rack: 1a; us-west-2b => dc: us-west-2, rack: 2b;</p> |
| </div></blockquote> |
| </li> |
| <li><p>standard: Datacenter name is the standard AWS region name, including the number. Rack name is the region plus the availability zone letter.</p> |
| <blockquote> |
| <div><p>Examples: us-west-1a => dc: us-west-1, rack: us-west-1a; us-west-2b => dc: us-west-2, rack: us-west-2b;</p> |
| </div></blockquote> |
| </li> |
| </ul> |
| <p>Either snitch can set to use the local or internal IP address when multiple datacenters are not communicating.</p> |
| <div class="section" id="gossipingpropertyfilesnitch"> |
| <h2>GossipingPropertyFileSnitch<a class="headerlink" href="#gossipingpropertyfilesnitch" title="Permalink to this headline">¶</a></h2> |
| <div class="section" id="dc"> |
| <h3><code class="docutils literal notranslate"><span class="pre">dc</span></code><a class="headerlink" href="#dc" title="Permalink to this headline">¶</a></h3> |
| <p>Name of the datacenter. The value is case-sensitive.</p> |
| <p><strong>Default value:</strong> DC1</p> |
| </div> |
| <div class="section" id="rack"> |
| <h3><code class="docutils literal notranslate"><span class="pre">rack</span></code><a class="headerlink" href="#rack" title="Permalink to this headline">¶</a></h3> |
| <p>Rack designation. The value is case-sensitive.</p> |
| <p><strong>Default value:</strong> RAC1</p> |
| </div> |
| </div> |
| <div class="section" id="aws-ec2-snitch"> |
| <h2>AWS EC2 snitch<a class="headerlink" href="#aws-ec2-snitch" title="Permalink to this headline">¶</a></h2> |
| <div class="section" id="ec2-naming-scheme"> |
| <h3><code class="docutils literal notranslate"><span class="pre">ec2_naming_scheme</span></code><a class="headerlink" href="#ec2-naming-scheme" title="Permalink to this headline">¶</a></h3> |
| <p>Datacenter and rack naming convention. Options are <code class="docutils literal notranslate"><span class="pre">legacy</span></code> or <code class="docutils literal notranslate"><span class="pre">standard</span></code> (default). <strong>This option is commented out by default.</strong></p> |
| <p><strong>Default value:</strong> standard</p> |
| <div class="admonition note"> |
| <p class="admonition-title">Note</p> |
| <p>YOU MUST USE THE <code class="docutils literal notranslate"><span class="pre">legacy</span></code> VALUE IF YOU ARE UPGRADING A PRE-4.0 CLUSTER.</p> |
| </div> |
| </div> |
| </div> |
| <div class="section" id="either-snitch"> |
| <h2>Either snitch<a class="headerlink" href="#either-snitch" title="Permalink to this headline">¶</a></h2> |
| <div class="section" id="prefer-local"> |
| <h3><code class="docutils literal notranslate"><span class="pre">prefer_local</span></code><a class="headerlink" href="#prefer-local" title="Permalink to this headline">¶</a></h3> |
| <p>Option to use the local or internal IP address when communication is not across different datacenters. <strong>This option is commented out by default.</strong></p> |
| <p><strong>Default value:</strong> true</p> |
| </div> |
| </div> |
| </div> |
| |
| |
| </div> |
| |
| </div> |
| <footer> |
| |
| <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation"> |
| |
| <a href="cass_env_sh_file.html" class="btn btn-neutral float-right" title="cassandra-env.sh file" accesskey="n" rel="next">Next <span class="fa fa-arrow-circle-right"></span></a> |
| |
| |
| <a href="cass_yaml_file.html" class="btn btn-neutral float-left" title="cassandra.yaml file configuration" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left"></span> Previous</a> |
| |
| </div> |
| |
| |
| <hr/> |
| |
| <div role="contentinfo"> |
| <p> |
| © Copyright 2020, The Apache Cassandra team |
| |
| </p> |
| </div> |
| Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. |
| |
| </footer> |
| |
| </div> |
| </div> |
| |
| </section> |
| |
| </div> |
| |
| |
| |
| <script type="text/javascript"> |
| jQuery(function () { |
| SphinxRtdTheme.Navigation.enable(true); |
| }); |
| </script> |
| |
| |
| |
| |
| |
| |
| </body> |
| </html> |