Need advice about which tool to choose?Ask the StackShare community!
Cassandra vs etcd: What are the differences?
Key Differences between Cassandra and etcd
Cassandra and etcd are two popular distributed databases used for different purposes. While both are designed to handle large amounts of data, they have several key differences:
Data Model: Cassandra is a wide-column store database that uses a schema-free approach, allowing for flexible data structures. On the other hand, etcd is a key-value store database that stores data as key-value pairs, making it more suitable for simpler data structures.
Consistency Model: Cassandra uses eventual consistency, which means that updates may take some time to propagate throughout the system, leading to potential data conflicts. In contrast, etcd offers strong consistency, ensuring that updates are visible to all nodes immediately, reducing the chances of conflicts.
Partitioning: Cassandra uses consistent hashing to distribute data across multiple nodes, allowing for horizontal scaling and fault tolerance. In comparison, etcd uses range partitioning, where data is divided into ranges and stored in different nodes based on the key's range, providing efficient read and write operations.
Concurrency Control: Cassandra utilizes a last-write-wins conflict resolution strategy, where the latest update to a data record is considered the valid one. In contrast, etcd supports optimistic concurrency control, allowing multiple clients to perform concurrent updates and resolving conflicts based on timestamps.
Queries and Indexing: Cassandra supports a query language called CQL (Cassandra Query Language), which provides a SQL-like interface for querying data. Additionally, Cassandra allows indexing on different columns to optimize search performance. On the other hand, etcd does not support complex queries or indexing; it primarily focuses on fast key-value lookups.
Distributed Consensus: Cassandra uses a decentralized peer-to-peer architecture with no single point of failure, achieving fault tolerance through data replication across multiple nodes. In contrast, etcd utilizes the Raft consensus algorithm, where a leader node coordinates updates and ensures consistency among the cluster members.
In summary, Cassandra and etcd differ in their data models, consistency models, partitioning strategies, concurrency control mechanisms, query capabilities, and distributed consensus approaches. These distinctions make each database suitable for specific use cases and requirements.
The problem I have is - we need to process & change(update/insert) 55M Data every 2 min and this updated data to be available for Rest API for Filtering / Selection. Response time for Rest API should be less than 1 sec.
The most important factors for me are processing and storing time of 2 min. There need to be 2 views of Data One is for Selection & 2. Changed data.
Scylla can handle 1M/s events with a simple data model quite easily. The api to query is CQL, we have REST api but that's for control/monitoring
Cassandra is quite capable of the task, in a highly available way, given appropriate scaling of the system. Remember that updates are only inserts, and that efficient retrieval is only by key (which can be a complex key). Talking of keys, make sure that the keys are well distributed.
i love syclla for pet projects however it's license which is based on server model is an issue. thus i recommend cassandra
By 55M do you mean 55 million entity changes per 2 minutes? It is relatively high, means almost 460k per second. If I had to choose between Scylla or Cassandra, I would opt for Scylla as it is promising better performance for simple operations. However, maybe it would be worth to consider yet another alternative technology. Take into consideration required consistency, reliability and high availability and you may realize that there are more suitable once. Rest API should not be the main driver, because you can always develop the API yourself, if not supported by given technology.
Pros of Cassandra
- Distributed119
- High performance98
- High availability81
- Easy scalability74
- Replication53
- Reliable26
- Multi datacenter deployments26
- Schema optional10
- OLTP9
- Open source8
- Workload separation (via MDC)2
- Fast1
Pros of etcd
- Service discovery11
- Fault tolerant key value store6
- Secure2
- Bundled with coreos2
- Consol integration1
- Privilege Access Management1
- Open Source1
Sign up to add or upvote prosMake informed product decisions
Cons of Cassandra
- Reliability of replication3
- Size1
- Updates1