16
Cassandra Core Concepts and why Netflix runs Cassandra on the cloud Erick Ramirez @flightc, DataStax Engineering

Meetup core concepts-erick-ramirez-20150729

Embed Size (px)

Citation preview

Page 1: Meetup core concepts-erick-ramirez-20150729

Cassandra Core Conceptsand why Netflix runs Cassandra on the cloud Erick Ramirez @flightc, DataStax Engineering

Page 2: Meetup core concepts-erick-ramirez-20150729

Erick Ramirez© 2015 DataStax, All Rights Reserved.

@flightc

Welcome

2

• Introducing Cassandra • Why Netflix runs Cassandra on the cloud • Feel free to ask questions

Page 3: Meetup core concepts-erick-ramirez-20150729

Erick Ramirez© 2015 DataStax, All Rights Reserved.

@flightc

Relational data model

3

• Normalised schema, table joins, ACID • Joins are very expensive on billions of rows • Sharding tables across systems is complex • Performance preferred over “always on” • Requires massive high-end systems

Page 4: Meetup core concepts-erick-ramirez-20150729

Erick Ramirez© 2015 DataStax, All Rights Reserved.

@flightc

Big data requirements

4

• Distribute data across multiple nodes • Relaxed consistency • Relaxed schema • Scale, scale, scale!

Page 5: Meetup core concepts-erick-ramirez-20150729

Erick Ramirez© 2015 DataStax, All Rights Reserved.

@flightc

NoSQL landscape

5

• Graph, Key-value, Document, Column family • Consistency - same result regardless of node • Availability - high read/write volumes • Partition tolerance - survive network isolation

Page 6: Meetup core concepts-erick-ramirez-20150729

Erick Ramirez© 2015 DataStax, All Rights Reserved.

@flightc

CAP theorem

6

Page 7: Meetup core concepts-erick-ramirez-20150729

Erick Ramirez© 2015 DataStax, All Rights Reserved.

@flightc

What is Cassandra?

7

• Massively scalable NoSQL database • Fully distributed, no single-point-of-failure • Open sourced by Facebook • Linear horizontal scaling

Page 8: Meetup core concepts-erick-ramirez-20150729

Erick Ramirez© 2015 DataStax, All Rights Reserved.

@flightc

Modelling Cassandra

8

• Use Cassandra Query Language (CQL) • Similar SQL-like approach

• CREATE, ALTER, DROP • SELECT, INSERT, UPDATE, DELETE

Page 9: Meetup core concepts-erick-ramirez-20150729

Erick Ramirez© 2015 DataStax, All Rights Reserved.

@flightc

Modelling Cassandra

9

CREATE TABLE users ( userid text, name text, email text, PRIMARY KEY (userid));

Page 10: Meetup core concepts-erick-ramirez-20150729

Erick Ramirez© 2015 DataStax, All Rights Reserved.

@flightc

Why Cassandra

10

• All nodes are the same - no SPOF • Real-time, durable writes • Linear scaling on commodity servers • Real-time replication across data centres • Always on - no offline operation • Because you have a scale problem

Page 11: Meetup core concepts-erick-ramirez-20150729

Erick Ramirez© 2015 DataStax, All Rights Reserved.

@flightc

Why not Cassandra

11

• RDBMS excels in ACID transactions • You need to justify your purchase of massive

high-end servers

Page 12: Meetup core concepts-erick-ramirez-20150729

Erick Ramirez© 2015 DataStax, All Rights Reserved.

@flightc

Common use cases

12

• Personalisation/recommendations (Netflix,ebay) • Messaging (Instagram) • IoT (Riptide IO) • Fraud detection (Barracuda) • Playlists and collections (Spotify) • Graph (SpotRight)

Page 13: Meetup core concepts-erick-ramirez-20150729

Erick Ramirez© 2015 DataStax, All Rights Reserved.

@flightc

A Cassandra cluster

13

Page 14: Meetup core concepts-erick-ramirez-20150729

Erick Ramirez© 2015 DataStax, All Rights Reserved.

@flightc

Cassandra Summit 2015

14

Page 15: Meetup core concepts-erick-ramirez-20150729

Erick Ramirez© 2015 DataStax, All Rights Reserved.

@flightc

academy.datastax.com

15

Page 16: Meetup core concepts-erick-ramirez-20150729

Erick Ramirez© 2015 DataStax, All Rights Reserved.

@flightc

Thank you

16

• Erick Ramirez • @flightc