SlideShare une entreprise Scribd logo
1  sur  45
Main sponsor




The Apache Cassandra storage
          engine
        Sylvain Lebresne
About me

• Sylvain Lebresne
• sylvain@datastax.com
• @pcmanus
• Work at
1. What is Apache Cassandra

2. Data Model

3. The storage engine
1. What is Apache Cassandra

2. Data Model

3. The storage engine
about:project

• Distributed data store aimed at big data.
• Apache project since 2010.
• Version 1.0 released last October.
• Proven in production (Netflix, Twitter,
  Reddit, Cisco, ...). Largest know cluster has
  over 300TB in over 400 machines.
Apache Cassandra
Apache Cassandra
A database:
Apache Cassandra
A database:
• distributed / decentralized
Apache Cassandra
A database:
• distributed / decentralized
• replicated & durable
Apache Cassandra
A database:
• distributed / decentralized
• replicated & durable
• scalable / elastic
Apache Cassandra
A database:
• distributed / decentralized
• replicated & durable
• scalable / elastic
Apache Cassandra
A database:
• distributed / decentralized
• replicated & durable
• scalable / elastic
• fault-tolerant / no SPOF
Apache Cassandra
A database:
• distributed / decentralized
• replicated & durable
• scalable / elastic
• fault-tolerant / no SPOF
• highly available
Apache Cassandra
A database:
• distributed / decentralized
• replicated & durable
• scalable / elastic
• fault-tolerant / no SPOF
• highly available
Apache Cassandra
A database:
• distributed / decentralized
• replicated & durable
• scalable / elastic
• fault-tolerant / no SPOF
• highly available
• data center aware


          US
                                Europe
1. What is Apache Cassandra

2. Data Model

3. The storage engine
Data Model


• Not SQL (no transaction, nor joins) but
  more than Key/Value.
• Inspired by Google BigTable
• Column families based.
Ex: user profiles
        “For each user, holds profile infos”


                   50e8-e29b
                  birth_year   1994

                   fname       Justin

                   lname       Bieber




Users
Ex: user profiles
        “For each user, holds profile infos”


          50e8-e29b             2ab1-f1b7
         birth_year   1994     birth_year     1978

          fname       Justin     email      a@kutcher.com



          lname       Bieber    fname        Ashton

                                lname       Kutcher




Users
Ex: user’s Tweets
           “For each user, tweets he has made”

                        50e8-e29b




Timeline
Ex: user’s Tweets
           “For each user, tweets he has made”

                          50e8-e29b
                            @LiveLoveKary glad you had
                      0     a good birthday #muchlove




Timeline
Ex: user’s Tweets
           “For each user, tweets he has made”

                          50e8-e29b
                            @NickDeMoura happy bday
                      1     my dude.


                            @LiveLoveKary glad you had
                      0     a good birthday #muchlove




Timeline
Ex: user’s Tweets
           “For each user, tweets he has made”

                          50e8-e29b
                            @MickyArison @miamiHEAT
                      2     thanks for the gam tonight


                            @NickDeMoura happy bday
                      1     my dude.


                            @LiveLoveKary glad you had
                      0     a good birthday #muchlove




Timeline
Ex: user’s Tweets
           “For each user, tweets he has made”

                          50e8-e29b
                            still a little tired. back in the
                      3     studio today with Timbaland


                            @MickyArison @miamiHEAT
                      2     thanks for the gam tonight


                            @NickDeMoura happy bday
                      1     my dude.


                            @LiveLoveKary glad you had
                      0     a good birthday #muchlove




Timeline
There’s more


• Secondary indexes
• Distributed counters
• Composite columns
1. What is Apache Cassandra

2. Data Model

3. The storage engine
Goal


• Writes are harder than reads to scale
• Spinning disks aren’t good with random I/O
• Goal: minimize random I/O
A write’s journey
 write( k1 , c1:v1 )

                                               Memory




                                  Memtable




Commit log



                                             Hard drive
A write’s journey
 write( k1 , c1:v1 )

                                                    Memory
                            k1 c1:v1




                                       Memtable



     k1 c1:v1




Commit log



                                                  Hard drive
A write’s journey
ack
                                 Memory
                k1 c1:v1




k1 c1:v1




                               Hard drive
A write’s journey
write(    k2   ,   c1:v1 c2:v2   )

                                                        Memory
                                     k1 c1:v1

                                     k2 c1:v1 c2:v2




  k1 c1:v1
k2 c1:v1 c2:v2




                                                      Hard drive
A write’s journey
write(    k1   , c1:v4 c3:v3 c2:v2 )

                                                                Memory
                                       k1 c1:v4 c2:v2 c3:v3

                                       k2 c1:v1 c2:v2




   k1 c1:v1
k2 c1:v1 c2:v2
k1 c1:v4 c3:v3
c2:v2




                                                              Hard drive
A write’s journey
                                              Memory




          flush




                 index
cleanup    k1 c1:v4 c2:v2 c3:v3

           k2 c1:v1 c2:v2


                                  SSTable




                                            Hard drive
A write’s journey
more updates

                                                             Memory
                                          k1 c1:v5 c4:v4

                                          k2 c1:v2 c3:v3




 k2 c1:v2 c3:v3
 k1 c1:v5 c4:v4
                         index
                   k1 c1:v4 c2:v2 c3:v3

                   k2 c1:v1 c2:v2




                                                           Hard drive
A write’s journey
                                              Memory




                        flush


       index                     index
 k1 c1:v4 c2:v2 c3:v3      k1 c1:v5 c4:v4

 k2 c1:v1 c2:v2            k2 c1:v2 c3:v3




                                            Hard drive
Writes properties


• No reads or seeks
• Only sequential I/O
• Immutable SSTables: easy snapshots
A read’s journey
read( k1 )
                                                        Memory
    ?




                    index                  index
              k1 c1:v4 c2:v2 c3:v3   k1 c1:v5 c4:v4

              k2 c1:v1 c2:v2         k2 c1:v2 c3:v3




                                                      Hard drive
A read’s journey
k1 c1:v5 c2:v2 c3:v3 c4:v4


                                                                 Memory

merge




                             index                  index
                       k1 c1:v4 c2:v2 c3:v3   k1 c1:v5 c4:v4

                       k2 c1:v1 c2:v2         k2 c1:v2 c3:v3




                                                               Hard drive
Compaction

• Goal: keep the number of SSTables low
• Merge sort against multiple sstables
• Sequential I/O
Compaction

• Goal: keep the number of SSTables low
• Merge sort against multiple sstables
• Sequential I/O
          index
    k1 c1:v4 c2:v2 c3:v3

    k2 c1:v1 c2:v2



          index
    k1 c1:v5 c4:v4

    k2 c1:v2 c3:v3
Compaction

• Goal: keep the number of SSTables low
• Merge sort against multiple sstables
• Sequential I/O
          index
    k1 c1:v4 c2:v2 c3:v3

    k2 c1:v1 c2:v2
                                      index
                                k1 c1:v5 c2:v2 c3:v3 c4:v4
          index                 k2 c1:v2 c2:v2 c3:v3

    k1 c1:v5 c4:v4

    k2 c1:v2 c3:v3
Optimizations

• Row Cache
• Bloom filters: eliminates whole SSTable
• Key Cache
• Rows & Columns Indexes
• ...
Other features

• Compression
• Checksums
• Time to live
Questions?
• Cassandra 1.1 scheduled in a couple of
  weeks

• http://cassandra.apache.org/
• http://wiki.apache.org/cassandra/
• http://www.datastax.com/docs/1.0

Contenu connexe

Dernier

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbuapidays
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
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 SavingEdi Saputra
 
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...Zilliz
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
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 businesspanagenda
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024The Digital Insurer
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 

Dernier (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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
 
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...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
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
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

En vedette

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by HubspotMarius Sescu
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTExpeed Software
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 

En vedette (20)

2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
 
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPTEverything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
 
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 

33rd degree conference

  • 1. Main sponsor The Apache Cassandra storage engine Sylvain Lebresne
  • 2. About me • Sylvain Lebresne • sylvain@datastax.com • @pcmanus • Work at
  • 3. 1. What is Apache Cassandra 2. Data Model 3. The storage engine
  • 4. 1. What is Apache Cassandra 2. Data Model 3. The storage engine
  • 5. about:project • Distributed data store aimed at big data. • Apache project since 2010. • Version 1.0 released last October. • Proven in production (Netflix, Twitter, Reddit, Cisco, ...). Largest know cluster has over 300TB in over 400 machines.
  • 8. Apache Cassandra A database: • distributed / decentralized
  • 9. Apache Cassandra A database: • distributed / decentralized • replicated & durable
  • 10. Apache Cassandra A database: • distributed / decentralized • replicated & durable • scalable / elastic
  • 11. Apache Cassandra A database: • distributed / decentralized • replicated & durable • scalable / elastic
  • 12. Apache Cassandra A database: • distributed / decentralized • replicated & durable • scalable / elastic • fault-tolerant / no SPOF
  • 13. Apache Cassandra A database: • distributed / decentralized • replicated & durable • scalable / elastic • fault-tolerant / no SPOF • highly available
  • 14. Apache Cassandra A database: • distributed / decentralized • replicated & durable • scalable / elastic • fault-tolerant / no SPOF • highly available
  • 15. Apache Cassandra A database: • distributed / decentralized • replicated & durable • scalable / elastic • fault-tolerant / no SPOF • highly available • data center aware US Europe
  • 16. 1. What is Apache Cassandra 2. Data Model 3. The storage engine
  • 17. Data Model • Not SQL (no transaction, nor joins) but more than Key/Value. • Inspired by Google BigTable • Column families based.
  • 18. Ex: user profiles “For each user, holds profile infos” 50e8-e29b birth_year 1994 fname Justin lname Bieber Users
  • 19. Ex: user profiles “For each user, holds profile infos” 50e8-e29b 2ab1-f1b7 birth_year 1994 birth_year 1978 fname Justin email a@kutcher.com lname Bieber fname Ashton lname Kutcher Users
  • 20. Ex: user’s Tweets “For each user, tweets he has made” 50e8-e29b Timeline
  • 21. Ex: user’s Tweets “For each user, tweets he has made” 50e8-e29b @LiveLoveKary glad you had 0 a good birthday #muchlove Timeline
  • 22. Ex: user’s Tweets “For each user, tweets he has made” 50e8-e29b @NickDeMoura happy bday 1 my dude. @LiveLoveKary glad you had 0 a good birthday #muchlove Timeline
  • 23. Ex: user’s Tweets “For each user, tweets he has made” 50e8-e29b @MickyArison @miamiHEAT 2 thanks for the gam tonight @NickDeMoura happy bday 1 my dude. @LiveLoveKary glad you had 0 a good birthday #muchlove Timeline
  • 24. Ex: user’s Tweets “For each user, tweets he has made” 50e8-e29b still a little tired. back in the 3 studio today with Timbaland @MickyArison @miamiHEAT 2 thanks for the gam tonight @NickDeMoura happy bday 1 my dude. @LiveLoveKary glad you had 0 a good birthday #muchlove Timeline
  • 25. There’s more • Secondary indexes • Distributed counters • Composite columns
  • 26. 1. What is Apache Cassandra 2. Data Model 3. The storage engine
  • 27. Goal • Writes are harder than reads to scale • Spinning disks aren’t good with random I/O • Goal: minimize random I/O
  • 28. A write’s journey write( k1 , c1:v1 ) Memory Memtable Commit log Hard drive
  • 29. A write’s journey write( k1 , c1:v1 ) Memory k1 c1:v1 Memtable k1 c1:v1 Commit log Hard drive
  • 30. A write’s journey ack Memory k1 c1:v1 k1 c1:v1 Hard drive
  • 31. A write’s journey write( k2 , c1:v1 c2:v2 ) Memory k1 c1:v1 k2 c1:v1 c2:v2 k1 c1:v1 k2 c1:v1 c2:v2 Hard drive
  • 32. A write’s journey write( k1 , c1:v4 c3:v3 c2:v2 ) Memory k1 c1:v4 c2:v2 c3:v3 k2 c1:v1 c2:v2 k1 c1:v1 k2 c1:v1 c2:v2 k1 c1:v4 c3:v3 c2:v2 Hard drive
  • 33. A write’s journey Memory flush index cleanup k1 c1:v4 c2:v2 c3:v3 k2 c1:v1 c2:v2 SSTable Hard drive
  • 34. A write’s journey more updates Memory k1 c1:v5 c4:v4 k2 c1:v2 c3:v3 k2 c1:v2 c3:v3 k1 c1:v5 c4:v4 index k1 c1:v4 c2:v2 c3:v3 k2 c1:v1 c2:v2 Hard drive
  • 35. A write’s journey Memory flush index index k1 c1:v4 c2:v2 c3:v3 k1 c1:v5 c4:v4 k2 c1:v1 c2:v2 k2 c1:v2 c3:v3 Hard drive
  • 36. Writes properties • No reads or seeks • Only sequential I/O • Immutable SSTables: easy snapshots
  • 37. A read’s journey read( k1 ) Memory ? index index k1 c1:v4 c2:v2 c3:v3 k1 c1:v5 c4:v4 k2 c1:v1 c2:v2 k2 c1:v2 c3:v3 Hard drive
  • 38. A read’s journey k1 c1:v5 c2:v2 c3:v3 c4:v4 Memory merge index index k1 c1:v4 c2:v2 c3:v3 k1 c1:v5 c4:v4 k2 c1:v1 c2:v2 k2 c1:v2 c3:v3 Hard drive
  • 39. Compaction • Goal: keep the number of SSTables low • Merge sort against multiple sstables • Sequential I/O
  • 40. Compaction • Goal: keep the number of SSTables low • Merge sort against multiple sstables • Sequential I/O index k1 c1:v4 c2:v2 c3:v3 k2 c1:v1 c2:v2 index k1 c1:v5 c4:v4 k2 c1:v2 c3:v3
  • 41. Compaction • Goal: keep the number of SSTables low • Merge sort against multiple sstables • Sequential I/O index k1 c1:v4 c2:v2 c3:v3 k2 c1:v1 c2:v2 index k1 c1:v5 c2:v2 c3:v3 c4:v4 index k2 c1:v2 c2:v2 c3:v3 k1 c1:v5 c4:v4 k2 c1:v2 c3:v3
  • 42. Optimizations • Row Cache • Bloom filters: eliminates whole SSTable • Key Cache • Rows & Columns Indexes • ...
  • 43. Other features • Compression • Checksums • Time to live
  • 45. • Cassandra 1.1 scheduled in a couple of weeks • http://cassandra.apache.org/ • http://wiki.apache.org/cassandra/ • http://www.datastax.com/docs/1.0

Notes de l'éditeur

  1. \n
  2. \n
  3. \n
  4. \n
  5. \n
  6. \n
  7. \n
  8. \n
  9. \n
  10. \n
  11. \n
  12. \n
  13. \n
  14. \n
  15. \n
  16. \n
  17. \n
  18. \n
  19. \n
  20. \n
  21. \n
  22. \n
  23. \n
  24. \n
  25. \n
  26. \n
  27. \n
  28. \n
  29. \n
  30. \n
  31. \n
  32. \n
  33. \n
  34. \n
  35. \n
  36. \n
  37. \n
  38. \n
  39. \n
  40. \n
  41. \n
  42. \n
  43. \n
  44. \n
  45. \n
  46. \n
  47. \n
  48. \n
  49. \n
  50. \n
  51. \n
  52. \n
  53. \n
  54. \n
  55. \n
  56. \n
  57. \n
  58. \n
  59. \n
  60. \n
  61. \n
  62. \n
  63. \n
  64. \n
  65. \n
  66. \n
  67. \n