官术网_书友最值得收藏!

High availability

The simplest database deployments are run as a single instance on a single server. This sort of configuration is highly vulnerable to interruption: if the server is affected by a hardware failure or network connection outage, the application's ability to read and write data is completely lost until the server is restored. If the failure is catastrophic, the data on that server might be lost completely.

Master-slave architectures improve this picture a bit. The master instance receives all write operations, and then these operations are replicated to follower instances. The application can read data from the master or any of the follower instances, so a single host becoming unavailable will not prevent the application from continuing to read the data. A failure of the master, however, will still prevent the application from performing any write operations, so while this configuration provides high read availability, it doesn't completely provide high availability.

Cassandra, on the other hand, has no single point of failure for reading or writing data. Each piece of data is replicated to multiple nodes, but none of these nodes holds the authoritative master copy. All the nodes in a Cassandra cluster are peers without a master node. If a machine becomes unavailable, Cassandra will continue writing data to the other nodes that share data with that machine and will queue the operations and update the failed node when it rejoins the cluster. This means that in a typical configuration, multiple nodes must fail simultaneously for there to be any application - visible interruption in Cassandra's availability.

How many copies?
When you create a keyspace, Cassandra's version of a database, you specify how many copies of each piece of data should be stored; this is called the replication factor. A replication factor of 3 is a common choice for most use cases.

The image below perfectly illustrates high availability in Cassandra. Clients reconnect to different node in case a node is down:

主站蜘蛛池模板: 临海市| 武平县| 京山县| 徐闻县| 普宁市| 府谷县| 女性| 赤水市| 遂昌县| 雷波县| 五常市| 泸定县| 松江区| 花莲县| 六枝特区| 富源县| 西峡县| 信丰县| 湘阴县| 海口市| 高安市| 崇州市| 天台县| 察隅县| 荆州市| 云和县| 沛县| 靖安县| 新化县| 响水县| 读书| 清丰县| 东平县| 古交市| 加查县| 宾川县| 额济纳旗| 册亨县| 虹口区| 和硕县| 布拖县|