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

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:

主站蜘蛛池模板: 青神县| 天祝| 吉木萨尔县| 麻城市| 江都市| 阆中市| 论坛| 福建省| 镶黄旗| 汤原县| 赤水市| 东乡族自治县| 乳山市| 汝阳县| 定南县| 桐梓县| 铜川市| 军事| 邮箱| 泗洪县| 扬州市| 鸡东县| 平原县| 金川县| 辉南县| 龙泉市| 黑河市| 满城县| 太白县| 南宁市| 长垣县| 静海县| 新源县| 紫金县| 嘉兴市| 英吉沙县| 琼海市| 邯郸市| 保康县| 筠连县| 林口县|