On Cassandra expansion

Foreword

Cassandra is a very good distributed database, the flexibility of online capacity expansion to meet the level of business expansion needs. This article will elaborate on the expansion issue that may be encountered, to help users better manage Cassandra Cassandra.

Expansion principle

Cassandra uses consistent Hash algorithm to partition the data break.

image

FIG different colors represent the different nodes, each node will have virtual node (3 illustrates each node) in the ring, specifically the number of virtual nodes, depending on the configuration:

num_tokens: 256

This value can not be stressed too low, or a virtual node data is not prone to tilt.

Cassandra call these virtual nodes Token, Token is a long integer. Formed between the two right-left opening and closing a Token section (Range), falls within this range the property data corresponding to the right border of the Token management node (the data will be a long integer mapping with the same Hash Algorithm the ring). For example: (100,200]200 this T

Guess you like

Origin yq.aliyun.com/articles/719777