SlideShare a Scribd company logo
Cassandra
& Redis
Diego Pacheco
Cassandra Redis
Cassandra
Cassandra
❏ FOSS
❏ NoSQL Database
❏ Low Latency
❏ High Throughput
❏ Battle tested by Netflix, Apple, Facebook.
❏ AP on CAP - Favors availability over consistency.
❏ Multi-region support.
❏ Great software but hard to operate.
Cassandra Redis
Cassandra ~ Netflix 2013
Cassandra ~ Apple 2016
Cassandra ~ Spotify 2019
Cassandra ~ Data Model
How to have Success with Cassandra?
❏ Understand system / service / app requirements
❏ Identify your data access patterns
❏ Model around the access patterns
❏ Denormalization is your friend (by* query tables)
❏ Benchmark
❏ Tuneup
❏ Repeat
Netflix Benchmark: 1M writes/sec
Cassandra Cluster
❏ Master less
❏ Anti-entropy HH
❏ Consistent Hashing
❏ Murmur3
❏ Virtual Nodes
❏ Dynamic Scale out
Cassandra Data Replication
Cassandra Tunable Consistency
❏ Tunable for Read | Writes
❏ Consistency VS Availability
❏ One, Two, Three,
❏ QUORUM(majority n/2+1), Local_Quorun
❏ Each_Quorun
❏ Local_one
❏ All, Any
Cassandra Tombstones
Cassandra: Write Path
Cassandra: Read Path
Cassandra: Reads & Index
❏ Partition Key Cache | Row Cache
❏ Off Heap
❏ Configurable
❏ Secondary Index
❏ Filters data on table by non-primary key
❏ Allow Filtering (it can be problematic)
Cassandra: Compaction
❏ Merge SSTables
❏ Can be trigger by node_tool
❏ Impact Cassandra Performance
❏ Different Strategies for different workloads
Cassandra: Compaction
Cassandra: Compaction Strategies
Cassandra: Repair
❏ Anti-entropy mechanism (expensive, slow)
❏ 100% needed in Multi-region clusters
❏ Other scenarios that you need repairs:
❏ Low consistent reads and writes
❏ Frequent nodes outage
❏ Low reads repair chance
❏ Flaky networks
Cassandra: Read Repair
❏ Easy and cheap (when reading from multiples replicas)
❏ Hot Data will be repaired a lot
Cassandra: When to not Repair
❏ Short TTLs
❏ High Consistent read and writes
❏ High Read repair chance
Cassandra: Repair Pain points - most on scale
❏ Stream timeouts
❏ Tracking / Resume Repairs
❏ CPU Usage
❏ Disk I/O
❏ Latencies / SLA
❏ Wide Partitions
Cassandra: Poor Usage - Anti-Patterns
❏ Batch usage: Select * from whole table /
re-insert periodically
❏ Lack of denormalized tables to support queries (allow filtering)
❏ Queue
❏ Extreme large row sizes
❏ Abuse of Collections Data types(tombstones)
❏ Read Before Writing (or write and read immediately.)
Running Cassandra: $ bin/cassandra
Running Cassandra: $ bin/cqlsh
Running Cassandra: Java Code
Running Cassandra: Java Code
Running Cassandra: Java Code
Running Cassandra: Java Code
Running Cassandra: Java Code
Running Cassandra: Java Code Async
Running Cassandra: Java Code Async
Running Cassandra: Java Code Async
Running Cassandra: Java Code Mapper
Running Cassandra: Java Code Mapper
Running Cassandra: Java Code Mapper
Want to join the DevOps side of the Force?
Redis
Redis
❏ FOSS
❏ In Memory K/V Store written in C
❏ Create for: Caching, Session Store, Queue, Analytics
❏ Specific Commands per Data Structures: Strings, Hash, sets
❏ Keys TTL
❏ Bring your own Data Structure
❏ Fast, Low Latency, Battle tested everybody. :D
❏ Single Thread :(
V5
Redis - Data Structures
Redis >= 4.x
❏ Redis-Modules
❏ It's not Lua Scripting
❏ Built in C
❏ Low Latency | Embedded in Redis
❏ Use cases: Extends Redis / New Capabilities DSs
Redis >= 5.x
Redis: make ; src/redis-server
https://redis.io/download
Redis: src/redis-cli
https://redis.io/download
Redis: src/redis-cli
https://redis.io/commands/
Redis & Java: Lettuce
Redis & Java: Spring Data + Lettuce
Redis & Java: Spring Data + Lettuce
Redis & Java: Spring Data + Lettuce
Redis & Java: Spring Data + Lettuce
Redis & Java: Spring Data + Lettuce
Redis & Java: Spring Data + Lettuce : Hash Mapping
Redis & Java: Spring Data + Lettuce : Hash Mapping
Redis & Java: Spring Data + Lettuce : Hash Mapping
Redis & Java: Spring Data + Lettuce : Hash Mapping
Exercises
Constraints
You can code this exercises with Java, Scala or Clojure.
You can use any framework you like. UI is not required.
You need to run Cassandra 3.x and Redis 5.x (nativily, docker, does not matter).
1. Use cassandra and build Movie Catalog Service Where movies should have ID(UUID), name,
category, length, linkToYouTubeTrailer. You should be able to query by category, name and ID.
2. Use Redis and Build a Twitter application where you should have tweet(message) and you
should be able to follow people and people could follow you.
3. Build a profile Service using Cassandra, you should have a REST interface with the following
data: ID(UUID), name, email, dateOfBirth, gender, twitterURL, faceURL. You need store the
data in Cassandra and use Redis as a Cache. You need support the following operations:
a. List all users by Id
b. List all users by Email
c. Add / Remove / Update users
Cassandra
& Redis
Diego Pacheco

More Related Content

What's hot (19)

PDF
Webinar: Does it Still Make Sense to do Big Data with Small Nodes?
Julia Angell
 
PDF
Comparing Apache Cassandra 4.0, 3.0, and ScyllaDB
ScyllaDB
 
PDF
How netflix manages petabyte scale apache cassandra in the cloud
Vinay Kumar Chella
 
PPTX
Load testing Cassandra applications
Ben Slater
 
PDF
ScyllaDB: NoSQL at Ludicrous Speed
J On The Beach
 
PPTX
Everyday I’m scaling... Cassandra
Instaclustr
 
PPTX
Speeding up R with Parallel Programming in the Cloud
Revolution Analytics
 
PDF
Seastar / ScyllaDB, or how we implemented a 10-times faster Cassandra
Tzach Livyatan
 
PDF
Cassandra Day SV 2014: Beyond Read-Modify-Write with Apache Cassandra
DataStax Academy
 
PPT
Webinar: Getting Started with Apache Cassandra
DataStax
 
PDF
Cassandra Day Atlanta 2015: Diagnosing Problems in Production
DataStax Academy
 
PPTX
Cassandra
Pooja GV
 
PDF
Seattle Cassandra Meetup - HasOffers
btoddb
 
PPTX
Cassandra compaction
Kazutaka Tomita
 
PDF
Building Scalable, Real Time Applications for Financial Services with DataStax
DataStax
 
PDF
Redis for horizontally scaled data processing at jFrog bintray
Redis Labs
 
PDF
Scylla db@sf data meetup, dec 1 2015
Dor Laor
 
PDF
1 Million Writes per second on 60 nodes with Cassandra and EBS
Jim Plush
 
PPTX
Building a Multi-Region Cluster at Target (Aaron Ploetz, Target) | Cassandra ...
DataStax
 
Webinar: Does it Still Make Sense to do Big Data with Small Nodes?
Julia Angell
 
Comparing Apache Cassandra 4.0, 3.0, and ScyllaDB
ScyllaDB
 
How netflix manages petabyte scale apache cassandra in the cloud
Vinay Kumar Chella
 
Load testing Cassandra applications
Ben Slater
 
ScyllaDB: NoSQL at Ludicrous Speed
J On The Beach
 
Everyday I’m scaling... Cassandra
Instaclustr
 
Speeding up R with Parallel Programming in the Cloud
Revolution Analytics
 
Seastar / ScyllaDB, or how we implemented a 10-times faster Cassandra
Tzach Livyatan
 
Cassandra Day SV 2014: Beyond Read-Modify-Write with Apache Cassandra
DataStax Academy
 
Webinar: Getting Started with Apache Cassandra
DataStax
 
Cassandra Day Atlanta 2015: Diagnosing Problems in Production
DataStax Academy
 
Cassandra
Pooja GV
 
Seattle Cassandra Meetup - HasOffers
btoddb
 
Cassandra compaction
Kazutaka Tomita
 
Building Scalable, Real Time Applications for Financial Services with DataStax
DataStax
 
Redis for horizontally scaled data processing at jFrog bintray
Redis Labs
 
Scylla db@sf data meetup, dec 1 2015
Dor Laor
 
1 Million Writes per second on 60 nodes with Cassandra and EBS
Jim Plush
 
Building a Multi-Region Cluster at Target (Aaron Ploetz, Target) | Cassandra ...
DataStax
 

Similar to Cassandra Redis (20)

PPTX
Cassandra synergy
niallmilton
 
PDF
Deep dive into event store using Apache Cassandra
AhmedabadJavaMeetup
 
PPT
Real world capacity
Edward Capriolo
 
PPTX
Cassandra - A Basic Introduction Guide
Mohammed Fazuluddin
 
PPTX
Unit -3 _Cassandra-CRUD Operations_Practice Examples
chayapathiar1
 
PPTX
Unit -3 -Features of Cassandra, CQL Data types, CQLSH, Keyspaces
ssuser9d6aac
 
PDF
Cassandra at Pollfish
Stavros Kontopoulos
 
PDF
Cassandra at Pollfish
Pollfish
 
PDF
On Rails with Apache Cassandra
Stu Hood
 
PDF
Cassandra
Carbo Kuo
 
PPTX
High order bits from cassandra & hadoop
srisatish ambati
 
PDF
ScyllaDB: What could you do with Cassandra compatibility at 1.8 million reque...
Data Con LA
 
PPTX
Cassandra at no_sql
srisatish ambati
 
PDF
Cassandra Database
YounesCharfaoui
 
PPTX
Using Cassandra with your Web Application
supertom
 
PPT
No sql
Shruti_gtbit
 
PDF
Edge performance with in memory nosql
Liviu Costea
 
PPTX
Cassandra for mission critical data
Oleksandr Semenov
 
PDF
Cassandra tw presentation
OmarFaroque16
 
PPTX
CASSANDRA apache cassandra apacheee.pptx
jerrygame3121
 
Cassandra synergy
niallmilton
 
Deep dive into event store using Apache Cassandra
AhmedabadJavaMeetup
 
Real world capacity
Edward Capriolo
 
Cassandra - A Basic Introduction Guide
Mohammed Fazuluddin
 
Unit -3 _Cassandra-CRUD Operations_Practice Examples
chayapathiar1
 
Unit -3 -Features of Cassandra, CQL Data types, CQLSH, Keyspaces
ssuser9d6aac
 
Cassandra at Pollfish
Stavros Kontopoulos
 
Cassandra at Pollfish
Pollfish
 
On Rails with Apache Cassandra
Stu Hood
 
Cassandra
Carbo Kuo
 
High order bits from cassandra & hadoop
srisatish ambati
 
ScyllaDB: What could you do with Cassandra compatibility at 1.8 million reque...
Data Con LA
 
Cassandra at no_sql
srisatish ambati
 
Cassandra Database
YounesCharfaoui
 
Using Cassandra with your Web Application
supertom
 
No sql
Shruti_gtbit
 
Edge performance with in memory nosql
Liviu Costea
 
Cassandra for mission critical data
Oleksandr Semenov
 
Cassandra tw presentation
OmarFaroque16
 
CASSANDRA apache cassandra apacheee.pptx
jerrygame3121
 
Ad

More from Diego Pacheco (20)

PDF
Naming Things Book : Simple Book Review!
Diego Pacheco
 
PDF
Continuous Discovery Habits Book Review.pdf
Diego Pacheco
 
PDF
Thoughts about Shape Up
Diego Pacheco
 
PDF
Holacracy
Diego Pacheco
 
PDF
AWS IAM
Diego Pacheco
 
PDF
CDKs
Diego Pacheco
 
PDF
Encryption Deep Dive
Diego Pacheco
 
PDF
Sec 101
Diego Pacheco
 
PDF
Reflections on SCM
Diego Pacheco
 
PDF
Management: Doing the non-obvious! III
Diego Pacheco
 
PDF
Design is not Subjective
Diego Pacheco
 
PDF
Architecture & Engineering : Doing the non-obvious!
Diego Pacheco
 
PDF
Management doing the non-obvious II
Diego Pacheco
 
PDF
Testing in production
Diego Pacheco
 
PDF
Nine lies about work
Diego Pacheco
 
PDF
Management: doing the nonobvious!
Diego Pacheco
 
PDF
AI and the Future
Diego Pacheco
 
PDF
Dealing with dependencies
Diego Pacheco
 
PDF
Dealing with dependencies in tests
Diego Pacheco
 
PDF
Kanban 2020
Diego Pacheco
 
Naming Things Book : Simple Book Review!
Diego Pacheco
 
Continuous Discovery Habits Book Review.pdf
Diego Pacheco
 
Thoughts about Shape Up
Diego Pacheco
 
Holacracy
Diego Pacheco
 
AWS IAM
Diego Pacheco
 
Encryption Deep Dive
Diego Pacheco
 
Sec 101
Diego Pacheco
 
Reflections on SCM
Diego Pacheco
 
Management: Doing the non-obvious! III
Diego Pacheco
 
Design is not Subjective
Diego Pacheco
 
Architecture & Engineering : Doing the non-obvious!
Diego Pacheco
 
Management doing the non-obvious II
Diego Pacheco
 
Testing in production
Diego Pacheco
 
Nine lies about work
Diego Pacheco
 
Management: doing the nonobvious!
Diego Pacheco
 
AI and the Future
Diego Pacheco
 
Dealing with dependencies
Diego Pacheco
 
Dealing with dependencies in tests
Diego Pacheco
 
Kanban 2020
Diego Pacheco
 
Ad

Recently uploaded (20)

PDF
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
PDF
Complete Network Protection with Real-Time Security
L4RGINDIA
 
PDF
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
PPTX
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
PPTX
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
PPTX
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
Jak MŚP w Europie Środkowo-Wschodniej odnajdują się w świecie AI
dominikamizerska1
 
Complete Network Protection with Real-Time Security
L4RGINDIA
 
Building Resilience with Digital Twins : Lessons from Korea
SANGHEE SHIN
 
Top iOS App Development Company in the USA for Innovative Apps
SynapseIndia
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
✨Unleashing Collaboration: Salesforce Channels & Community Power in Patna!✨
SanjeetMishra29
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Transcript: New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
Building a Production-Ready Barts Health Secure Data Environment Tooling, Acc...
Barts Health
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
Log-Based Anomaly Detection: Enhancing System Reliability with Machine Learning
Mohammed BEKKOUCHE
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 

Cassandra Redis