5. A distributed database for managing large
amounts of structured data across many
commodity servers, while providing highly
available service and no single point of failure
Used by Apple, Comcast, Instagram, Spotify,
eBay, Rackspace, Netflix
What is Cassandra
7. Tunable Consistency
Replication factor
Total number of replicas across the cluster
Consistency level
Number of replicas to respond before returning to the client
Can be different for read and write
ONE, QUORUM (RF/2 + 1), ALL
16. Compare to RDBMS
No JOINs -> Prefer denormalization
Model your data around the queries
Limited transaction support
17. Key concepts
Keyspace
Similar to a schema in RDBMS
Table
Primary key = Partition key + Clustering column
Partition key
Defines the node on which the data is stored
Clustering column
Defines the order of data stored in a row
18. Phonebook
A person has a name and a phone number
Look up by name
Look up by phone number
19. Create table
CREATE TABLE person (
person_id uuid,
name text,
phone text,
PRIMARY KEY (person_id)
);