SlideShare a Scribd company logo
Luke Tillman
Technical Evangelist at DataStax (@LukeTillman)
• Evangelist with a focus on Developers
• Long-time Developer on RDBMS (lots of .NET)
Who are you?!
2
The Good ol' Relational Database
© 2015. All Rights Reserved. 3
First proposed in 1970
The Relational Database Makes us Feel Good
© 2015. All Rights Reserved. 4
SQL is ubiquitous and allows
flexible querying
Data modeling is well understood
(3NF or higher)
ACID guarantees make us feel good
© 2015. All Rights Reserved. 5
Building and Scaling our Applications
© 2015. All Rights Reserved. 5
Building and Scaling our Applications
© 2015. All Rights Reserved. 5
Building and Scaling our Applications
I'm getting too old for this…
Scaling Up
© 2015. All Rights Reserved. 8
All these JOINs are Killing Us
9
SELECT
array_agg(players),
player_teams
FROM (
SELECT DISTINCT
t1.t1player AS players,
t1.player_teams
FROM (
SELECT
p.playerid AS t1id,
concat(p.playerid, ':', p.playername, ' ') AS t1player,
array_agg (pl.teamid ORDER BY pl.teamid) AS player_teams
FROM player p
LEFT JOIN plays pl
ON p.playerid = pl.playerid
GROUP BY p.playerid, p.playername
) t1
INNER JOIN (
SELECT
p.playerid AS t2id,
array_agg (pl.teamid ORDER BY pl.teamid) AS player_teams
FROM player p
LEFT JOIN plays pl
ON p.playerid = pl.playerid
GROUP BY p.playerid, p.playername
) t2
ON t1.player_teams = t2.player_teams
AND t1.t1id <> t2.t2id
) innerQuery
© 2015. All Rights Reserved.
All these JOINs are Killing Us
9
SELECT * FROM denormalized_view
Let's Denormalize!
© 2015. All Rights Reserved.
All these JOINs are Killing Us
9
But I thought data modeling was 3NF or
higher?! There can be only one!
© 2015. All Rights Reserved.
Read Replication
12
Client
Users Data
Replica 2
Replica 1
Primary
Write Requests
ReadRequests
© 2015. All Rights Reserved.
Replication Lag
Consistent results? Nope, now
eventually consistent
Replication speed is limited by
the speed of light
Sharding
© 2015. All Rights Reserved. 13
Client
Router
A-F G-M N-T U-Z
Users Data
Queries that aren't on the shard key
require scatter-gather
Resharding can be a painful, manual process
Replication for Availability
© 2015. All Rights Reserved. 14
Client
Users Data
Failover
Process
Monitor
Failover
Failover takes time. How long are
you offline while it's happening?
And while you're offline...
© 2015. All Rights Reserved. 15
Putting it All Together
© 2015. All Rights Reserved. 16
Client
Users Data
Putting it All Together
© 2015. All Rights Reserved. 16
Client
Users Data
Sharding
A-F G-M N-T U-Z
Putting it All Together
© 2015. All Rights Reserved. 16
Client
Users Data
Sharding
Router
A-F G-M N-T U-Z
Putting it All Together
© 2015. All Rights Reserved. 16
Client
Users Data
Router
A-F G-M N-T U-Z
Sharding and Replication (and probably Denormalization)
Putting it All Together
© 2015. All Rights Reserved. 16
Client
Users Data
Failover
Process
Router
A-F G-M N-T U-Z
Sharding and Replication (and probably Denormalization)
Putting it All Together
© 2015. All Rights Reserved. 16
Client
Users Data
Failover
Process
Monitor
Failover
Router
A-F G-M N-T U-Z
Sharding and Replication (and probably Denormalization)
Putting it All Together
© 2015. All Rights Reserved. 16
Client
Users Data
Failover
Process
Monitor
Failover
Router
A-F G-M N-T U-Z
Sharding and Replication (and probably Denormalization)
Putting it All Together
© 2015. All Rights Reserved. 16
Client
Users Data
Failover
Process
Monitor
Failover
Router
A-F G-M N-T U-Z
Replication Lag
Sharding and Replication (and probably Denormalization)
Putting it All Together
© 2015. All Rights Reserved. 16
Client
Users Data
Failover
Process
Monitor
Failover
Router
A-F G-M N-T U-Z
Replication Lag
Sharding and Replication (and probably Denormalization)
Putting it All Together
© 2015. All Rights Reserved. 16
Client
Users Data
Failover
Process
Monitor
Failover
Router
A-F G-M N-T U-Z
Replication Lag
Sharding and Replication (and probably Denormalization)
Putting it All Together
© 2015. All Rights Reserved. 16
Client
Users Data
Failover
Process
Monitor
Failover
Router
A-F G-M N-T U-Z
Replication Lag
Sharding and Replication (and probably Denormalization)
What is Cassandra?
© 2015. All Rights Reserved. 27
A linearly scaling and fault tolerant
distributed database
What is Cassandra?
© 2015. All Rights Reserved. 28
A linearly scaling and fault tolerant
distributed database
• Data spread over many nodes
• All nodes participate in a cluster
• All nodes are equal
• No SPOF (shared nothing)
• Run on commodity hardware
What is Cassandra?
© 2015. All Rights Reserved. 29
A linearly scaling and fault tolerant
distributed database
• Have more data? Add more nodes.
• Need more throughput? Add more nodes.
What is Cassandra?
© 2015. All Rights Reserved. 30
A linearly scaling and fault tolerant
distributed database
• Nodes down != Database Down
• Datacenter down != Database Down
• No middle of the night phone calls
Multi Datacenter with Cassandra
© 2015. All Rights Reserved. 31
America Zamunda
Client
Fault Tolerance in Cassandra
© 2015. All Rights Reserved. 32
You have the power to control fault
tolerance in Cassandra
Replication Factor
© 2015. All Rights Reserved. 33
How many copies of the data should exist?
Client
Write Beetlejuice
RF=3
Beetlejuice Beetlejuice
Beetlejuice
Consistency Level
© 2015. All Rights Reserved. 34
How many replicas do we need to hear
from before we acknowledge?
CL=ONE
Copy #1 Copy #2
Copy #3
Client
Consistency Level
© 2015. All Rights Reserved. 35
How many replicas do we need to hear
from before we acknowledge?
CL=QUORUM
Copy #1 Copy #2
Copy #3
Client
Consistency Levels and Speed
© 2015. All Rights Reserved. 36
Use a lower consistency level like ONE to
get faster reads and writes
Consistency Levels and Eventual Consistency
© 2015. All Rights Reserved. 37
Use a higher consistency level like
QUORUM if you don’t want to be surprised
by data from the past (stale data)
Before you get too excited...
© 2015. All Rights Reserved. 38
Cassandra is not...
• A Data Ocean, Lake, or Pond
• An In-Memory Database
• A Queue
• A magical database luck dragon
that will solve all your database
use cases and problems
© 2015. All Rights Reserved. 39
How bad of an idea?
© 2015. All Rights Reserved. 40
Actually a 90's movie Actually a 70's movie
Why Arnold?! Why?
Cassandra is good when...
• Uptime is a top priority
• You have unpredictable or high
scaling requirements
• The workload is transactional (i.e.
OLTP not OLAP)
• You are willing to put the time and
effort into understanding how it
works and how to use it
© 2015. All Rights Reserved. 41
© 2015. All Rights Reserved. 42
Movie References
(in order of appearance)
Leap of Faith (1992)
Patton (1970)
The Aristocats (1970)
When Harry Met Sally (1989)
Beverly Hills Cop (1984)
Lethal Weapon (1987)
Big (1988)
Trading Places (1983)
Highlander (1986)
© 2015. All Rights Reserved. 42
Spaceballs (1987)
Rain Man (1988)
Ghostbusters (1984)
Gremlins (1984)
Star Trek II: The Wrath of Khan (1982)
Star Wars Episode VI: Return of the Jedi (1983)
Weekend at Bernie's (1989)
Coming to America (1988)
Masters of the Universe (1987)
Beetlejuice (1988)
The Goonies (1985)
Top Gun (1986)
© 2015. All Rights Reserved. 42
Back to the Future (1985)
Footloose (1984)
The NeverEnding Story (1984)
Batman and Robin (1997)
Star Wars (1977)
Twins (1988)
The Karate Kid (1984)
Find me on Twitter: @LukeTillman
Thank You

More Related Content

What's hot

TechEvent 2019: DBaaS from Swisscom Cloud powered by Trivadis; Konrad Häfeli ...
TechEvent 2019: DBaaS from Swisscom Cloud powered by Trivadis; Konrad Häfeli ...TechEvent 2019: DBaaS from Swisscom Cloud powered by Trivadis; Konrad Häfeli ...
TechEvent 2019: DBaaS from Swisscom Cloud powered by Trivadis; Konrad Häfeli ...
Trivadis
 
Expedia Group: Our Migration Journey from Apache Cassandra to ScyllaDB
Expedia Group: Our Migration Journey from Apache Cassandra to ScyllaDB Expedia Group: Our Migration Journey from Apache Cassandra to ScyllaDB
Expedia Group: Our Migration Journey from Apache Cassandra to ScyllaDB
ScyllaDB
 
C* Capacity Forecasting (Ajay Upadhyay, Jyoti Shandil, Arun Agrawal, Netflix)...
C* Capacity Forecasting (Ajay Upadhyay, Jyoti Shandil, Arun Agrawal, Netflix)...C* Capacity Forecasting (Ajay Upadhyay, Jyoti Shandil, Arun Agrawal, Netflix)...
C* Capacity Forecasting (Ajay Upadhyay, Jyoti Shandil, Arun Agrawal, Netflix)...
DataStax
 
2017 DB Trends for Powering Real-Time Systems of Engagement
2017 DB Trends for Powering Real-Time Systems of Engagement2017 DB Trends for Powering Real-Time Systems of Engagement
2017 DB Trends for Powering Real-Time Systems of Engagement
Aerospike, Inc.
 
ACID & CAP: Clearing CAP Confusion and Why C In CAP ≠ C in ACID
ACID & CAP:  Clearing CAP Confusion and Why C In CAP ≠ C in ACIDACID & CAP:  Clearing CAP Confusion and Why C In CAP ≠ C in ACID
ACID & CAP: Clearing CAP Confusion and Why C In CAP ≠ C in ACID
Aerospike, Inc.
 
Apache Kudu (Incubating): New Hadoop Storage for Fast Analytics on Fast Data ...
Apache Kudu (Incubating): New Hadoop Storage for Fast Analytics on Fast Data ...Apache Kudu (Incubating): New Hadoop Storage for Fast Analytics on Fast Data ...
Apache Kudu (Incubating): New Hadoop Storage for Fast Analytics on Fast Data ...
Cloudera, Inc.
 
DEVNET-1166 Open SDN Controller APIs
DEVNET-1166	Open SDN Controller APIsDEVNET-1166	Open SDN Controller APIs
DEVNET-1166 Open SDN Controller APIs
Cisco DevNet
 
20150314 sahara intro and the future plan for open stack meetup
20150314 sahara intro and the future plan for open stack meetup20150314 sahara intro and the future plan for open stack meetup
20150314 sahara intro and the future plan for open stack meetup
Wei Ting Chen
 
Webinar: Performance vs. Cost - Solving The HPC Storage Tug-of-War
Webinar: Performance vs. Cost - Solving The HPC Storage Tug-of-WarWebinar: Performance vs. Cost - Solving The HPC Storage Tug-of-War
Webinar: Performance vs. Cost - Solving The HPC Storage Tug-of-War
Storage Switzerland
 
Webinar: The Bifurcation of the Flash Market
Webinar: The Bifurcation of the Flash MarketWebinar: The Bifurcation of the Flash Market
Webinar: The Bifurcation of the Flash Market
Storage Switzerland
 
There are 250 Database products, are you running the right one?
There are 250 Database products, are you running the right one?There are 250 Database products, are you running the right one?
There are 250 Database products, are you running the right one?
Aerospike, Inc.
 
IMCSummit 2015 - Day 2 Keynote - In-Memory Computing and the Emergence of Tie...
IMCSummit 2015 - Day 2 Keynote - In-Memory Computing and the Emergence of Tie...IMCSummit 2015 - Day 2 Keynote - In-Memory Computing and the Emergence of Tie...
IMCSummit 2015 - Day 2 Keynote - In-Memory Computing and the Emergence of Tie...
In-Memory Computing Summit
 
Part 2: Cloudera’s Operational Database: Unlocking New Benefits in the Cloud
Part 2: Cloudera’s Operational Database: Unlocking New Benefits in the CloudPart 2: Cloudera’s Operational Database: Unlocking New Benefits in the Cloud
Part 2: Cloudera’s Operational Database: Unlocking New Benefits in the Cloud
Cloudera, Inc.
 
HUG_Ireland_Apache_Arrow_Tomer_Shiran
HUG_Ireland_Apache_Arrow_Tomer_Shiran HUG_Ireland_Apache_Arrow_Tomer_Shiran
HUG_Ireland_Apache_Arrow_Tomer_Shiran
John Mulhall
 
Increase Your Mission Critical Application Performance without Breaking the B...
Increase Your Mission Critical Application Performance without Breaking the B...Increase Your Mission Critical Application Performance without Breaking the B...
Increase Your Mission Critical Application Performance without Breaking the B...
DataCore Software
 

What's hot (15)

TechEvent 2019: DBaaS from Swisscom Cloud powered by Trivadis; Konrad Häfeli ...
TechEvent 2019: DBaaS from Swisscom Cloud powered by Trivadis; Konrad Häfeli ...TechEvent 2019: DBaaS from Swisscom Cloud powered by Trivadis; Konrad Häfeli ...
TechEvent 2019: DBaaS from Swisscom Cloud powered by Trivadis; Konrad Häfeli ...
 
Expedia Group: Our Migration Journey from Apache Cassandra to ScyllaDB
Expedia Group: Our Migration Journey from Apache Cassandra to ScyllaDB Expedia Group: Our Migration Journey from Apache Cassandra to ScyllaDB
Expedia Group: Our Migration Journey from Apache Cassandra to ScyllaDB
 
C* Capacity Forecasting (Ajay Upadhyay, Jyoti Shandil, Arun Agrawal, Netflix)...
C* Capacity Forecasting (Ajay Upadhyay, Jyoti Shandil, Arun Agrawal, Netflix)...C* Capacity Forecasting (Ajay Upadhyay, Jyoti Shandil, Arun Agrawal, Netflix)...
C* Capacity Forecasting (Ajay Upadhyay, Jyoti Shandil, Arun Agrawal, Netflix)...
 
2017 DB Trends for Powering Real-Time Systems of Engagement
2017 DB Trends for Powering Real-Time Systems of Engagement2017 DB Trends for Powering Real-Time Systems of Engagement
2017 DB Trends for Powering Real-Time Systems of Engagement
 
ACID & CAP: Clearing CAP Confusion and Why C In CAP ≠ C in ACID
ACID & CAP:  Clearing CAP Confusion and Why C In CAP ≠ C in ACIDACID & CAP:  Clearing CAP Confusion and Why C In CAP ≠ C in ACID
ACID & CAP: Clearing CAP Confusion and Why C In CAP ≠ C in ACID
 
Apache Kudu (Incubating): New Hadoop Storage for Fast Analytics on Fast Data ...
Apache Kudu (Incubating): New Hadoop Storage for Fast Analytics on Fast Data ...Apache Kudu (Incubating): New Hadoop Storage for Fast Analytics on Fast Data ...
Apache Kudu (Incubating): New Hadoop Storage for Fast Analytics on Fast Data ...
 
DEVNET-1166 Open SDN Controller APIs
DEVNET-1166	Open SDN Controller APIsDEVNET-1166	Open SDN Controller APIs
DEVNET-1166 Open SDN Controller APIs
 
20150314 sahara intro and the future plan for open stack meetup
20150314 sahara intro and the future plan for open stack meetup20150314 sahara intro and the future plan for open stack meetup
20150314 sahara intro and the future plan for open stack meetup
 
Webinar: Performance vs. Cost - Solving The HPC Storage Tug-of-War
Webinar: Performance vs. Cost - Solving The HPC Storage Tug-of-WarWebinar: Performance vs. Cost - Solving The HPC Storage Tug-of-War
Webinar: Performance vs. Cost - Solving The HPC Storage Tug-of-War
 
Webinar: The Bifurcation of the Flash Market
Webinar: The Bifurcation of the Flash MarketWebinar: The Bifurcation of the Flash Market
Webinar: The Bifurcation of the Flash Market
 
There are 250 Database products, are you running the right one?
There are 250 Database products, are you running the right one?There are 250 Database products, are you running the right one?
There are 250 Database products, are you running the right one?
 
IMCSummit 2015 - Day 2 Keynote - In-Memory Computing and the Emergence of Tie...
IMCSummit 2015 - Day 2 Keynote - In-Memory Computing and the Emergence of Tie...IMCSummit 2015 - Day 2 Keynote - In-Memory Computing and the Emergence of Tie...
IMCSummit 2015 - Day 2 Keynote - In-Memory Computing and the Emergence of Tie...
 
Part 2: Cloudera’s Operational Database: Unlocking New Benefits in the Cloud
Part 2: Cloudera’s Operational Database: Unlocking New Benefits in the CloudPart 2: Cloudera’s Operational Database: Unlocking New Benefits in the Cloud
Part 2: Cloudera’s Operational Database: Unlocking New Benefits in the Cloud
 
HUG_Ireland_Apache_Arrow_Tomer_Shiran
HUG_Ireland_Apache_Arrow_Tomer_Shiran HUG_Ireland_Apache_Arrow_Tomer_Shiran
HUG_Ireland_Apache_Arrow_Tomer_Shiran
 
Increase Your Mission Critical Application Performance without Breaking the B...
Increase Your Mission Critical Application Performance without Breaking the B...Increase Your Mission Critical Application Performance without Breaking the B...
Increase Your Mission Critical Application Performance without Breaking the B...
 

Viewers also liked

From Monolith to Microservices with Cassandra, gRPC, and Falcor (from Cassand...
From Monolith to Microservices with Cassandra, gRPC, and Falcor (from Cassand...From Monolith to Microservices with Cassandra, gRPC, and Falcor (from Cassand...
From Monolith to Microservices with Cassandra, gRPC, and Falcor (from Cassand...
Luke Tillman
 
Introduction to Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache CassandraIntroduction to Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache Cassandra
Luke Tillman
 
Building your First Application with Cassandra
Building your First Application with CassandraBuilding your First Application with Cassandra
Building your First Application with Cassandra
Luke Tillman
 
Introduction to Apache Cassandra
Introduction to Apache CassandraIntroduction to Apache Cassandra
Introduction to Apache Cassandra
Luke Tillman
 
Event Sourcing with Cassandra (from Cassandra Japan Meetup in Tokyo March 2016)
Event Sourcing with Cassandra (from Cassandra Japan Meetup in Tokyo March 2016)Event Sourcing with Cassandra (from Cassandra Japan Meetup in Tokyo March 2016)
Event Sourcing with Cassandra (from Cassandra Japan Meetup in Tokyo March 2016)
Luke Tillman
 
Getting started with DataStax .NET Driver for Cassandra
Getting started with DataStax .NET Driver for CassandraGetting started with DataStax .NET Driver for Cassandra
Getting started with DataStax .NET Driver for Cassandra
Luke Tillman
 
Avoiding the Pit of Despair - Event Sourcing with Akka and Cassandra
Avoiding the Pit of Despair - Event Sourcing with Akka and CassandraAvoiding the Pit of Despair - Event Sourcing with Akka and Cassandra
Avoiding the Pit of Despair - Event Sourcing with Akka and Cassandra
Luke Tillman
 
A Deep Dive into Apache Cassandra for .NET Developers
A Deep Dive into Apache Cassandra for .NET DevelopersA Deep Dive into Apache Cassandra for .NET Developers
A Deep Dive into Apache Cassandra for .NET Developers
Luke Tillman
 
L'automatisation dans les reseaux d'entrerprise
L'automatisation dans les reseaux d'entrerpriseL'automatisation dans les reseaux d'entrerprise
L'automatisation dans les reseaux d'entrerprise
Cisco Canada
 
HTTP2 and gRPC
HTTP2 and gRPCHTTP2 and gRPC
HTTP2 and gRPC
Guo Jing
 
The adventure of enabling API management in a large enterprise (Josh Wang)
The adventure of enabling API management in a large enterprise (Josh Wang)The adventure of enabling API management in a large enterprise (Josh Wang)
The adventure of enabling API management in a large enterprise (Josh Wang)
Nordic APIs
 
Building High Performance APIs In Go Using gRPC And Protocol Buffers
Building High Performance APIs In Go Using gRPC And Protocol BuffersBuilding High Performance APIs In Go Using gRPC And Protocol Buffers
Building High Performance APIs In Go Using gRPC And Protocol Buffers
Shiju Varghese
 
Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)
Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)
Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)
Kai Wähner
 
NextGen Server/Client Architecture - gRPC + Unity + C#
NextGen Server/Client Architecture - gRPC + Unity + C#NextGen Server/Client Architecture - gRPC + Unity + C#
NextGen Server/Client Architecture - gRPC + Unity + C#
Yoshifumi Kawai
 
GRPC 101 - DevFest Belgium 2016
GRPC 101 - DevFest Belgium 2016GRPC 101 - DevFest Belgium 2016
GRPC 101 - DevFest Belgium 2016
Alex Van Boxel
 
Scale a Swagger based Web API (Guillaume Laforge)
Scale a Swagger based Web API (Guillaume Laforge)Scale a Swagger based Web API (Guillaume Laforge)
Scale a Swagger based Web API (Guillaume Laforge)
Nordic APIs
 

Viewers also liked (16)

From Monolith to Microservices with Cassandra, gRPC, and Falcor (from Cassand...
From Monolith to Microservices with Cassandra, gRPC, and Falcor (from Cassand...From Monolith to Microservices with Cassandra, gRPC, and Falcor (from Cassand...
From Monolith to Microservices with Cassandra, gRPC, and Falcor (from Cassand...
 
Introduction to Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache CassandraIntroduction to Data Modeling with Apache Cassandra
Introduction to Data Modeling with Apache Cassandra
 
Building your First Application with Cassandra
Building your First Application with CassandraBuilding your First Application with Cassandra
Building your First Application with Cassandra
 
Introduction to Apache Cassandra
Introduction to Apache CassandraIntroduction to Apache Cassandra
Introduction to Apache Cassandra
 
Event Sourcing with Cassandra (from Cassandra Japan Meetup in Tokyo March 2016)
Event Sourcing with Cassandra (from Cassandra Japan Meetup in Tokyo March 2016)Event Sourcing with Cassandra (from Cassandra Japan Meetup in Tokyo March 2016)
Event Sourcing with Cassandra (from Cassandra Japan Meetup in Tokyo March 2016)
 
Getting started with DataStax .NET Driver for Cassandra
Getting started with DataStax .NET Driver for CassandraGetting started with DataStax .NET Driver for Cassandra
Getting started with DataStax .NET Driver for Cassandra
 
Avoiding the Pit of Despair - Event Sourcing with Akka and Cassandra
Avoiding the Pit of Despair - Event Sourcing with Akka and CassandraAvoiding the Pit of Despair - Event Sourcing with Akka and Cassandra
Avoiding the Pit of Despair - Event Sourcing with Akka and Cassandra
 
A Deep Dive into Apache Cassandra for .NET Developers
A Deep Dive into Apache Cassandra for .NET DevelopersA Deep Dive into Apache Cassandra for .NET Developers
A Deep Dive into Apache Cassandra for .NET Developers
 
L'automatisation dans les reseaux d'entrerprise
L'automatisation dans les reseaux d'entrerpriseL'automatisation dans les reseaux d'entrerprise
L'automatisation dans les reseaux d'entrerprise
 
HTTP2 and gRPC
HTTP2 and gRPCHTTP2 and gRPC
HTTP2 and gRPC
 
The adventure of enabling API management in a large enterprise (Josh Wang)
The adventure of enabling API management in a large enterprise (Josh Wang)The adventure of enabling API management in a large enterprise (Josh Wang)
The adventure of enabling API management in a large enterprise (Josh Wang)
 
Building High Performance APIs In Go Using gRPC And Protocol Buffers
Building High Performance APIs In Go Using gRPC And Protocol BuffersBuilding High Performance APIs In Go Using gRPC And Protocol Buffers
Building High Performance APIs In Go Using gRPC And Protocol Buffers
 
Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)
Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)
Flogo - A Golang-powered Open Source IoT Integration Framework (Gophercon)
 
NextGen Server/Client Architecture - gRPC + Unity + C#
NextGen Server/Client Architecture - gRPC + Unity + C#NextGen Server/Client Architecture - gRPC + Unity + C#
NextGen Server/Client Architecture - gRPC + Unity + C#
 
GRPC 101 - DevFest Belgium 2016
GRPC 101 - DevFest Belgium 2016GRPC 101 - DevFest Belgium 2016
GRPC 101 - DevFest Belgium 2016
 
Scale a Swagger based Web API (Guillaume Laforge)
Scale a Swagger based Web API (Guillaume Laforge)Scale a Swagger based Web API (Guillaume Laforge)
Scale a Swagger based Web API (Guillaume Laforge)
 

Similar to Relational Scaling and the Temple of Gloom (from Cassandra Summit 2015)

Vertafore: Database Evaluation - Selecting Apache Cassandra
Vertafore: Database Evaluation - Selecting Apache CassandraVertafore: Database Evaluation - Selecting Apache Cassandra
Vertafore: Database Evaluation - Selecting Apache Cassandra
DataStax Academy
 
Two Approaches You Must Consider when Architecting Radar Systems
Two Approaches You Must Consider when Architecting Radar SystemsTwo Approaches You Must Consider when Architecting Radar Systems
Two Approaches You Must Consider when Architecting Radar Systems
Real-Time Innovations (RTI)
 
Syncsort, Tableau, & Cloudera present: Break the Barriers to Big Data Insight
Syncsort, Tableau, & Cloudera present: Break the Barriers to Big Data InsightSyncsort, Tableau, & Cloudera present: Break the Barriers to Big Data Insight
Syncsort, Tableau, & Cloudera present: Break the Barriers to Big Data Insight
Cloudera, Inc.
 
Reporting from the Trenches: Intuit & Cassandra
Reporting from the Trenches: Intuit & CassandraReporting from the Trenches: Intuit & Cassandra
Reporting from the Trenches: Intuit & Cassandra
DataStax
 
Syncsort, Tableau, & Cloudera present: Break the Barriers to Big Data Insight
Syncsort, Tableau, & Cloudera present: Break the Barriers to Big Data InsightSyncsort, Tableau, & Cloudera present: Break the Barriers to Big Data Insight
Syncsort, Tableau, & Cloudera present: Break the Barriers to Big Data Insight
Steven Totman
 
Syncsort, Tableau, & Cloudera present: Break the Barriers to Big Data Insight
Syncsort, Tableau, & Cloudera present: Break the Barriers to Big Data InsightSyncsort, Tableau, & Cloudera present: Break the Barriers to Big Data Insight
Syncsort, Tableau, & Cloudera present: Break the Barriers to Big Data Insight
Precisely
 
IMCSummit 2015 - 1 IT Business - The Evolution of Pivotal Gemfire
IMCSummit 2015 - 1 IT Business  - The Evolution of Pivotal GemfireIMCSummit 2015 - 1 IT Business  - The Evolution of Pivotal Gemfire
IMCSummit 2015 - 1 IT Business - The Evolution of Pivotal Gemfire
In-Memory Computing Summit
 
Can Your Mobile Infrastructure Survive 1 Million Concurrent Users?
Can Your Mobile Infrastructure Survive 1 Million Concurrent Users?Can Your Mobile Infrastructure Survive 1 Million Concurrent Users?
Can Your Mobile Infrastructure Survive 1 Million Concurrent Users?
TechWell
 
Stop the Blame Game with Increased Visibility of your Mobile-to-Mainframe IT ...
Stop the Blame Game with Increased Visibility of your Mobile-to-Mainframe IT ...Stop the Blame Game with Increased Visibility of your Mobile-to-Mainframe IT ...
Stop the Blame Game with Increased Visibility of your Mobile-to-Mainframe IT ...
CA Technologies
 
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
Insight Technology, Inc.
 
The Future of Data Management: The Enterprise Data Hub
The Future of Data Management: The Enterprise Data HubThe Future of Data Management: The Enterprise Data Hub
The Future of Data Management: The Enterprise Data Hub
Cloudera, Inc.
 
MySQL Cluster
MySQL ClusterMySQL Cluster
MySQL Cluster
Abel Flórez
 
IIMB presentation
IIMB presentationIIMB presentation
IIMB presentation
Aveekshith Bushan
 
Azure + DataStax Enterprise Powers Office 365 Per User Store
Azure + DataStax Enterprise Powers Office 365 Per User StoreAzure + DataStax Enterprise Powers Office 365 Per User Store
Azure + DataStax Enterprise Powers Office 365 Per User Store
DataStax Academy
 
Driving Down Costs of z Systems™ Storage
Driving Down Costs of z Systems™ StorageDriving Down Costs of z Systems™ Storage
Driving Down Costs of z Systems™ Storage
CA Technologies
 
Cassandra and IoT
Cassandra and IoTCassandra and IoT
Cassandra and IoT
Russell Spitzer
 
Unlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQLUnlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQL
Matt Lord
 
Top 10 Tips for an Effective Postgres Deployment
Top 10 Tips for an Effective Postgres DeploymentTop 10 Tips for an Effective Postgres Deployment
Top 10 Tips for an Effective Postgres Deployment
EDB
 
Pros_and_Cons_of_DW_Apps pdf.pdf
Pros_and_Cons_of_DW_Apps pdf.pdfPros_and_Cons_of_DW_Apps pdf.pdf
Pros_and_Cons_of_DW_Apps pdf.pdf
HernanKlint
 
Horses for Courses: Database Roundtable
Horses for Courses: Database RoundtableHorses for Courses: Database Roundtable
Horses for Courses: Database Roundtable
Eric Kavanagh
 

Similar to Relational Scaling and the Temple of Gloom (from Cassandra Summit 2015) (20)

Vertafore: Database Evaluation - Selecting Apache Cassandra
Vertafore: Database Evaluation - Selecting Apache CassandraVertafore: Database Evaluation - Selecting Apache Cassandra
Vertafore: Database Evaluation - Selecting Apache Cassandra
 
Two Approaches You Must Consider when Architecting Radar Systems
Two Approaches You Must Consider when Architecting Radar SystemsTwo Approaches You Must Consider when Architecting Radar Systems
Two Approaches You Must Consider when Architecting Radar Systems
 
Syncsort, Tableau, & Cloudera present: Break the Barriers to Big Data Insight
Syncsort, Tableau, & Cloudera present: Break the Barriers to Big Data InsightSyncsort, Tableau, & Cloudera present: Break the Barriers to Big Data Insight
Syncsort, Tableau, & Cloudera present: Break the Barriers to Big Data Insight
 
Reporting from the Trenches: Intuit & Cassandra
Reporting from the Trenches: Intuit & CassandraReporting from the Trenches: Intuit & Cassandra
Reporting from the Trenches: Intuit & Cassandra
 
Syncsort, Tableau, & Cloudera present: Break the Barriers to Big Data Insight
Syncsort, Tableau, & Cloudera present: Break the Barriers to Big Data InsightSyncsort, Tableau, & Cloudera present: Break the Barriers to Big Data Insight
Syncsort, Tableau, & Cloudera present: Break the Barriers to Big Data Insight
 
Syncsort, Tableau, & Cloudera present: Break the Barriers to Big Data Insight
Syncsort, Tableau, & Cloudera present: Break the Barriers to Big Data InsightSyncsort, Tableau, & Cloudera present: Break the Barriers to Big Data Insight
Syncsort, Tableau, & Cloudera present: Break the Barriers to Big Data Insight
 
IMCSummit 2015 - 1 IT Business - The Evolution of Pivotal Gemfire
IMCSummit 2015 - 1 IT Business  - The Evolution of Pivotal GemfireIMCSummit 2015 - 1 IT Business  - The Evolution of Pivotal Gemfire
IMCSummit 2015 - 1 IT Business - The Evolution of Pivotal Gemfire
 
Can Your Mobile Infrastructure Survive 1 Million Concurrent Users?
Can Your Mobile Infrastructure Survive 1 Million Concurrent Users?Can Your Mobile Infrastructure Survive 1 Million Concurrent Users?
Can Your Mobile Infrastructure Survive 1 Million Concurrent Users?
 
Stop the Blame Game with Increased Visibility of your Mobile-to-Mainframe IT ...
Stop the Blame Game with Increased Visibility of your Mobile-to-Mainframe IT ...Stop the Blame Game with Increased Visibility of your Mobile-to-Mainframe IT ...
Stop the Blame Game with Increased Visibility of your Mobile-to-Mainframe IT ...
 
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
[db tech showcase Tokyo 2016] E34: Oracle SE - RAC, HA and Standby are Still ...
 
The Future of Data Management: The Enterprise Data Hub
The Future of Data Management: The Enterprise Data HubThe Future of Data Management: The Enterprise Data Hub
The Future of Data Management: The Enterprise Data Hub
 
MySQL Cluster
MySQL ClusterMySQL Cluster
MySQL Cluster
 
IIMB presentation
IIMB presentationIIMB presentation
IIMB presentation
 
Azure + DataStax Enterprise Powers Office 365 Per User Store
Azure + DataStax Enterprise Powers Office 365 Per User StoreAzure + DataStax Enterprise Powers Office 365 Per User Store
Azure + DataStax Enterprise Powers Office 365 Per User Store
 
Driving Down Costs of z Systems™ Storage
Driving Down Costs of z Systems™ StorageDriving Down Costs of z Systems™ Storage
Driving Down Costs of z Systems™ Storage
 
Cassandra and IoT
Cassandra and IoTCassandra and IoT
Cassandra and IoT
 
Unlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQLUnlocking Big Data Insights with MySQL
Unlocking Big Data Insights with MySQL
 
Top 10 Tips for an Effective Postgres Deployment
Top 10 Tips for an Effective Postgres DeploymentTop 10 Tips for an Effective Postgres Deployment
Top 10 Tips for an Effective Postgres Deployment
 
Pros_and_Cons_of_DW_Apps pdf.pdf
Pros_and_Cons_of_DW_Apps pdf.pdfPros_and_Cons_of_DW_Apps pdf.pdf
Pros_and_Cons_of_DW_Apps pdf.pdf
 
Horses for Courses: Database Roundtable
Horses for Courses: Database RoundtableHorses for Courses: Database Roundtable
Horses for Courses: Database Roundtable
 

Recently uploaded

Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!
Tobias Schneck
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
c5vrf27qcz
 
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdfLee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
leebarnesutopia
 
AWS Certified Solutions Architect Associate (SAA-C03)
AWS Certified Solutions Architect Associate (SAA-C03)AWS Certified Solutions Architect Associate (SAA-C03)
AWS Certified Solutions Architect Associate (SAA-C03)
HarpalGohil4
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
Ortus Solutions, Corp
 
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptxAI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
Sunil Jagani
 
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
AlexanderRichford
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
DianaGray10
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
operationspcvita
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
Mydbops
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
DanBrown980551
 
GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...
GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...
GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...
GlobalLogic Ukraine
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
Miro Wengner
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving
 
What is an RPA CoE? Session 2 – CoE Roles
What is an RPA CoE?  Session 2 – CoE RolesWhat is an RPA CoE?  Session 2 – CoE Roles
What is an RPA CoE? Session 2 – CoE Roles
DianaGray10
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
ScyllaDB
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
UiPathCommunity
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Neo4j
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
christinelarrosa
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
Jason Yip
 

Recently uploaded (20)

Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!Containers & AI - Beauty and the Beast!?!
Containers & AI - Beauty and the Beast!?!
 
Y-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PPY-Combinator seed pitch deck template PP
Y-Combinator seed pitch deck template PP
 
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdfLee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
Lee Barnes - Path to Becoming an Effective Test Automation Engineer.pdf
 
AWS Certified Solutions Architect Associate (SAA-C03)
AWS Certified Solutions Architect Associate (SAA-C03)AWS Certified Solutions Architect Associate (SAA-C03)
AWS Certified Solutions Architect Associate (SAA-C03)
 
Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!Introducing BoxLang : A new JVM language for productivity and modularity!
Introducing BoxLang : A new JVM language for productivity and modularity!
 
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptxAI in the Workplace Reskilling, Upskilling, and Future Work.pptx
AI in the Workplace Reskilling, Upskilling, and Future Work.pptx
 
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
QR Secure: A Hybrid Approach Using Machine Learning and Security Validation F...
 
What is an RPA CoE? Session 1 – CoE Vision
What is an RPA CoE?  Session 1 – CoE VisionWhat is an RPA CoE?  Session 1 – CoE Vision
What is an RPA CoE? Session 1 – CoE Vision
 
The Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptxThe Microsoft 365 Migration Tutorial For Beginner.pptx
The Microsoft 365 Migration Tutorial For Beginner.pptx
 
Must Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during MigrationMust Know Postgres Extension for DBA and Developer during Migration
Must Know Postgres Extension for DBA and Developer during Migration
 
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
LF Energy Webinar: Carbon Data Specifications: Mechanisms to Improve Data Acc...
 
GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...
GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...
GlobalLogic Java Community Webinar #18 “How to Improve Web Application Perfor...
 
JavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green MasterplanJavaLand 2024: Application Development Green Masterplan
JavaLand 2024: Application Development Green Masterplan
 
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance PanelsNorthern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
Northern Engraving | Modern Metal Trim, Nameplates and Appliance Panels
 
What is an RPA CoE? Session 2 – CoE Roles
What is an RPA CoE?  Session 2 – CoE RolesWhat is an RPA CoE?  Session 2 – CoE Roles
What is an RPA CoE? Session 2 – CoE Roles
 
A Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's ArchitectureA Deep Dive into ScyllaDB's Architecture
A Deep Dive into ScyllaDB's Architecture
 
Session 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdfSession 1 - Intro to Robotic Process Automation.pdf
Session 1 - Intro to Robotic Process Automation.pdf
 
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid ResearchHarnessing the Power of NLP and Knowledge Graphs for Opioid Research
Harnessing the Power of NLP and Knowledge Graphs for Opioid Research
 
Christine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptxChristine's Supplier Sourcing Presentaion.pptx
Christine's Supplier Sourcing Presentaion.pptx
 
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
[OReilly Superstream] Occupy the Space: A grassroots guide to engineering (an...
 

Relational Scaling and the Temple of Gloom (from Cassandra Summit 2015)

  • 1. Luke Tillman Technical Evangelist at DataStax (@LukeTillman)
  • 2. • Evangelist with a focus on Developers • Long-time Developer on RDBMS (lots of .NET) Who are you?! 2
  • 3. The Good ol' Relational Database © 2015. All Rights Reserved. 3 First proposed in 1970
  • 4. The Relational Database Makes us Feel Good © 2015. All Rights Reserved. 4 SQL is ubiquitous and allows flexible querying Data modeling is well understood (3NF or higher) ACID guarantees make us feel good
  • 5. © 2015. All Rights Reserved. 5 Building and Scaling our Applications
  • 6. © 2015. All Rights Reserved. 5 Building and Scaling our Applications
  • 7. © 2015. All Rights Reserved. 5 Building and Scaling our Applications I'm getting too old for this…
  • 8. Scaling Up © 2015. All Rights Reserved. 8
  • 9. All these JOINs are Killing Us 9 SELECT array_agg(players), player_teams FROM ( SELECT DISTINCT t1.t1player AS players, t1.player_teams FROM ( SELECT p.playerid AS t1id, concat(p.playerid, ':', p.playername, ' ') AS t1player, array_agg (pl.teamid ORDER BY pl.teamid) AS player_teams FROM player p LEFT JOIN plays pl ON p.playerid = pl.playerid GROUP BY p.playerid, p.playername ) t1 INNER JOIN ( SELECT p.playerid AS t2id, array_agg (pl.teamid ORDER BY pl.teamid) AS player_teams FROM player p LEFT JOIN plays pl ON p.playerid = pl.playerid GROUP BY p.playerid, p.playername ) t2 ON t1.player_teams = t2.player_teams AND t1.t1id <> t2.t2id ) innerQuery © 2015. All Rights Reserved.
  • 10. All these JOINs are Killing Us 9 SELECT * FROM denormalized_view Let's Denormalize! © 2015. All Rights Reserved.
  • 11. All these JOINs are Killing Us 9 But I thought data modeling was 3NF or higher?! There can be only one! © 2015. All Rights Reserved.
  • 12. Read Replication 12 Client Users Data Replica 2 Replica 1 Primary Write Requests ReadRequests © 2015. All Rights Reserved. Replication Lag Consistent results? Nope, now eventually consistent Replication speed is limited by the speed of light
  • 13. Sharding © 2015. All Rights Reserved. 13 Client Router A-F G-M N-T U-Z Users Data Queries that aren't on the shard key require scatter-gather Resharding can be a painful, manual process
  • 14. Replication for Availability © 2015. All Rights Reserved. 14 Client Users Data Failover Process Monitor Failover Failover takes time. How long are you offline while it's happening?
  • 15. And while you're offline... © 2015. All Rights Reserved. 15
  • 16. Putting it All Together © 2015. All Rights Reserved. 16 Client Users Data
  • 17. Putting it All Together © 2015. All Rights Reserved. 16 Client Users Data Sharding A-F G-M N-T U-Z
  • 18. Putting it All Together © 2015. All Rights Reserved. 16 Client Users Data Sharding Router A-F G-M N-T U-Z
  • 19. Putting it All Together © 2015. All Rights Reserved. 16 Client Users Data Router A-F G-M N-T U-Z Sharding and Replication (and probably Denormalization)
  • 20. Putting it All Together © 2015. All Rights Reserved. 16 Client Users Data Failover Process Router A-F G-M N-T U-Z Sharding and Replication (and probably Denormalization)
  • 21. Putting it All Together © 2015. All Rights Reserved. 16 Client Users Data Failover Process Monitor Failover Router A-F G-M N-T U-Z Sharding and Replication (and probably Denormalization)
  • 22. Putting it All Together © 2015. All Rights Reserved. 16 Client Users Data Failover Process Monitor Failover Router A-F G-M N-T U-Z Sharding and Replication (and probably Denormalization)
  • 23. Putting it All Together © 2015. All Rights Reserved. 16 Client Users Data Failover Process Monitor Failover Router A-F G-M N-T U-Z Replication Lag Sharding and Replication (and probably Denormalization)
  • 24. Putting it All Together © 2015. All Rights Reserved. 16 Client Users Data Failover Process Monitor Failover Router A-F G-M N-T U-Z Replication Lag Sharding and Replication (and probably Denormalization)
  • 25. Putting it All Together © 2015. All Rights Reserved. 16 Client Users Data Failover Process Monitor Failover Router A-F G-M N-T U-Z Replication Lag Sharding and Replication (and probably Denormalization)
  • 26. Putting it All Together © 2015. All Rights Reserved. 16 Client Users Data Failover Process Monitor Failover Router A-F G-M N-T U-Z Replication Lag Sharding and Replication (and probably Denormalization)
  • 27. What is Cassandra? © 2015. All Rights Reserved. 27 A linearly scaling and fault tolerant distributed database
  • 28. What is Cassandra? © 2015. All Rights Reserved. 28 A linearly scaling and fault tolerant distributed database • Data spread over many nodes • All nodes participate in a cluster • All nodes are equal • No SPOF (shared nothing) • Run on commodity hardware
  • 29. What is Cassandra? © 2015. All Rights Reserved. 29 A linearly scaling and fault tolerant distributed database • Have more data? Add more nodes. • Need more throughput? Add more nodes.
  • 30. What is Cassandra? © 2015. All Rights Reserved. 30 A linearly scaling and fault tolerant distributed database • Nodes down != Database Down • Datacenter down != Database Down • No middle of the night phone calls
  • 31. Multi Datacenter with Cassandra © 2015. All Rights Reserved. 31 America Zamunda Client
  • 32. Fault Tolerance in Cassandra © 2015. All Rights Reserved. 32 You have the power to control fault tolerance in Cassandra
  • 33. Replication Factor © 2015. All Rights Reserved. 33 How many copies of the data should exist? Client Write Beetlejuice RF=3 Beetlejuice Beetlejuice Beetlejuice
  • 34. Consistency Level © 2015. All Rights Reserved. 34 How many replicas do we need to hear from before we acknowledge? CL=ONE Copy #1 Copy #2 Copy #3 Client
  • 35. Consistency Level © 2015. All Rights Reserved. 35 How many replicas do we need to hear from before we acknowledge? CL=QUORUM Copy #1 Copy #2 Copy #3 Client
  • 36. Consistency Levels and Speed © 2015. All Rights Reserved. 36 Use a lower consistency level like ONE to get faster reads and writes
  • 37. Consistency Levels and Eventual Consistency © 2015. All Rights Reserved. 37 Use a higher consistency level like QUORUM if you don’t want to be surprised by data from the past (stale data)
  • 38. Before you get too excited... © 2015. All Rights Reserved. 38
  • 39. Cassandra is not... • A Data Ocean, Lake, or Pond • An In-Memory Database • A Queue • A magical database luck dragon that will solve all your database use cases and problems © 2015. All Rights Reserved. 39
  • 40. How bad of an idea? © 2015. All Rights Reserved. 40 Actually a 90's movie Actually a 70's movie Why Arnold?! Why?
  • 41. Cassandra is good when... • Uptime is a top priority • You have unpredictable or high scaling requirements • The workload is transactional (i.e. OLTP not OLAP) • You are willing to put the time and effort into understanding how it works and how to use it © 2015. All Rights Reserved. 41
  • 42. © 2015. All Rights Reserved. 42 Movie References (in order of appearance) Leap of Faith (1992) Patton (1970) The Aristocats (1970) When Harry Met Sally (1989) Beverly Hills Cop (1984) Lethal Weapon (1987) Big (1988) Trading Places (1983) Highlander (1986)
  • 43. © 2015. All Rights Reserved. 42 Spaceballs (1987) Rain Man (1988) Ghostbusters (1984) Gremlins (1984) Star Trek II: The Wrath of Khan (1982) Star Wars Episode VI: Return of the Jedi (1983) Weekend at Bernie's (1989) Coming to America (1988) Masters of the Universe (1987) Beetlejuice (1988) The Goonies (1985) Top Gun (1986)
  • 44. © 2015. All Rights Reserved. 42 Back to the Future (1985) Footloose (1984) The NeverEnding Story (1984) Batman and Robin (1997) Star Wars (1977) Twins (1988) The Karate Kid (1984) Find me on Twitter: @LukeTillman