SlideShare una empresa de Scribd logo
1 de 26
Descargar para leer sin conexión
DEMONWARE 
Deploying Cassandra for 
Call of Duty 
#CassandraSummit
Tim Czerniak 
Software Engineer 
DemonWare 
Seán O Sullivan 
Operations Engineer 
DemonWare
DEMON-WHO? 
DemonWare is a subsidiary of 
Activision-Blizzard 
We write, deploy and maintain 
client and server applications 
for Activision and Blizzard games
SERVICES 
• Matchmaking 
• Leaderboards 
• Chat 
• File Storage 
• Leagues 
• Social Network 
Integration 
• etc…
TECHNOLOGIES 
Client 
C++ HTTP 
Server 
Python Erlang 
MySQL CentOS 
Puppet
OUR UNUSUAL USE CASE 
Release 
First weekend 
Christmas 
Peak
“By failing to prepare, 
you are preparing to fail.” 
– Benjamin Franklin
OUR PREDICAMENT 
Needed to share 
data cross-DC… 
…but MySQL isn’t 
so good at that.
SERVICES 
• Progress store 
• High write, low read. 
• File size ~4KB 
• Persistent 
• Presence 
• High write, high read 
• Data size minimal 
• Transient 
• Messaging 
• Low write, low read 
• Transient
REQUIREMENTS 
• Cross DC 
• Ease of consolidation and expansion 
• Manageability for the operations teams 
• Throughput 
• Storage: 1,500,000 reqs/min 
• Presence: 250,000 reqs/min 
• Messaging: 850,000 reqs/min
EVALUATION 
• Shortlisted suitable 
options 
• Riak 
• Cassandra 
• Re-wrote our 
application backend, 
twice
LOAD TESTING 
• Two clusters 
• Single CPU, SSD and 
average memory 
• Dual CPU, Spindles and 
high memory 
• Used realistic user profiles 
• Included peaks and troughs 
during testing 
• Ran a soak test
THE WINNER??? 
• Initially Riak was a slam-dunk 
• Erlang-based (we know Erlang) 
• Tooling is excellent 
• Performed well 
• Previously evaluated
THE WINNER 
• Cassandra won in the end 
• Write performance 
• Richer feature set 
• Maturity of codebase and tooling 
• Testing continued 24/7 until launch
SCHEMA 
• Progress store 
• A perfect fit! 
• Presence 
• More relational 
• High throughput (Tombstones!) 
• TTLs 
• Messaging 
• Time-series data, well suited 
• Tombstones!
SCHEMA: LESSONS LEARNED 
• Keep it simple 
• It’s not a relational DB 
• Get your partition keys and 
clustering keys right. 
• C* will do what it does best
SCHEMA: LESSONS LEARNED 
• Don’t ignore CAP theorem 
• Cassandra has tuneable 
consistency, but there will be 
trade-offs 
• Load test with real numbers 
• Some issues aren’t evident in 
unit-tests
CONFIG 
• Default settings, probably not 
what you want 
• Changed many settings off 
the bat 
• Reverted some (oops)
HARDWARE 
• 2x Intel Xeon E5-2620 @ 2Ghz 
• 2x 480GB SSD (RAID-1) 
• 32GB 
• 1Gb non-dedicated network
MONITORING 
• Graphite 
• Nagios 
• Jolokia
GOTCHAS 
• Vnodes and rack awareness 
• Loadbalancers 
• Dev differs from production 
(of course...) 
• Launching in a DC we didn't 
load test in
LAUNCH 
• Request to simulate a 
node failure 
• Two nodes died over 
Christmas 
• Expanding to other titles
QUESTIONS?
APPENDIX 
cassandra.conf: 
auto_bootstrap: false 
hinted_handoff_throttle_in_kb: 1024 
max_hints_delivery_threads: 2 
trickle_fsync: true 
rpc_server_type: hsha 
<% if virtual == "physical" -%> 
concurrent_reads: 128 
<% else -%> 
concurrent_reads: 32 
<% end -%> 
concurrent_writes: <%= processorcount.to_i * 8 -%> 
multithreaded_compaction: false 
<% if virtual == "physical" -%> 
compaction_throughput_mb_per_sec: 0 
<% else -%> 
compaction_throughput_mb_per_sec: 16 
<% end -%> 
! 
cassandra-env.sh: 
<% if virtual == "physical" -%> 
JVM_OPTS="$JVM_OPTS -Xss180k" 
<% else -%> 
JVM_OPTS="$JVM_OPTS -Xss228k" 
<% end -%> 
JVM_EXTRA_OPTS="$JVM_EXTRA_OPTS -javaagent:/usr/ 
share/java/graphite-reporter-agent.jar -javaagent:/usr/share/java/ 
jolokia-jvm-agent.jar=port=8080,host=<%= hostname %>" 
EXTRA_CLASSPATH="/usr/share/java/metrics-graphite-2.0.3.jar"

Más contenido relacionado

La actualidad más candente

Files in c++ ppt
Files in c++ pptFiles in c++ ppt
Files in c++ ppt
Kumar
 

La actualidad más candente (20)

Under The Hood Of A Shard-Per-Core Database Architecture
Under The Hood Of A Shard-Per-Core Database ArchitectureUnder The Hood Of A Shard-Per-Core Database Architecture
Under The Hood Of A Shard-Per-Core Database Architecture
 
Fundamentals of Computer Design including performance measurements & quantita...
Fundamentals of Computer Design including performance measurements & quantita...Fundamentals of Computer Design including performance measurements & quantita...
Fundamentals of Computer Design including performance measurements & quantita...
 
Introduction to char device driver
Introduction to char device driverIntroduction to char device driver
Introduction to char device driver
 
Multicore computers
Multicore computersMulticore computers
Multicore computers
 
Files in c++ ppt
Files in c++ pptFiles in c++ ppt
Files in c++ ppt
 
Ninja Build: Simple Guide for Beginners
Ninja Build: Simple Guide for BeginnersNinja Build: Simple Guide for Beginners
Ninja Build: Simple Guide for Beginners
 
JAVA PROGRAMMING
JAVA PROGRAMMING JAVA PROGRAMMING
JAVA PROGRAMMING
 
Hardware Abstraction Layer
Hardware Abstraction LayerHardware Abstraction Layer
Hardware Abstraction Layer
 
Virtual Machine Concept
Virtual Machine ConceptVirtual Machine Concept
Virtual Machine Concept
 
Content Management with MongoDB by Mark Helmstetter
 Content Management with MongoDB by Mark Helmstetter Content Management with MongoDB by Mark Helmstetter
Content Management with MongoDB by Mark Helmstetter
 
Cuda tutorial
Cuda tutorialCuda tutorial
Cuda tutorial
 
CSharp Presentation
CSharp PresentationCSharp Presentation
CSharp Presentation
 
Pcie drivers basics
Pcie drivers basicsPcie drivers basics
Pcie drivers basics
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Pentium
PentiumPentium
Pentium
 
LINQ in C#
LINQ in C#LINQ in C#
LINQ in C#
 
Basic concept of OOP's
Basic concept of OOP'sBasic concept of OOP's
Basic concept of OOP's
 
Processor Organization and Architecture
Processor Organization and ArchitectureProcessor Organization and Architecture
Processor Organization and Architecture
 
Assembly Language for x86 Processors 7th Edition Chapter 1: Basic Concepts
 Assembly Language for x86 Processors 7th Edition Chapter 1: Basic Concepts  Assembly Language for x86 Processors 7th Edition Chapter 1: Basic Concepts
Assembly Language for x86 Processors 7th Edition Chapter 1: Basic Concepts
 
object oriented Programming ppt
object oriented Programming pptobject oriented Programming ppt
object oriented Programming ppt
 

Similar a Cassandra Summit 2014: Deploying Cassandra for Call of Duty

Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
xlight
 

Similar a Cassandra Summit 2014: Deploying Cassandra for Call of Duty (20)

Fixing twitter
Fixing twitterFixing twitter
Fixing twitter
 
Fixing_Twitter
Fixing_TwitterFixing_Twitter
Fixing_Twitter
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
 
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...Fixing Twitter  Improving The Performance And Scalability Of The Worlds Most ...
Fixing Twitter Improving The Performance And Scalability Of The Worlds Most ...
 
Pascal benois performance_troubleshooting-spsbe18
Pascal benois performance_troubleshooting-spsbe18Pascal benois performance_troubleshooting-spsbe18
Pascal benois performance_troubleshooting-spsbe18
 
Cassandra Core Concepts
Cassandra Core ConceptsCassandra Core Concepts
Cassandra Core Concepts
 
Intro to Cassandra
Intro to CassandraIntro to Cassandra
Intro to Cassandra
 
Five Years of EC2 Distilled
Five Years of EC2 DistilledFive Years of EC2 Distilled
Five Years of EC2 Distilled
 
Apache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling OutApache Performance Tuning: Scaling Out
Apache Performance Tuning: Scaling Out
 
Cassandra Community Webinar: MySQL to Cassandra - What I Wish I'd Known
Cassandra Community Webinar: MySQL to Cassandra - What I Wish I'd KnownCassandra Community Webinar: MySQL to Cassandra - What I Wish I'd Known
Cassandra Community Webinar: MySQL to Cassandra - What I Wish I'd Known
 
DX12 & Vulkan: Dawn of a New Generation of Graphics APIs
DX12 & Vulkan: Dawn of a New Generation of Graphics APIsDX12 & Vulkan: Dawn of a New Generation of Graphics APIs
DX12 & Vulkan: Dawn of a New Generation of Graphics APIs
 
Cassandra training
Cassandra trainingCassandra training
Cassandra training
 
Hindsight is 20/20: MySQL to Cassandra
Hindsight is 20/20: MySQL to CassandraHindsight is 20/20: MySQL to Cassandra
Hindsight is 20/20: MySQL to Cassandra
 
C* Summit 2013 - Hindsight is 20/20. MySQL to Cassandra by Michael Kjellman
C* Summit 2013 - Hindsight is 20/20. MySQL to Cassandra by Michael KjellmanC* Summit 2013 - Hindsight is 20/20. MySQL to Cassandra by Michael Kjellman
C* Summit 2013 - Hindsight is 20/20. MySQL to Cassandra by Michael Kjellman
 
Voldemort Nosql
Voldemort NosqlVoldemort Nosql
Voldemort Nosql
 
Bridging the Developer and the Datacenter
Bridging the Developer and the DatacenterBridging the Developer and the Datacenter
Bridging the Developer and the Datacenter
 
Large-scale projects development (scaling LAMP)
Large-scale projects development (scaling LAMP)Large-scale projects development (scaling LAMP)
Large-scale projects development (scaling LAMP)
 
The impact of cloud NSBCon NY by Yves Goeleven
The impact of cloud NSBCon NY by Yves GoelevenThe impact of cloud NSBCon NY by Yves Goeleven
The impact of cloud NSBCon NY by Yves Goeleven
 
iland Internet Solutions: Leveraging Cassandra for real-time multi-datacenter...
iland Internet Solutions: Leveraging Cassandra for real-time multi-datacenter...iland Internet Solutions: Leveraging Cassandra for real-time multi-datacenter...
iland Internet Solutions: Leveraging Cassandra for real-time multi-datacenter...
 
Leveraging Cassandra for real-time multi-datacenter public cloud analytics
Leveraging Cassandra for real-time multi-datacenter public cloud analyticsLeveraging Cassandra for real-time multi-datacenter public cloud analytics
Leveraging Cassandra for real-time multi-datacenter public cloud analytics
 

Más de DataStax Academy

Cassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart LabsCassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart Labs
DataStax Academy
 
Cassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stackCassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stack
DataStax Academy
 
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & PythonCassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
DataStax Academy
 
Standing Up Your First Cluster
Standing Up Your First ClusterStanding Up Your First Cluster
Standing Up Your First Cluster
DataStax Academy
 
Real Time Analytics with Dse
Real Time Analytics with DseReal Time Analytics with Dse
Real Time Analytics with Dse
DataStax Academy
 
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
DataStax Academy
 
Enabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax EnterpriseEnabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax Enterprise
DataStax Academy
 
Advanced Data Modeling with Apache Cassandra
Advanced Data Modeling with Apache CassandraAdvanced Data Modeling with Apache Cassandra
Advanced Data Modeling with Apache Cassandra
DataStax Academy
 

Más de DataStax Academy (20)

Forrester CXNYC 2017 - Delivering great real-time cx is a true craft
Forrester CXNYC 2017 - Delivering great real-time cx is a true craftForrester CXNYC 2017 - Delivering great real-time cx is a true craft
Forrester CXNYC 2017 - Delivering great real-time cx is a true craft
 
Introduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph DatabaseIntroduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph Database
 
Introduction to DataStax Enterprise Advanced Replication with Apache Cassandra
Introduction to DataStax Enterprise Advanced Replication with Apache CassandraIntroduction to DataStax Enterprise Advanced Replication with Apache Cassandra
Introduction to DataStax Enterprise Advanced Replication with Apache Cassandra
 
Cassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart LabsCassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart Labs
 
Cassandra 3.0 Data Modeling
Cassandra 3.0 Data ModelingCassandra 3.0 Data Modeling
Cassandra 3.0 Data Modeling
 
Cassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stackCassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stack
 
Data Modeling for Apache Cassandra
Data Modeling for Apache CassandraData Modeling for Apache Cassandra
Data Modeling for Apache Cassandra
 
Coursera Cassandra Driver
Coursera Cassandra DriverCoursera Cassandra Driver
Coursera Cassandra Driver
 
Production Ready Cassandra
Production Ready CassandraProduction Ready Cassandra
Production Ready Cassandra
 
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & PythonCassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
 
Cassandra @ Sony: The good, the bad, and the ugly part 1
Cassandra @ Sony: The good, the bad, and the ugly part 1Cassandra @ Sony: The good, the bad, and the ugly part 1
Cassandra @ Sony: The good, the bad, and the ugly part 1
 
Cassandra @ Sony: The good, the bad, and the ugly part 2
Cassandra @ Sony: The good, the bad, and the ugly part 2Cassandra @ Sony: The good, the bad, and the ugly part 2
Cassandra @ Sony: The good, the bad, and the ugly part 2
 
Standing Up Your First Cluster
Standing Up Your First ClusterStanding Up Your First Cluster
Standing Up Your First Cluster
 
Real Time Analytics with Dse
Real Time Analytics with DseReal Time Analytics with Dse
Real Time Analytics with Dse
 
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
 
Enabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax EnterpriseEnabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax Enterprise
 
Bad Habits Die Hard
Bad Habits Die Hard Bad Habits Die Hard
Bad Habits Die Hard
 
Advanced Data Modeling with Apache Cassandra
Advanced Data Modeling with Apache CassandraAdvanced Data Modeling with Apache Cassandra
Advanced Data Modeling with Apache Cassandra
 
Advanced Cassandra
Advanced CassandraAdvanced Cassandra
Advanced Cassandra
 
Apache Cassandra and Drivers
Apache Cassandra and DriversApache Cassandra and Drivers
Apache Cassandra and Drivers
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Último (20)

FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 

Cassandra Summit 2014: Deploying Cassandra for Call of Duty

  • 1. DEMONWARE Deploying Cassandra for Call of Duty #CassandraSummit
  • 2. Tim Czerniak Software Engineer DemonWare Seán O Sullivan Operations Engineer DemonWare
  • 3. DEMON-WHO? DemonWare is a subsidiary of Activision-Blizzard We write, deploy and maintain client and server applications for Activision and Blizzard games
  • 4.
  • 5.
  • 6. SERVICES • Matchmaking • Leaderboards • Chat • File Storage • Leagues • Social Network Integration • etc…
  • 7. TECHNOLOGIES Client C++ HTTP Server Python Erlang MySQL CentOS Puppet
  • 8. OUR UNUSUAL USE CASE Release First weekend Christmas Peak
  • 9. “By failing to prepare, you are preparing to fail.” – Benjamin Franklin
  • 10. OUR PREDICAMENT Needed to share data cross-DC… …but MySQL isn’t so good at that.
  • 11. SERVICES • Progress store • High write, low read. • File size ~4KB • Persistent • Presence • High write, high read • Data size minimal • Transient • Messaging • Low write, low read • Transient
  • 12. REQUIREMENTS • Cross DC • Ease of consolidation and expansion • Manageability for the operations teams • Throughput • Storage: 1,500,000 reqs/min • Presence: 250,000 reqs/min • Messaging: 850,000 reqs/min
  • 13. EVALUATION • Shortlisted suitable options • Riak • Cassandra • Re-wrote our application backend, twice
  • 14. LOAD TESTING • Two clusters • Single CPU, SSD and average memory • Dual CPU, Spindles and high memory • Used realistic user profiles • Included peaks and troughs during testing • Ran a soak test
  • 15. THE WINNER??? • Initially Riak was a slam-dunk • Erlang-based (we know Erlang) • Tooling is excellent • Performed well • Previously evaluated
  • 16. THE WINNER • Cassandra won in the end • Write performance • Richer feature set • Maturity of codebase and tooling • Testing continued 24/7 until launch
  • 17. SCHEMA • Progress store • A perfect fit! • Presence • More relational • High throughput (Tombstones!) • TTLs • Messaging • Time-series data, well suited • Tombstones!
  • 18. SCHEMA: LESSONS LEARNED • Keep it simple • It’s not a relational DB • Get your partition keys and clustering keys right. • C* will do what it does best
  • 19. SCHEMA: LESSONS LEARNED • Don’t ignore CAP theorem • Cassandra has tuneable consistency, but there will be trade-offs • Load test with real numbers • Some issues aren’t evident in unit-tests
  • 20. CONFIG • Default settings, probably not what you want • Changed many settings off the bat • Reverted some (oops)
  • 21. HARDWARE • 2x Intel Xeon E5-2620 @ 2Ghz • 2x 480GB SSD (RAID-1) • 32GB • 1Gb non-dedicated network
  • 22. MONITORING • Graphite • Nagios • Jolokia
  • 23. GOTCHAS • Vnodes and rack awareness • Loadbalancers • Dev differs from production (of course...) • Launching in a DC we didn't load test in
  • 24. LAUNCH • Request to simulate a node failure • Two nodes died over Christmas • Expanding to other titles
  • 26. APPENDIX cassandra.conf: auto_bootstrap: false hinted_handoff_throttle_in_kb: 1024 max_hints_delivery_threads: 2 trickle_fsync: true rpc_server_type: hsha <% if virtual == "physical" -%> concurrent_reads: 128 <% else -%> concurrent_reads: 32 <% end -%> concurrent_writes: <%= processorcount.to_i * 8 -%> multithreaded_compaction: false <% if virtual == "physical" -%> compaction_throughput_mb_per_sec: 0 <% else -%> compaction_throughput_mb_per_sec: 16 <% end -%> ! cassandra-env.sh: <% if virtual == "physical" -%> JVM_OPTS="$JVM_OPTS -Xss180k" <% else -%> JVM_OPTS="$JVM_OPTS -Xss228k" <% end -%> JVM_EXTRA_OPTS="$JVM_EXTRA_OPTS -javaagent:/usr/ share/java/graphite-reporter-agent.jar -javaagent:/usr/share/java/ jolokia-jvm-agent.jar=port=8080,host=<%= hostname %>" EXTRA_CLASSPATH="/usr/share/java/metrics-graphite-2.0.3.jar"