SlideShare a Scribd company logo
Hecuba2
Cassandra Operations Made Easy
Radovan Zvoncek
zvo@spotify.com
Agenda
1 Two peace stories
2 Cassandra infrastructure at Spotify
3 What exactly is Hecuba2?
4 Wrap up
2© DataStax, All Rights Reserved.
About Radovan
Likes pancakes
© DataStax, All Rights Reserved. 3
About Radovan
Likes pancakes
Now knows where to get them
© DataStax, All Rights Reserved. 4
About Radovan
Likes pancakes
Now knows where to get them
Works at Spotify
© DataStax, All Rights Reserved. 5
Spotify
Music streaming service
● ~ 100 million active users
● ~ 2 billion playlists
© DataStax, All Rights Reserved. 6
Spotify
Music streaming service
● ~ 100 million active users
● ~ 2 billion playlists
Happy Apache Cassandra user
● ~ 100 Cassandra clusters
● ~ 1000 nodes altogether
© DataStax, All Rights Reserved. 7
The Playlist Cluster
The largest cluster we have
● 2 x 45 nodes
● ~ 1TB of data on each node
© DataStax, All Rights Reserved. 8
The Playlist Cluster
The largest cluster we have
● 2 x 45 nodes
● ~ 1TB of data on each node
© DataStax, All Rights Reserved. 9
The Playlist Cluster
The largest cluster we have
● 2 x 45 nodes
● ~ 1TB of data on each node
Had to expand by 50%
© DataStax, All Rights Reserved. 10
The previous large cluster expansion went so wrong…
Peace Story #1: The Playlist Expansion
© DataStax, All Rights Reserved. 11
The previous large cluster expansion went so wrong…
How exactly to do the expansion now?
Peace Story #1: The Playlist Expansion
© DataStax, All Rights Reserved. 12
The previous large cluster expansion went so wrong…
How exactly to do the expansion now?
What tokens should the new nodes have?
Peace Story #1: The Playlist Expansion
© DataStax, All Rights Reserved. 13
Peace Story #1: The Playlist Expansion
The previous large cluster expansion went so wrong…
How exactly to do the expansion now?
What tokens should the new nodes have?
How to bootstrap the nodes?
© DataStax, All Rights Reserved. 14
Peace Story #1: The Playlist Expansion
Turns out, we needed just one command:
© DataStax, All Rights Reserved. 15
hecuba2-cli expand-cluster
dc1-playlistcassandra-a{31..45}.foo.net
Peace Story #1: The Playlist Expansion
Turns out, we needed just one command:
And one peer review
© DataStax, All Rights Reserved. 16
hecuba2-cli expand-cluster
dc1-playlistcassandra-a{31..45}.foo.net
Peace Story #1: The Playlist Expansion
Turns out, we needed just one command:
And one peer review
And then a week of waiting
© DataStax, All Rights Reserved. 17
hecuba2-cli expand-cluster
dc1-playlistcassandra-a{31..45}.foo.net
Peace Story #1: The Playlist Expansion
18
Peace Story #2: The Slush Incident
© DataStax, All Rights Reserved. 19
Peace Story #2: The Slush Incident
© DataStax, All Rights Reserved. 20
Peace Story #2: The Slush Incident
Got paged with 2 out of 3 nodes being down
© DataStax, All Rights Reserved. 21
Datacenter: dc1
==========
Address Rack Status Load Owns Token
dc1-slush-1.foo.net rac1 Up Normal 797.27 GB 33.33% 0
dc1-slush-2.foo.net rac1 Down Normal 798.58 GB 33.33% 56...
dc1-slush-3.foo.net rac1 Down Normal 797.58 GB 33.33% 11...
Peace Story #2: The Slush Incident
Turns out, we needed just two commands
© DataStax, All Rights Reserved. 22
hecuba2-cli replace-nodes
--old-host dc1-slush-2.foo.net
--new-host dc1-slush-4.foo.net
hecuba2-cli replace-nodes
--old-host dc1-slush-3.foo.net
--new-host dc1-slush-5.foo.net
Peace Story #2: The Slush Incident
What gave us two peer reviews, such as:
© DataStax, All Rights Reserved. 23
Peace Story #2: The Slush Incident
After a while, we ended up with
© DataStax, All Rights Reserved. 24
Datacenter: dc1
==========
Address Rack Status Load Owns Token
dc1-slush-1.foo.net rac1 Up Normal 797.27 GB 33.33% 0
dc1-slush-4.foo.net rac1 Up Normal 798.58 GB 33.33% 56...
dc1-slush-5.foo.net rac1 Up Normal 797.58 GB 33.33% 11...
The Peace Stories
Very pleasant experience operating Cassandra @ Spotify
All because our infrastructure
© DataStax, All Rights Reserved. 25
Agenda
1 Two peace stories
2 Cassandra infrastructure at Spotify
3 What exactly is Hecuba2?
4 Wrap up
26© DataStax, All Rights Reserved.
Cassandra Infrastructure @ Spotify
Let’s just create a Cassandra cluster like a Spotifier
© DataStax, All Rights Reserved. 27
Creating C* Cluster Like A Spotifier
Step 1: Get some machines
© DataStax, All Rights Reserved. 28
Creating C* Cluster Like A Spotifier
Step 1: Get some machines
© DataStax, All Rights Reserved. 29
Creating C* Cluster Like A Spotifier
Step 1: Get some machines
More info about System-Z
Modelling Microservices at Spotify
by Petter Måhlén
https://youtu.be/7XDA044tl8k
© DataStax, All Rights Reserved. 30
Creating C* Cluster Like A Spotifier
Step 1: Get some machines
Step 2: Install the operating system
© DataStax, All Rights Reserved. 31
Creating C* Cluster Like A Spotifier
Step 1: Get some machines
Step 2: Install the operating system
© DataStax, All Rights Reserved. 32
Creating C* Cluster Like A Spotifier
Step 1: Get some machines
Step 2: Setup the cluster
© DataStax, All Rights Reserved. 33
Creating C* Cluster Like A Spotifier
Step 1: Get some machines
Step 2: Setup the cluster
© DataStax, All Rights Reserved. 34
hecuba2-cli create-cluster
--cluster-name "My new cluster"
--owner mySquad dc1-userdatacass-
{1..3}.foo.net
Creating C* Cluster Like A Spotifier
© DataStax, All Rights Reserved.
Step 1: Get some machines
Step 2: Setup the cluster
Step 3: Check PR
35
Creating C* Cluster Like A Spotifier
© DataStax, All Rights Reserved.
Step 1: Get some machines
Step 2: Setup the cluster
Step 3: Check PR
Step 4: Wait
36
Creating C* Cluster Like A Spotifier
© DataStax, All Rights Reserved.
Step 1: Get some machines
Step 2: Setup the cluster
Step 3: Check PR
Step 4: Wait
This will get picked up by our conf. management system and
● Install software
● Configure Cassandra
37
Configuring Cassandra
© DataStax, All Rights Reserved. 38
Configuring Cassandra
Is (almost) all about putting things into config files
© DataStax, All Rights Reserved. 39
Configuring Cassandra
Is (almost) all about putting things into config files
Mostly tokens and seeds
● Tokens are clunky large strings
● V-nodes would help, but...
© DataStax, All Rights Reserved. 40
Configuring Cassandra
Is (almost) all about putting things into config files
Mostly tokens and seeds
● Tokens are clunky large strings
● V-nodes would help, but...
Also node bootstrap
● All nodes joining at once is not desired
© DataStax, All Rights Reserved. 41
Configuring Cassandra
Is (almost) all about putting things into config files
Mostly tokens and seeds
● Tokens are clunky large strings
● V-nodes would help, but...
Also node bootstrap
● All nodes joining at once is not desired
Both are handled by Hecuba2
© DataStax, All Rights Reserved. 42
Agenda
1 Two peace stories
2 Cassandra infrastructure at Spotify
3 What exactly is Hecuba2?
4 Wrap up
43© DataStax, All Rights Reserved.
What Exactly is Hecuba2
© DataStax, All Rights Reserved. 44
Hecuba
YAML
File
Hecuba2
Agent
Hecuba2
jmx-
proxy
Hecuba2
SeedPro
vider
Hecuba2
Agent
Hecuba2
jmx-
proxy
Hecuba2
Seed
Provider
Cassandra NodeHecuba2
Client
Library
C*
Process
Hecuba YAML File
Represents the truth about the cluster
© DataStax, All Rights Reserved. 45
Hecuba YAML File
dc1-mytestcass-1.foo.net:
cluster_name: mytestcass
dc: dc1
seed: true
token: 0
dc1-mytestcass-2.foo.net:
cluster_name: mytestcass
dc: dc1
seed: false
token: 56713727820156410577229101238628035242
© DataStax, All Rights Reserved. 46
Hecuba2 Client Library
Manipulates the Hecuba YAML file
© DataStax, All Rights Reserved. 47
Hecuba2 Client Library
Manipulates the Hecuba YAML file
Does this in a smart way
© DataStax, All Rights Reserved. 48
Hecuba2 Client Library
Manipulates the Hecuba YAML file
Does this in a smart way
Doubling the cluster
© DataStax, All Rights Reserved. 49
Double the size
New node
Existing node stayed in place
Manipulates the Hecuba YAML file
Does this in a smart way
Doubling the cluster
Expand by 50%
Hecuba2 Client Library
© DataStax, All Rights Reserved. 50
Add 2 nodes
New node
Existing node stayed in place
Existing node moved
Hecuba2 Server-Side Components
© DataStax, All Rights Reserved. 51
Hecuba2
Agent
Hecuba2
jmx-
proxy
Hecuba2
Seed
Provider
Cassandra Node
C*
Process
Hecuba2 Server-Side Components
Again, three things:
● hecuba2-agent
○ State machine managing the C* process
© DataStax, All Rights Reserved. 52
hecuba2-agent
© DataStax, All Rights Reserved. 53
hecuba2-agent
© DataStax, All Rights Reserved. 54
Hecuba2 Server-Side Components
Again, three things:
● hecuba2-agent
○ State machine managing the C* process
● hecuba2-jmxproxy
○ nodetool with JSON output
© DataStax, All Rights Reserved. 55
Hecuba2 Server-Side Components
Again, three things:
● hecuba2-agent
○ State machine managing the C* process
● hecuba2-jmxproxy
○ nodetool with JSON output
● hecuba2-seedprovider
○ Picks seeds from Hecuba YAML
© DataStax, All Rights Reserved. 56
How Does It All Work Together
© DataStax, All Rights Reserved. 57
How Does It All Work Together
© DataStax, All Rights Reserved. 58
Hecuba2
Client
Library
How Does It All Work Together
© DataStax, All Rights Reserved. 59
Hecuba
YAML
File
Hecuba2
Client
Library
Creates
Hecuba2
Not in scope
How Does It All Work Together
© DataStax, All Rights Reserved. 60
Hecuba
YAML
File
Hecuba2
Client
Library
Text
Editor
Hecuba2
Not in scope
Alternative
Creates
How Does It All Work Together
© DataStax, All Rights Reserved. 61
Hecuba
YAML
File
Hecuba
YAML
File
Cassandra NodeHecuba2
Client
Library
Text
Editor
Hecuba2
Not in scope
Alternative
Creates
Distribution
C*
Process
Hecuba2
Agent
Hecuba2
jmx-
proxy
Hecuba2
Seed
Provider
How Does It All Work Together
© DataStax, All Rights Reserved. 62
Hecuba
YAML
File
Hecuba
YAML
File
Cassandra NodeHecuba2
Client
Library
Text
Editor
Hecuba2
Not in scope
Alternative
Creates
Distribution
Manual
Puppet
C*
Process
Hecuba2
Agent
Hecuba2
jmx-
proxy
Hecuba2
Seed
Provider
How Does It All Work Together
© DataStax, All Rights Reserved. 63
Hecuba
YAML
File
Hecuba
YAML
File
Cassandra NodeHecuba2
Client
Library
Text
Editor
Hecuba2
Not in scope
Alternative
Creates
Distribution
Manual
Puppet
Hecuba2
Agent
Hecuba2
jmx-
proxy
Hecuba2
Seed
Provider
Cron
executes
C*
Process
How Does It All Work Together
© DataStax, All Rights Reserved. 64
Hecuba
YAML
File
Hecuba
YAML
File
Cassandra NodeHecuba2
Client
Library
Text
Editor
Hecuba2
Not in scope
Alternative
Creates
Distribution
Manual
Puppet
Hecuba2
Agent
Hecuba2
jmx-
proxy
Hecuba2
Seed
Provider
Cron
executes
calls
C*
Process
How Does It All Work Together
© DataStax, All Rights Reserved. 65
Hecuba
YAML
File
Hecuba
YAML
File
Cassandra NodeHecuba2
Client
Library
Text
Editor
Hecuba2
Not in scope
Alternative
Creates
Distribution
Manual
Puppet
Hecuba2
Agent
Hecuba2
jmx-
proxy
Hecuba2
Seed
Provider
Cron
executes
calls
manages
C*
Process
How Does It All Work Together
© DataStax, All Rights Reserved. 66
Hecuba
YAML
File
Hecuba2
Agent
manages
Cron
executes
Hecuba2
jmx-
proxy
Hecuba2
SeedPro
vider
Hecuba
YAML
File
calls
calls Hecuba2
Agent
Hecuba2
jmx-
proxy
Hecuba2
Seed
Provider
Cassandra NodeHecuba2
Client
Library
Text
Editor
Hecuba2
Not in scope
Alternative
Creates
Distribution
Manual
Puppet
C*
Process
How Does It All Work Together
© DataStax, All Rights Reserved. 67
Hecuba
YAML
File
Hecuba2
Agent
manages
Cron
executes
Hecuba2
jmx-
proxy
Hecuba2
SeedPro
vider
Hecuba
YAML
File
calls
calls Hecuba2
Agent
Hecuba2
jmx-
proxy
Hecuba2
Seed
Provider
Cassandra NodeHecuba2
Client
Library
Text
Editor
Hecuba2
Not in scope
Alternative
Creates
Distribution
Manual
Puppet
C*
Process
To Recap
Hecuba2 manages cluster topologies
● create-cluster
● expand-cluster
● replace-node
Many things are out of scope
Missing features:
● parallelism @ hecuba2-agent
● cluster shrinking
© DataStax, All Rights Reserved. 68
Agenda
1 Two peace stories
2 Cassandra infrastructure at Spotify
3 What exactly is Hecuba2?
4 Wrap up
69© DataStax, All Rights Reserved.
Our Experience So Far
It’s been in use for a year
It hasn’t let us down yet
But it has surprised us by being more robust than we thought
State machine testable, visualisable, and easily extensible
Peer review for changes
© DataStax, All Rights Reserved. 70
FAQ
Why is it called Hecuba2?
Does it support v-nodes?
Does it support Cassandra version X?
Can I use it on Y?
Is it FOSS?
© DataStax, All Rights Reserved. 71
Actual Q
© DataStax, All Rights Reserved. 72
Thank You!
bases-ext@spotify.com
zvo@spotify.com
Eventually https://github.com/spotify/hecuba2
© DataStax, All Rights Reserved. 73

More Related Content

PPTX
Lessons Learned on Java Tuning for Our Cassandra Clusters (Carlos Monroy, Kne...
PPTX
Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...
PDF
What is in All of Those SSTable Files Not Just the Data One but All the Rest ...
PDF
Cassandra Exports as a Trivially Parallelizable Problem (Emilio Del Tessandor...
PPTX
Deletes Without Tombstones or TTLs (Eric Stevens, ProtectWise) | Cassandra Su...
PPTX
Storing Cassandra Metrics (Chris Lohfink, DataStax) | C* Summit 2016
PDF
Cassandra @ Yahoo Japan (Satoshi Konno, Yahoo) | Cassandra Summit 2016
PDF
Cassandra Community Webinar | In Case of Emergency Break Glass
Lessons Learned on Java Tuning for Our Cassandra Clusters (Carlos Monroy, Kne...
Cassandra Tools and Distributed Administration (Jeffrey Berger, Knewton) | C*...
What is in All of Those SSTable Files Not Just the Data One but All the Rest ...
Cassandra Exports as a Trivially Parallelizable Problem (Emilio Del Tessandor...
Deletes Without Tombstones or TTLs (Eric Stevens, ProtectWise) | Cassandra Su...
Storing Cassandra Metrics (Chris Lohfink, DataStax) | C* Summit 2016
Cassandra @ Yahoo Japan (Satoshi Konno, Yahoo) | Cassandra Summit 2016
Cassandra Community Webinar | In Case of Emergency Break Glass

What's hot (20)

PDF
Advanced Apache Cassandra Operations with JMX
PPTX
Cassandra Troubleshooting 3.0
PDF
Monitoring Cassandra at Scale (Jason Cacciatore, Netflix) | C* Summit 2016
PDF
Terror & Hysteria: Cost Effective Scaling of Time Series Data with Cassandra ...
PPTX
Beyond unit tests: Deployment and testing for Hadoop/Spark workflows
PDF
How Prometheus Store the Data
PDF
Cassandra Community Webinar | Practice Makes Perfect: Extreme Cassandra Optim...
PPTX
Real time data pipeline with spark streaming and cassandra with mesos
PDF
Top 5 mistakes when writing Spark applications
PDF
DataEngConf SF16 - Collecting and Moving Data at Scale
PDF
Tuning Speculative Retries to Fight Latency (Michael Figuiere, Minh Do, Netfl...
PDF
Live traffic capture and replay in cassandra 4.0
PDF
More Algorithms and Tools for Genomic Analysis on Apache Spark with Ryan Will...
PPTX
Why your Spark Job is Failing
PDF
A glimpse of cassandra 4.0 features netflix
PDF
HBaseCon 2013: Scalable Network Designs for Apache HBase
PPTX
Bucket Your Partitions Wisely (Markus Höfer, codecentric AG) | Cassandra Summ...
PDF
AddThis: Scaling Cassandra up and down into containers with ZFS
PPT
Real-Time Streaming with Apache Spark Streaming and Apache Storm
PPTX
Maintaining Consistency Across Data Centers (Randy Fradin, BlackRock) | Cassa...
Advanced Apache Cassandra Operations with JMX
Cassandra Troubleshooting 3.0
Monitoring Cassandra at Scale (Jason Cacciatore, Netflix) | C* Summit 2016
Terror & Hysteria: Cost Effective Scaling of Time Series Data with Cassandra ...
Beyond unit tests: Deployment and testing for Hadoop/Spark workflows
How Prometheus Store the Data
Cassandra Community Webinar | Practice Makes Perfect: Extreme Cassandra Optim...
Real time data pipeline with spark streaming and cassandra with mesos
Top 5 mistakes when writing Spark applications
DataEngConf SF16 - Collecting and Moving Data at Scale
Tuning Speculative Retries to Fight Latency (Michael Figuiere, Minh Do, Netfl...
Live traffic capture and replay in cassandra 4.0
More Algorithms and Tools for Genomic Analysis on Apache Spark with Ryan Will...
Why your Spark Job is Failing
A glimpse of cassandra 4.0 features netflix
HBaseCon 2013: Scalable Network Designs for Apache HBase
Bucket Your Partitions Wisely (Markus Höfer, codecentric AG) | Cassandra Summ...
AddThis: Scaling Cassandra up and down into containers with ZFS
Real-Time Streaming with Apache Spark Streaming and Apache Storm
Maintaining Consistency Across Data Centers (Randy Fradin, BlackRock) | Cassa...
Ad

Similar to Hecuba2: Cassandra Operations Made Easy (Radovan Zvoncek, Spotify) | C* Summit 2016 (20)

PDF
Scaling Cassandra in all directions - Jimmy Mardell Spotify
PDF
The Evolution of Big Data at Spotify
PDF
The Apache Cassandra ecosystem
KEY
Spotify cassandra london
PDF
Operate your hadoop cluster like a high eff goldmine
PPTX
Kubernetes @ Be-Mobile
PDF
DockerCon14 Cluster Management and Containerization
PPTX
Boot Strapping in Cassandra
PDF
Make 2016 your year of SMACK talk
PDF
Next Generation Hadoop Operations
PDF
Nflx ds meetup-5_dec2012
PDF
The Evolution of Hadoop at Spotify - Through Failures and Pain
DOCX
Big Data - Hadoop Ecosystem
PDF
Thinking DevOps in the era of the Cloud - Demi Ben-Ari
PPTX
Loadays 2015 - Enterprise Monitoring with Icinga
PDF
Webinar: Nightmares of a Container Orchestration System - Jorg Schad
PDF
Webinar - Nightmares of a Container Orchestration System - Jorg Schad
PDF
Monitoring Big Data Systems - "The Simple Way"
PPTX
Hadoop: today and tomorrow
PDF
DevOps vs. Site Reliability Engineering (SRE) in Age of Kubernetes
Scaling Cassandra in all directions - Jimmy Mardell Spotify
The Evolution of Big Data at Spotify
The Apache Cassandra ecosystem
Spotify cassandra london
Operate your hadoop cluster like a high eff goldmine
Kubernetes @ Be-Mobile
DockerCon14 Cluster Management and Containerization
Boot Strapping in Cassandra
Make 2016 your year of SMACK talk
Next Generation Hadoop Operations
Nflx ds meetup-5_dec2012
The Evolution of Hadoop at Spotify - Through Failures and Pain
Big Data - Hadoop Ecosystem
Thinking DevOps in the era of the Cloud - Demi Ben-Ari
Loadays 2015 - Enterprise Monitoring with Icinga
Webinar: Nightmares of a Container Orchestration System - Jorg Schad
Webinar - Nightmares of a Container Orchestration System - Jorg Schad
Monitoring Big Data Systems - "The Simple Way"
Hadoop: today and tomorrow
DevOps vs. Site Reliability Engineering (SRE) in Age of Kubernetes
Ad

More from DataStax (20)

PPTX
Is Your Enterprise Ready to Shine This Holiday Season?
PPTX
Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...
PPTX
Running DataStax Enterprise in VMware Cloud and Hybrid Environments
PPTX
Best Practices for Getting to Production with DataStax Enterprise Graph
PPTX
Webinar | Data Management for Hybrid and Multi-Cloud: A Four-Step Journey
PPTX
Webinar | How to Understand Apache Cassandra™ Performance Through Read/Writ...
PDF
Webinar | Better Together: Apache Cassandra and Apache Kafka
PDF
Top 10 Best Practices for Apache Cassandra and DataStax Enterprise
PDF
Introduction to Apache Cassandra™ + What’s New in 4.0
PPTX
Webinar: How Active Everywhere Database Architecture Accelerates Hybrid Cloud...
PPTX
Webinar | Aligning GDPR Requirements with Today's Hybrid Cloud Realities
PDF
Designing a Distributed Cloud Database for Dummies
PDF
How to Power Innovation with Geo-Distributed Data Management in Hybrid Cloud
PDF
How to Evaluate Cloud Databases for eCommerce
PPTX
Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...
PPTX
Webinar: DataStax and Microsoft Azure: Empowering the Right-Now Enterprise wi...
PPTX
Webinar - Real-Time Customer Experience for the Right-Now Enterprise featurin...
PPTX
Datastax - The Architect's guide to customer experience (CX)
PPTX
An Operational Data Layer is Critical for Transformative Banking Applications
PPTX
Becoming a Customer-Centric Enterprise Via Real-Time Data and Design Thinking
Is Your Enterprise Ready to Shine This Holiday Season?
Designing Fault-Tolerant Applications with DataStax Enterprise and Apache Cas...
Running DataStax Enterprise in VMware Cloud and Hybrid Environments
Best Practices for Getting to Production with DataStax Enterprise Graph
Webinar | Data Management for Hybrid and Multi-Cloud: A Four-Step Journey
Webinar | How to Understand Apache Cassandra™ Performance Through Read/Writ...
Webinar | Better Together: Apache Cassandra and Apache Kafka
Top 10 Best Practices for Apache Cassandra and DataStax Enterprise
Introduction to Apache Cassandra™ + What’s New in 4.0
Webinar: How Active Everywhere Database Architecture Accelerates Hybrid Cloud...
Webinar | Aligning GDPR Requirements with Today's Hybrid Cloud Realities
Designing a Distributed Cloud Database for Dummies
How to Power Innovation with Geo-Distributed Data Management in Hybrid Cloud
How to Evaluate Cloud Databases for eCommerce
Webinar: DataStax Enterprise 6: 10 Ways to Multiply the Power of Apache Cassa...
Webinar: DataStax and Microsoft Azure: Empowering the Right-Now Enterprise wi...
Webinar - Real-Time Customer Experience for the Right-Now Enterprise featurin...
Datastax - The Architect's guide to customer experience (CX)
An Operational Data Layer is Critical for Transformative Banking Applications
Becoming a Customer-Centric Enterprise Via Real-Time Data and Design Thinking

Recently uploaded (20)

PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Nekopoi APK 2025 free lastest update
PDF
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
PPTX
Why Generative AI is the Future of Content, Code & Creativity?
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PDF
Autodesk AutoCAD Crack Free Download 2025
DOCX
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Download FL Studio Crack Latest version 2025 ?
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PPTX
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
PDF
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
PPTX
history of c programming in notes for students .pptx
PDF
Complete Guide to Website Development in Malaysia for SMEs
PPTX
Reimagine Home Health with the Power of Agentic AI​
PDF
Cost to Outsource Software Development in 2025
PPTX
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Design an Analysis of Algorithms II-SECS-1021-03
Nekopoi APK 2025 free lastest update
CCleaner Pro 6.38.11537 Crack Final Latest Version 2025
Why Generative AI is the Future of Content, Code & Creativity?
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Autodesk AutoCAD Crack Free Download 2025
Greta — No-Code AI for Building Full-Stack Web & Mobile Apps
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Download FL Studio Crack Latest version 2025 ?
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Log360_SIEM_Solutions Overview PPT_Feb 2020.pptx
How AI/LLM recommend to you ? GDG meetup 16 Aug by Fariman Guliev
history of c programming in notes for students .pptx
Complete Guide to Website Development in Malaysia for SMEs
Reimagine Home Health with the Power of Agentic AI​
Cost to Outsource Software Development in 2025
WiFi Honeypot Detecscfddssdffsedfseztor.pptx
Digital Systems & Binary Numbers (comprehensive )
iTop VPN 6.5.0 Crack + License Key 2025 (Premium Version)

Hecuba2: Cassandra Operations Made Easy (Radovan Zvoncek, Spotify) | C* Summit 2016

  • 2. Agenda 1 Two peace stories 2 Cassandra infrastructure at Spotify 3 What exactly is Hecuba2? 4 Wrap up 2© DataStax, All Rights Reserved.
  • 3. About Radovan Likes pancakes © DataStax, All Rights Reserved. 3
  • 4. About Radovan Likes pancakes Now knows where to get them © DataStax, All Rights Reserved. 4
  • 5. About Radovan Likes pancakes Now knows where to get them Works at Spotify © DataStax, All Rights Reserved. 5
  • 6. Spotify Music streaming service ● ~ 100 million active users ● ~ 2 billion playlists © DataStax, All Rights Reserved. 6
  • 7. Spotify Music streaming service ● ~ 100 million active users ● ~ 2 billion playlists Happy Apache Cassandra user ● ~ 100 Cassandra clusters ● ~ 1000 nodes altogether © DataStax, All Rights Reserved. 7
  • 8. The Playlist Cluster The largest cluster we have ● 2 x 45 nodes ● ~ 1TB of data on each node © DataStax, All Rights Reserved. 8
  • 9. The Playlist Cluster The largest cluster we have ● 2 x 45 nodes ● ~ 1TB of data on each node © DataStax, All Rights Reserved. 9
  • 10. The Playlist Cluster The largest cluster we have ● 2 x 45 nodes ● ~ 1TB of data on each node Had to expand by 50% © DataStax, All Rights Reserved. 10
  • 11. The previous large cluster expansion went so wrong… Peace Story #1: The Playlist Expansion © DataStax, All Rights Reserved. 11
  • 12. The previous large cluster expansion went so wrong… How exactly to do the expansion now? Peace Story #1: The Playlist Expansion © DataStax, All Rights Reserved. 12
  • 13. The previous large cluster expansion went so wrong… How exactly to do the expansion now? What tokens should the new nodes have? Peace Story #1: The Playlist Expansion © DataStax, All Rights Reserved. 13
  • 14. Peace Story #1: The Playlist Expansion The previous large cluster expansion went so wrong… How exactly to do the expansion now? What tokens should the new nodes have? How to bootstrap the nodes? © DataStax, All Rights Reserved. 14
  • 15. Peace Story #1: The Playlist Expansion Turns out, we needed just one command: © DataStax, All Rights Reserved. 15 hecuba2-cli expand-cluster dc1-playlistcassandra-a{31..45}.foo.net
  • 16. Peace Story #1: The Playlist Expansion Turns out, we needed just one command: And one peer review © DataStax, All Rights Reserved. 16 hecuba2-cli expand-cluster dc1-playlistcassandra-a{31..45}.foo.net
  • 17. Peace Story #1: The Playlist Expansion Turns out, we needed just one command: And one peer review And then a week of waiting © DataStax, All Rights Reserved. 17 hecuba2-cli expand-cluster dc1-playlistcassandra-a{31..45}.foo.net
  • 18. Peace Story #1: The Playlist Expansion 18
  • 19. Peace Story #2: The Slush Incident © DataStax, All Rights Reserved. 19
  • 20. Peace Story #2: The Slush Incident © DataStax, All Rights Reserved. 20
  • 21. Peace Story #2: The Slush Incident Got paged with 2 out of 3 nodes being down © DataStax, All Rights Reserved. 21 Datacenter: dc1 ========== Address Rack Status Load Owns Token dc1-slush-1.foo.net rac1 Up Normal 797.27 GB 33.33% 0 dc1-slush-2.foo.net rac1 Down Normal 798.58 GB 33.33% 56... dc1-slush-3.foo.net rac1 Down Normal 797.58 GB 33.33% 11...
  • 22. Peace Story #2: The Slush Incident Turns out, we needed just two commands © DataStax, All Rights Reserved. 22 hecuba2-cli replace-nodes --old-host dc1-slush-2.foo.net --new-host dc1-slush-4.foo.net hecuba2-cli replace-nodes --old-host dc1-slush-3.foo.net --new-host dc1-slush-5.foo.net
  • 23. Peace Story #2: The Slush Incident What gave us two peer reviews, such as: © DataStax, All Rights Reserved. 23
  • 24. Peace Story #2: The Slush Incident After a while, we ended up with © DataStax, All Rights Reserved. 24 Datacenter: dc1 ========== Address Rack Status Load Owns Token dc1-slush-1.foo.net rac1 Up Normal 797.27 GB 33.33% 0 dc1-slush-4.foo.net rac1 Up Normal 798.58 GB 33.33% 56... dc1-slush-5.foo.net rac1 Up Normal 797.58 GB 33.33% 11...
  • 25. The Peace Stories Very pleasant experience operating Cassandra @ Spotify All because our infrastructure © DataStax, All Rights Reserved. 25
  • 26. Agenda 1 Two peace stories 2 Cassandra infrastructure at Spotify 3 What exactly is Hecuba2? 4 Wrap up 26© DataStax, All Rights Reserved.
  • 27. Cassandra Infrastructure @ Spotify Let’s just create a Cassandra cluster like a Spotifier © DataStax, All Rights Reserved. 27
  • 28. Creating C* Cluster Like A Spotifier Step 1: Get some machines © DataStax, All Rights Reserved. 28
  • 29. Creating C* Cluster Like A Spotifier Step 1: Get some machines © DataStax, All Rights Reserved. 29
  • 30. Creating C* Cluster Like A Spotifier Step 1: Get some machines More info about System-Z Modelling Microservices at Spotify by Petter Måhlén https://youtu.be/7XDA044tl8k © DataStax, All Rights Reserved. 30
  • 31. Creating C* Cluster Like A Spotifier Step 1: Get some machines Step 2: Install the operating system © DataStax, All Rights Reserved. 31
  • 32. Creating C* Cluster Like A Spotifier Step 1: Get some machines Step 2: Install the operating system © DataStax, All Rights Reserved. 32
  • 33. Creating C* Cluster Like A Spotifier Step 1: Get some machines Step 2: Setup the cluster © DataStax, All Rights Reserved. 33
  • 34. Creating C* Cluster Like A Spotifier Step 1: Get some machines Step 2: Setup the cluster © DataStax, All Rights Reserved. 34 hecuba2-cli create-cluster --cluster-name "My new cluster" --owner mySquad dc1-userdatacass- {1..3}.foo.net
  • 35. Creating C* Cluster Like A Spotifier © DataStax, All Rights Reserved. Step 1: Get some machines Step 2: Setup the cluster Step 3: Check PR 35
  • 36. Creating C* Cluster Like A Spotifier © DataStax, All Rights Reserved. Step 1: Get some machines Step 2: Setup the cluster Step 3: Check PR Step 4: Wait 36
  • 37. Creating C* Cluster Like A Spotifier © DataStax, All Rights Reserved. Step 1: Get some machines Step 2: Setup the cluster Step 3: Check PR Step 4: Wait This will get picked up by our conf. management system and ● Install software ● Configure Cassandra 37
  • 38. Configuring Cassandra © DataStax, All Rights Reserved. 38
  • 39. Configuring Cassandra Is (almost) all about putting things into config files © DataStax, All Rights Reserved. 39
  • 40. Configuring Cassandra Is (almost) all about putting things into config files Mostly tokens and seeds ● Tokens are clunky large strings ● V-nodes would help, but... © DataStax, All Rights Reserved. 40
  • 41. Configuring Cassandra Is (almost) all about putting things into config files Mostly tokens and seeds ● Tokens are clunky large strings ● V-nodes would help, but... Also node bootstrap ● All nodes joining at once is not desired © DataStax, All Rights Reserved. 41
  • 42. Configuring Cassandra Is (almost) all about putting things into config files Mostly tokens and seeds ● Tokens are clunky large strings ● V-nodes would help, but... Also node bootstrap ● All nodes joining at once is not desired Both are handled by Hecuba2 © DataStax, All Rights Reserved. 42
  • 43. Agenda 1 Two peace stories 2 Cassandra infrastructure at Spotify 3 What exactly is Hecuba2? 4 Wrap up 43© DataStax, All Rights Reserved.
  • 44. What Exactly is Hecuba2 © DataStax, All Rights Reserved. 44 Hecuba YAML File Hecuba2 Agent Hecuba2 jmx- proxy Hecuba2 SeedPro vider Hecuba2 Agent Hecuba2 jmx- proxy Hecuba2 Seed Provider Cassandra NodeHecuba2 Client Library C* Process
  • 45. Hecuba YAML File Represents the truth about the cluster © DataStax, All Rights Reserved. 45
  • 46. Hecuba YAML File dc1-mytestcass-1.foo.net: cluster_name: mytestcass dc: dc1 seed: true token: 0 dc1-mytestcass-2.foo.net: cluster_name: mytestcass dc: dc1 seed: false token: 56713727820156410577229101238628035242 © DataStax, All Rights Reserved. 46
  • 47. Hecuba2 Client Library Manipulates the Hecuba YAML file © DataStax, All Rights Reserved. 47
  • 48. Hecuba2 Client Library Manipulates the Hecuba YAML file Does this in a smart way © DataStax, All Rights Reserved. 48
  • 49. Hecuba2 Client Library Manipulates the Hecuba YAML file Does this in a smart way Doubling the cluster © DataStax, All Rights Reserved. 49 Double the size New node Existing node stayed in place
  • 50. Manipulates the Hecuba YAML file Does this in a smart way Doubling the cluster Expand by 50% Hecuba2 Client Library © DataStax, All Rights Reserved. 50 Add 2 nodes New node Existing node stayed in place Existing node moved
  • 51. Hecuba2 Server-Side Components © DataStax, All Rights Reserved. 51 Hecuba2 Agent Hecuba2 jmx- proxy Hecuba2 Seed Provider Cassandra Node C* Process
  • 52. Hecuba2 Server-Side Components Again, three things: ● hecuba2-agent ○ State machine managing the C* process © DataStax, All Rights Reserved. 52
  • 53. hecuba2-agent © DataStax, All Rights Reserved. 53
  • 54. hecuba2-agent © DataStax, All Rights Reserved. 54
  • 55. Hecuba2 Server-Side Components Again, three things: ● hecuba2-agent ○ State machine managing the C* process ● hecuba2-jmxproxy ○ nodetool with JSON output © DataStax, All Rights Reserved. 55
  • 56. Hecuba2 Server-Side Components Again, three things: ● hecuba2-agent ○ State machine managing the C* process ● hecuba2-jmxproxy ○ nodetool with JSON output ● hecuba2-seedprovider ○ Picks seeds from Hecuba YAML © DataStax, All Rights Reserved. 56
  • 57. How Does It All Work Together © DataStax, All Rights Reserved. 57
  • 58. How Does It All Work Together © DataStax, All Rights Reserved. 58 Hecuba2 Client Library
  • 59. How Does It All Work Together © DataStax, All Rights Reserved. 59 Hecuba YAML File Hecuba2 Client Library Creates Hecuba2 Not in scope
  • 60. How Does It All Work Together © DataStax, All Rights Reserved. 60 Hecuba YAML File Hecuba2 Client Library Text Editor Hecuba2 Not in scope Alternative Creates
  • 61. How Does It All Work Together © DataStax, All Rights Reserved. 61 Hecuba YAML File Hecuba YAML File Cassandra NodeHecuba2 Client Library Text Editor Hecuba2 Not in scope Alternative Creates Distribution C* Process Hecuba2 Agent Hecuba2 jmx- proxy Hecuba2 Seed Provider
  • 62. How Does It All Work Together © DataStax, All Rights Reserved. 62 Hecuba YAML File Hecuba YAML File Cassandra NodeHecuba2 Client Library Text Editor Hecuba2 Not in scope Alternative Creates Distribution Manual Puppet C* Process Hecuba2 Agent Hecuba2 jmx- proxy Hecuba2 Seed Provider
  • 63. How Does It All Work Together © DataStax, All Rights Reserved. 63 Hecuba YAML File Hecuba YAML File Cassandra NodeHecuba2 Client Library Text Editor Hecuba2 Not in scope Alternative Creates Distribution Manual Puppet Hecuba2 Agent Hecuba2 jmx- proxy Hecuba2 Seed Provider Cron executes C* Process
  • 64. How Does It All Work Together © DataStax, All Rights Reserved. 64 Hecuba YAML File Hecuba YAML File Cassandra NodeHecuba2 Client Library Text Editor Hecuba2 Not in scope Alternative Creates Distribution Manual Puppet Hecuba2 Agent Hecuba2 jmx- proxy Hecuba2 Seed Provider Cron executes calls C* Process
  • 65. How Does It All Work Together © DataStax, All Rights Reserved. 65 Hecuba YAML File Hecuba YAML File Cassandra NodeHecuba2 Client Library Text Editor Hecuba2 Not in scope Alternative Creates Distribution Manual Puppet Hecuba2 Agent Hecuba2 jmx- proxy Hecuba2 Seed Provider Cron executes calls manages C* Process
  • 66. How Does It All Work Together © DataStax, All Rights Reserved. 66 Hecuba YAML File Hecuba2 Agent manages Cron executes Hecuba2 jmx- proxy Hecuba2 SeedPro vider Hecuba YAML File calls calls Hecuba2 Agent Hecuba2 jmx- proxy Hecuba2 Seed Provider Cassandra NodeHecuba2 Client Library Text Editor Hecuba2 Not in scope Alternative Creates Distribution Manual Puppet C* Process
  • 67. How Does It All Work Together © DataStax, All Rights Reserved. 67 Hecuba YAML File Hecuba2 Agent manages Cron executes Hecuba2 jmx- proxy Hecuba2 SeedPro vider Hecuba YAML File calls calls Hecuba2 Agent Hecuba2 jmx- proxy Hecuba2 Seed Provider Cassandra NodeHecuba2 Client Library Text Editor Hecuba2 Not in scope Alternative Creates Distribution Manual Puppet C* Process
  • 68. To Recap Hecuba2 manages cluster topologies ● create-cluster ● expand-cluster ● replace-node Many things are out of scope Missing features: ● parallelism @ hecuba2-agent ● cluster shrinking © DataStax, All Rights Reserved. 68
  • 69. Agenda 1 Two peace stories 2 Cassandra infrastructure at Spotify 3 What exactly is Hecuba2? 4 Wrap up 69© DataStax, All Rights Reserved.
  • 70. Our Experience So Far It’s been in use for a year It hasn’t let us down yet But it has surprised us by being more robust than we thought State machine testable, visualisable, and easily extensible Peer review for changes © DataStax, All Rights Reserved. 70
  • 71. FAQ Why is it called Hecuba2? Does it support v-nodes? Does it support Cassandra version X? Can I use it on Y? Is it FOSS? © DataStax, All Rights Reserved. 71
  • 72. Actual Q © DataStax, All Rights Reserved. 72