Cassandra Tutorials (6)----Snitch

Source: Internet
Author: User
Tags cassandra

Snitch determines which data center and rack the node belongs to. Snitch notifies the Cassandra network topology to request a valid route, and allows the Cassandra to distribute replicas when the server is added to the data center or rack. In particular, how replication policies place replicas is based on the information provided by the new snitch. Cassandra does not put a copy in a rack (if the rack loses power, it is over).

 Dynamicsnitching

monitoring the performance of reading data from a large number of replicas and selecting the optimal copy is based on these historical conditions. By default, all snitch also use the dynamic snitch layer to Monitor read latencies, and, where possible, do not route requests for low-performance nodes. Dynamic Snitch is enabled by default, and this is recommended for most cases.

  Simplesnitch

This option is only available when there is only one data center. By default,Simplesnitch is not aware of data center and rack information. If you want to use it, you need to use Simplestrategy when defining Keyspace and specify the replication factor.

 Rackinferringsnitch

This is done through a rack or data center IP to determine the location of the node.

Propertyfilesnitch

It also determines the location of the node through the rack or data center. This requires you to configure the cassandra-topology.properties yourself . This snitch can be used if your IP has no rules or if there is a complex replication increase in demand . This snitch requires you to define each node in Cassandra-topology.properties (there is a bit of trouble).

Gossipingpropertyfilesnitch

this snitch automatically updates each node through gossip when the new node is added .

There are other Ec2snitch,ec2multiregionsnitch,googlecloudsnitch,cloudstacksnitch, etc., because on the outside shared cloud, Do not study this for the time being.


This article is from the Java Architect's Road blog, so be sure to keep this source http://eric100.blog.51cto.com/2535573/1759962

Cassandra Tutorials (6)----Snitch

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.