Need advice about which tool to choose?Ask the StackShare community!
Cassandra vs FaunaDB: What are the differences?
Introduction: In the realm of databases, Cassandra and FaunaDB are two popular choices. Despite serving similar purposes, they differ in various aspects which play a crucial role in database selection for an organization or project.
Data Model: Cassandra follows a wide-column store data model, storing data in rows and columns akin to a traditional relational database. On the other hand, FaunaDB utilizes a document-oriented data model, organizing data in hierarchical structures facilitating easy retrieval and querying.
Consistency: When it comes to consistency, Cassandra offers tunable consistency levels, allowing users to trade off between consistency and availability. FaunaDB, however, guarantees strict consistency globally across all operations ensuring that reads reflect the most recent write.
Transaction Support: Cassandra lacks comprehensive transaction support, requiring developers to implement complex application-side logic to maintain data integrity in case of multiple operations. In contrast, FaunaDB supports asset transactions out of the box, simplifying the development process and ensuring data consistency.
Query Language: Cassandra employs CQL (Cassandra Query Language) as its query language, which resembles SQL. FaunaDB utilizes its own query language, FQL (Fauna Query Language), which is specifically designed to work with its document-oriented data model, providing powerful querying capabilities.
Scalability: In terms of scalability, while both Cassandra and FaunaDB support horizontal scalability by adding more nodes to the cluster, FaunaDB offers built-in multi-region replication which simplifies data distribution and ensures low-latency access for global applications compared to Cassandra.
Consistency Model: Cassandra employs an eventually consistent model, where inconsistencies may exist temporarily during network partitions but eventually resolve. In contrast, FaunaDB uses a strong consistency model by default, ensuring that reads reflect the latest write across all operations, offering robust data integrity guarantees.
In Summary, Cassandra and FaunaDB differ in their data models, consistency approaches, transaction support, query languages, scalability options, and consistency models, making them distinctive choices for various database 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 Fauna
- 100% ACID5
- Generous free tier4
- Removes server provisioning or maintenance4
- Low latency global CDN's3
- No more n+1 problems (+ GraphQL)3
- Works well with GraphQL3
- Also supports SQL, CQL3
- No ORM layer needed2
Sign up to add or upvote prosMake informed product decisions
Cons of Cassandra
- Reliability of replication3
- Size1
- Updates1
Cons of Fauna
- Susceptible to DDoS (& others) use timeouts throttling1
- Must keep app secrets encrypted1
- Log stack traces to avoid improper exception handling1