SlideShare une entreprise Scribd logo
1  sur  33
Télécharger pour lire hors ligne
V is for vnodes
    Patrick McFadin, Sr Solution Architect
    DataStax


    ©2012 DataStax
                                             1
Friday, February 15, 13
Agenda for today
        • What is a node?
        • How vnodes work
        • Converting your cluster
        • Benefits




    ©2012 DataStax
                                    2
Friday, February 15, 13
Since the beginning...
                     Cassandra has had...



                             Clusters, which have...



                                      Keyspaces, which have...



                                              Column Families, which have...




    ©2012 DataStax
                                                                               3
Friday, February 15, 13
Row Keys

                          Unique in a column family
                          Can be up to 64k in size
                          Can be sorted in the cluster
                                                          Byte Ordered Partitioner

                                    OR...



                          Can be randomly placed in cluster
                                                         Random Partitioner



    ©2012 DataStax
                                                                                     4
Friday, February 15, 13
Row Keys
                  How do you...

                  • Create a random number?
                  • Make sure the number is big enough?
                  • Make it reproducible?


                                 MD5 does the job


                     Input a Row Key     MD5        Get a 128 bit number




    ©2012 DataStax
                                                                           5
Friday, February 15, 13
Row Keys
                           Input                                      Get

                 @PatrickMcFadin             MD5        0xcfc2d0610aaa712a8c36711d08a2550a




                           Input                                      Get

                          8675309            MD5        0x6cc0d36686e6a433aa76f96773852d35




                            The number produced is a range between:

                            0 and 2128-1... but Cassandra uses 2127-1

         2128 = 340,282,366,920,938,463,463,374,607,431,768,211,456

                                            ...otherwise known as a HUGE number.
    ©2012 DataStax
                                                                                             6
Friday, February 15, 13
©2012 DataStax
                          7
Friday, February 15, 13
Token Assignment
        • Each Cassandra node is assigned a token
        • Each token is a number inside the huge range
        • Tokens mark the ownership range of Row Keys

                          From: Token = 0




                                               To: Token = 56713727820156410577229101238628035242




                                                   From:



                            To: Token = 113427455640312821154458202477256070484

    ©2012 DataStax
                                                                                                    8
Friday, February 15, 13
Row Key to Token
                    Input                                                     Get

       @PatrickMcFadin                      MD5          276161727147663567581939045564154008842




                                       Token = 0




                              I’ll                 Token = 56713727820156410577229101238628035242
                            take it!



                            Token = 113427455640312821154458202477256070484

    ©2012 DataStax
                                                                                                    9
Friday, February 15, 13
Row Key to Token
                    Input                                                     Get

       @PatrickMcFadin                      MD5          276161727147663567581939045564154008842




                                       Token = 0




                              I’ll                 Token = 56713727820156410577229101238628035242
                            take it!



                            Token = 113427455640312821154458202477256070484

    ©2012 DataStax
                                                                                                    9
Friday, February 15, 13
Row Key to Token
                    Input                                                     Get

       @PatrickMcFadin                      MD5          276161727147663567581939045564154008842




                                       Token = 0




                              I’ll                 Token = 56713727820156410577229101238628035242
                            take it!



                            Token = 113427455640312821154458202477256070484

    ©2012 DataStax
                                                                                                    9
Friday, February 15, 13
Cassandra 1.1 Node
        • Responsible for a single range of keys
        • Range determined by single token
        • One server = One token = One node




    ©2012 DataStax
                                                   10
Friday, February 15, 13
Cassandra 1.1 Node
        • Responsible for a single range of keys
        • Range determined by single token
        • One server = One token = One node




    ©2012 DataStax
                                                   10
Friday, February 15, 13
Cassandra 1.1 Node
        • Responsible for a single range of keys
        • Range determined by single token
        • One server = One token = One node




          Commodity node?

    ©2012 DataStax
                                                   10
Friday, February 15, 13
Cassandra 1.1 Node
        • Responsible for a single range of keys
        • Range determined by single token
        • One server = One token = One node




          Commodity node?

    ©2012 DataStax
                                                   10
Friday, February 15, 13
Cassandra 1.1 Node
        • Responsible for a single range of keys
        • Range determined by single token
        • One server = One token = One node




          Commodity node?             What you really want.

    ©2012 DataStax
                                                              10
Friday, February 15, 13
Cassandra 1.1 Node
        • Responsible for a single range of keys
        • Range determined by single token
        • One server = One token = One node




          Commodity node?             What you really want.

    ©2012 DataStax
                                                              10
Friday, February 15, 13
Time for a new plan

               • Hardware is only getting bigger
               • One node is responsible for more data
               • Token assignments are a pain




    ©2012 DataStax
                                                         11
Friday, February 15, 13
Token assignment (sucks)
        • Tokens need to be evenly spread
        • Growing a ring... not good options
        • Shrinking a ring... not good options
        • Tokens have to be added to each server config




    ©2012 DataStax
                                                         12
Friday, February 15, 13
Enter Virtual Nodes
        • One server should have many nodes
        • Each node should be small
        • Tokens should be automatic

                  Version 1.1          Version 1.2
                          Server 1       Server 1

                                         1      2

                            1-4
                                         4      3




    ©2012 DataStax
                                                     13
Friday, February 15, 13
Virtual Node Features
        • Default 256 Nodes per server
        • Auto assign tokens
        • Faster rebuilds of servers
        • Faster server add to cluster
        • New partitioner (More later)




    ©2012 DataStax
                                         14
Friday, February 15, 13
Transitioning to vnodes
              Super easy!

              Find these lines in your cassandra.yaml file:

                          #num_tokens:

                          initial_token: <some big number>




             Change to:
                          num_tokens: 256

                          initial_token:




              and restart.
                                                             Repeat on all nodes in cluster
    ©2012 DataStax
                                                                                         15
Friday, February 15, 13
Transitioning to vnodes
           After all Cassandra instances have been reset

                          Initialize a shuffle operation

                          [patrick@cassandra0 ~]$ cassandra-shuffle create




                          Enable shuffling

                          [patrick@cassandra0 ~]$ cassandra-shuffle enable




                          List pending relocations*

                          [patrick@cassandra0 ~]$ cassandra-shuffle ls




                                                                             Let’s walk through it...
                             *This is a slow op. Be patient.
    ©2012 DataStax
                                                                                                    16
Friday, February 15, 13
Existing 1.1 cluster
                          Server 1   Server 2



                            1-4        4-8




                          Server 4   Server 3



                          13-16       9-12




    ©2012 DataStax

Friday, February 15, 13
Set num_tokens and restart
                            Server 1        Server 2

                           1-4     1-4    4-8     4-8



                           1-4     1-4    4-8     4-8




                            Server 4        Server 3

                          13-16   13-16   9-12    9-12



                          13-16   13-16   9-12    9-12



    ©2012 DataStax
                                                         18
Friday, February 15, 13
Set num_tokens and restart
                           Server 1                  Server 2

                          1       2                 5       6



                          3       4                 7       8




                           Server 4                  Server 3

                          13      14                9       10



                          15      16               11       12



    ©2012 DataStax
                                       Initialize and Enable shuffling...
                                                                            19
Friday, February 15, 13
Shuffle enable
                           Server 1    Server 2

                          1       5    2          6



                          13      9    14     10




                           Server 4    Server 3

                          3       7    4          8



                          16      12   15     11



    ©2012 DataStax
                                                      20
Friday, February 15, 13
Shuffle complete
                           Server 1    Server 2

                          1       5    2          6



                          13      9    14     10




                           Server 4    Server 3

                          3       7    4          8



                          16      12   15     11



    ©2012 DataStax
                                                      21
Friday, February 15, 13
Ops life with vnodes
        • Add any number of nodes
        • No token assignments!
        • Bigger server? Larger num_tokens
        • Decommission any number of nodes
        • New nodetool command: status




                          One more time now!

    ©2012 DataStax
                                               22
Friday, February 15, 13
Bonus new thing
        • New Partitioner: Murmur3Partitoner
        • Murmur3 replaces MD5
        • Slightly faster than MD5 in certain cases
        • Go forward partitioner for NEW clusters
        • No need to convert




            More details here:
            https://issues.apache.org/jira/browse/CASSANDRA-3772


    ©2012 DataStax
                                                                   23
Friday, February 15, 13
In conclusion...


                              Go out and try some vnode love today!



                              Download Cassandra 1.2 now


                          http://www.datastax.com/download/community


                            http://cassandra.apache.org/download/




    ©2012 DataStax
                                                                       24
Friday, February 15, 13
Some handy references

              http://www.datastax.com/dev/blog/virtual-nodes-in-cassandra-1-2


               http://www.datastax.com/dev/blog/upgrading-an-existing-cluster-to-vnodes


              Follow me on Twitter for more: @PatrickMcFadin




    ©2012 DataStax
                                                                                          25
Friday, February 15, 13
We power the apps
                           that transform
                              business.



    ©2012 DataStax
                                              26
Friday, February 15, 13

Contenu connexe

Tendances

MAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMarkus Michalewicz
 
Introduction to snowflake
Introduction to snowflakeIntroduction to snowflake
Introduction to snowflakeSunil Gurav
 
Parallel Query on Exadata
Parallel Query on ExadataParallel Query on Exadata
Parallel Query on ExadataEnkitec
 
Spark + Cassandra = Real Time Analytics on Operational Data
Spark + Cassandra = Real Time Analytics on Operational DataSpark + Cassandra = Real Time Analytics on Operational Data
Spark + Cassandra = Real Time Analytics on Operational DataVictor Coustenoble
 
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsBest Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsJignesh Shah
 
Understanding oracle rac internals part 2 - slides
Understanding oracle rac internals   part 2 - slidesUnderstanding oracle rac internals   part 2 - slides
Understanding oracle rac internals part 2 - slidesMohamed Farouk
 
The Hidden Value of Hadoop Migration
The Hidden Value of Hadoop MigrationThe Hidden Value of Hadoop Migration
The Hidden Value of Hadoop MigrationDatabricks
 
Apache Cassandra and DataStax Enterprise Explained with Peter Halliday at Wil...
Apache Cassandra and DataStax Enterprise Explained with Peter Halliday at Wil...Apache Cassandra and DataStax Enterprise Explained with Peter Halliday at Wil...
Apache Cassandra and DataStax Enterprise Explained with Peter Halliday at Wil...DataStax Academy
 
Understanding oracle rac internals part 1 - slides
Understanding oracle rac internals   part 1 - slidesUnderstanding oracle rac internals   part 1 - slides
Understanding oracle rac internals part 1 - slidesMohamed Farouk
 
Stream Data Deduplication Powered by Kafka Streams | Philipp Schirmer, Bakdata
Stream Data Deduplication Powered by Kafka Streams | Philipp Schirmer, BakdataStream Data Deduplication Powered by Kafka Streams | Philipp Schirmer, Bakdata
Stream Data Deduplication Powered by Kafka Streams | Philipp Schirmer, BakdataHostedbyConfluent
 
Presentation of Apache Cassandra
Presentation of Apache Cassandra Presentation of Apache Cassandra
Presentation of Apache Cassandra Nikiforos Botis
 
Migrating with Debezium
Migrating with DebeziumMigrating with Debezium
Migrating with DebeziumMike Fowler
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfOracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfSrirakshaSrinivasan2
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuningSimon Huang
 
Four Things to Know About Reliable Spark Streaming with Typesafe and Databricks
Four Things to Know About Reliable Spark Streaming with Typesafe and DatabricksFour Things to Know About Reliable Spark Streaming with Typesafe and Databricks
Four Things to Know About Reliable Spark Streaming with Typesafe and DatabricksLegacy Typesafe (now Lightbend)
 
A Deep Dive into Structured Streaming: Apache Spark Meetup at Bloomberg 2016
A Deep Dive into Structured Streaming:  Apache Spark Meetup at Bloomberg 2016 A Deep Dive into Structured Streaming:  Apache Spark Meetup at Bloomberg 2016
A Deep Dive into Structured Streaming: Apache Spark Meetup at Bloomberg 2016 Databricks
 
Oracle Databaseを用いて学ぶ RDBMSの基本 (抜粋版) - JPOUG Oracle Database入学式 2016
Oracle Databaseを用いて学ぶRDBMSの基本 (抜粋版) - JPOUG Oracle Database入学式 2016 Oracle Databaseを用いて学ぶRDBMSの基本 (抜粋版) - JPOUG Oracle Database入学式 2016
Oracle Databaseを用いて学ぶ RDBMSの基本 (抜粋版) - JPOUG Oracle Database入学式 2016 Ryota Watabe
 
Securing SQL Server with TLS 1.2
Securing SQL Server with TLS 1.2Securing SQL Server with TLS 1.2
Securing SQL Server with TLS 1.2Amit Banerjee
 

Tendances (20)

MAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19cMAA Best Practices for Oracle Database 19c
MAA Best Practices for Oracle Database 19c
 
Introduction to snowflake
Introduction to snowflakeIntroduction to snowflake
Introduction to snowflake
 
Parallel Query on Exadata
Parallel Query on ExadataParallel Query on Exadata
Parallel Query on Exadata
 
Spark + Cassandra = Real Time Analytics on Operational Data
Spark + Cassandra = Real Time Analytics on Operational DataSpark + Cassandra = Real Time Analytics on Operational Data
Spark + Cassandra = Real Time Analytics on Operational Data
 
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized EnvironmentsBest Practices of HA and Replication of PostgreSQL in Virtualized Environments
Best Practices of HA and Replication of PostgreSQL in Virtualized Environments
 
Understanding oracle rac internals part 2 - slides
Understanding oracle rac internals   part 2 - slidesUnderstanding oracle rac internals   part 2 - slides
Understanding oracle rac internals part 2 - slides
 
The Hidden Value of Hadoop Migration
The Hidden Value of Hadoop MigrationThe Hidden Value of Hadoop Migration
The Hidden Value of Hadoop Migration
 
Apache Cassandra and DataStax Enterprise Explained with Peter Halliday at Wil...
Apache Cassandra and DataStax Enterprise Explained with Peter Halliday at Wil...Apache Cassandra and DataStax Enterprise Explained with Peter Halliday at Wil...
Apache Cassandra and DataStax Enterprise Explained with Peter Halliday at Wil...
 
Understanding oracle rac internals part 1 - slides
Understanding oracle rac internals   part 1 - slidesUnderstanding oracle rac internals   part 1 - slides
Understanding oracle rac internals part 1 - slides
 
Stream Data Deduplication Powered by Kafka Streams | Philipp Schirmer, Bakdata
Stream Data Deduplication Powered by Kafka Streams | Philipp Schirmer, BakdataStream Data Deduplication Powered by Kafka Streams | Philipp Schirmer, Bakdata
Stream Data Deduplication Powered by Kafka Streams | Philipp Schirmer, Bakdata
 
Presentation of Apache Cassandra
Presentation of Apache Cassandra Presentation of Apache Cassandra
Presentation of Apache Cassandra
 
Migrating with Debezium
Migrating with DebeziumMigrating with Debezium
Migrating with Debezium
 
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdfOracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
Oracle_Multitenant_19c_-_All_About_Pluggable_D.pdf
 
Hadoop HDFS
Hadoop HDFSHadoop HDFS
Hadoop HDFS
 
Oracle db performance tuning
Oracle db performance tuningOracle db performance tuning
Oracle db performance tuning
 
Four Things to Know About Reliable Spark Streaming with Typesafe and Databricks
Four Things to Know About Reliable Spark Streaming with Typesafe and DatabricksFour Things to Know About Reliable Spark Streaming with Typesafe and Databricks
Four Things to Know About Reliable Spark Streaming with Typesafe and Databricks
 
A Deep Dive into Structured Streaming: Apache Spark Meetup at Bloomberg 2016
A Deep Dive into Structured Streaming:  Apache Spark Meetup at Bloomberg 2016 A Deep Dive into Structured Streaming:  Apache Spark Meetup at Bloomberg 2016
A Deep Dive into Structured Streaming: Apache Spark Meetup at Bloomberg 2016
 
Oracle Databaseを用いて学ぶ RDBMSの基本 (抜粋版) - JPOUG Oracle Database入学式 2016
Oracle Databaseを用いて学ぶRDBMSの基本 (抜粋版) - JPOUG Oracle Database入学式 2016 Oracle Databaseを用いて学ぶRDBMSの基本 (抜粋版) - JPOUG Oracle Database入学式 2016
Oracle Databaseを用いて学ぶ RDBMSの基本 (抜粋版) - JPOUG Oracle Database入学式 2016
 
Securing SQL Server with TLS 1.2
Securing SQL Server with TLS 1.2Securing SQL Server with TLS 1.2
Securing SQL Server with TLS 1.2
 
Apache Spark Core
Apache Spark CoreApache Spark Core
Apache Spark Core
 

En vedette

Cassandra overview: Um Caso Prático
Cassandra overview:  Um Caso PráticoCassandra overview:  Um Caso Prático
Cassandra overview: Um Caso PráticoEiti Kimura
 
Bulk Loading Data into Cassandra
Bulk Loading Data into CassandraBulk Loading Data into Cassandra
Bulk Loading Data into CassandraDataStax
 
Webinar | Introducing DataStax Enterprise 4.6
Webinar | Introducing DataStax Enterprise 4.6Webinar | Introducing DataStax Enterprise 4.6
Webinar | Introducing DataStax Enterprise 4.6DataStax
 
Webinar: ROI on Big Data - RDBMS, NoSQL or Both? A Simple Guide for Knowing H...
Webinar: ROI on Big Data - RDBMS, NoSQL or Both? A Simple Guide for Knowing H...Webinar: ROI on Big Data - RDBMS, NoSQL or Both? A Simple Guide for Knowing H...
Webinar: ROI on Big Data - RDBMS, NoSQL or Both? A Simple Guide for Knowing H...DataStax
 
Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...
Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...
Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...DataStax
 
Cassandra Community Webinar: Back to Basics with CQL3
Cassandra Community Webinar: Back to Basics with CQL3Cassandra Community Webinar: Back to Basics with CQL3
Cassandra Community Webinar: Back to Basics with CQL3DataStax
 
Webinar: Don't Leave Your Data in the Dark
Webinar: Don't Leave Your Data in the DarkWebinar: Don't Leave Your Data in the Dark
Webinar: Don't Leave Your Data in the DarkDataStax
 
How much money do you lose every time your ecommerce site goes down?
How much money do you lose every time your ecommerce site goes down?How much money do you lose every time your ecommerce site goes down?
How much money do you lose every time your ecommerce site goes down?DataStax
 
Cassandra Community Webinar | In Case of Emergency Break Glass
Cassandra Community Webinar | In Case of Emergency Break GlassCassandra Community Webinar | In Case of Emergency Break Glass
Cassandra Community Webinar | In Case of Emergency Break GlassDataStax
 
Don't Let Your Shoppers Drop; 5 Rules for Today’s eCommerce
Don't Let Your Shoppers Drop; 5 Rules for Today’s eCommerceDon't Let Your Shoppers Drop; 5 Rules for Today’s eCommerce
Don't Let Your Shoppers Drop; 5 Rules for Today’s eCommerceDataStax
 
Getting Big Value from Big Data
Getting Big Value from Big DataGetting Big Value from Big Data
Getting Big Value from Big DataDataStax
 
Webinar: Eventual Consistency != Hopeful Consistency
Webinar: Eventual Consistency != Hopeful ConsistencyWebinar: Eventual Consistency != Hopeful Consistency
Webinar: Eventual Consistency != Hopeful ConsistencyDataStax
 
Webinar | How Clear Capital Delivers Always-on Appraisals on 122 Million Prop...
Webinar | How Clear Capital Delivers Always-on Appraisals on 122 Million Prop...Webinar | How Clear Capital Delivers Always-on Appraisals on 122 Million Prop...
Webinar | How Clear Capital Delivers Always-on Appraisals on 122 Million Prop...DataStax
 
Webinar: Getting Started with Apache Cassandra
Webinar: Getting Started with Apache CassandraWebinar: Getting Started with Apache Cassandra
Webinar: Getting Started with Apache CassandraDataStax
 
Webinar | From Zero to 1 Million with Google Cloud Platform and DataStax
Webinar | From Zero to 1 Million with Google Cloud Platform and DataStaxWebinar | From Zero to 1 Million with Google Cloud Platform and DataStax
Webinar | From Zero to 1 Million with Google Cloud Platform and DataStaxDataStax
 
Cassandra TK 2014 - Large Nodes
Cassandra TK 2014 - Large NodesCassandra TK 2014 - Large Nodes
Cassandra TK 2014 - Large Nodesaaronmorton
 
Cassandra Community Webinar | Practice Makes Perfect: Extreme Cassandra Optim...
Cassandra Community Webinar | Practice Makes Perfect: Extreme Cassandra Optim...Cassandra Community Webinar | Practice Makes Perfect: Extreme Cassandra Optim...
Cassandra Community Webinar | Practice Makes Perfect: Extreme Cassandra Optim...DataStax
 
Webinar: 2 Billion Data Points Each Day
Webinar: 2 Billion Data Points Each DayWebinar: 2 Billion Data Points Each Day
Webinar: 2 Billion Data Points Each DayDataStax
 
Don’t Get Caught in a PCI Pickle: Meet Compliance and Protect Payment Card Da...
Don’t Get Caught in a PCI Pickle: Meet Compliance and Protect Payment Card Da...Don’t Get Caught in a PCI Pickle: Meet Compliance and Protect Payment Card Da...
Don’t Get Caught in a PCI Pickle: Meet Compliance and Protect Payment Card Da...DataStax
 
Cassandra Community Webinar | Make Life Easier - An Introduction to Cassandra...
Cassandra Community Webinar | Make Life Easier - An Introduction to Cassandra...Cassandra Community Webinar | Make Life Easier - An Introduction to Cassandra...
Cassandra Community Webinar | Make Life Easier - An Introduction to Cassandra...DataStax
 

En vedette (20)

Cassandra overview: Um Caso Prático
Cassandra overview:  Um Caso PráticoCassandra overview:  Um Caso Prático
Cassandra overview: Um Caso Prático
 
Bulk Loading Data into Cassandra
Bulk Loading Data into CassandraBulk Loading Data into Cassandra
Bulk Loading Data into Cassandra
 
Webinar | Introducing DataStax Enterprise 4.6
Webinar | Introducing DataStax Enterprise 4.6Webinar | Introducing DataStax Enterprise 4.6
Webinar | Introducing DataStax Enterprise 4.6
 
Webinar: ROI on Big Data - RDBMS, NoSQL or Both? A Simple Guide for Knowing H...
Webinar: ROI on Big Data - RDBMS, NoSQL or Both? A Simple Guide for Knowing H...Webinar: ROI on Big Data - RDBMS, NoSQL or Both? A Simple Guide for Knowing H...
Webinar: ROI on Big Data - RDBMS, NoSQL or Both? A Simple Guide for Knowing H...
 
Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...
Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...
Webinar: Dyn + DataStax - helping companies deliver exceptional end-user expe...
 
Cassandra Community Webinar: Back to Basics with CQL3
Cassandra Community Webinar: Back to Basics with CQL3Cassandra Community Webinar: Back to Basics with CQL3
Cassandra Community Webinar: Back to Basics with CQL3
 
Webinar: Don't Leave Your Data in the Dark
Webinar: Don't Leave Your Data in the DarkWebinar: Don't Leave Your Data in the Dark
Webinar: Don't Leave Your Data in the Dark
 
How much money do you lose every time your ecommerce site goes down?
How much money do you lose every time your ecommerce site goes down?How much money do you lose every time your ecommerce site goes down?
How much money do you lose every time your ecommerce site goes down?
 
Cassandra Community Webinar | In Case of Emergency Break Glass
Cassandra Community Webinar | In Case of Emergency Break GlassCassandra Community Webinar | In Case of Emergency Break Glass
Cassandra Community Webinar | In Case of Emergency Break Glass
 
Don't Let Your Shoppers Drop; 5 Rules for Today’s eCommerce
Don't Let Your Shoppers Drop; 5 Rules for Today’s eCommerceDon't Let Your Shoppers Drop; 5 Rules for Today’s eCommerce
Don't Let Your Shoppers Drop; 5 Rules for Today’s eCommerce
 
Getting Big Value from Big Data
Getting Big Value from Big DataGetting Big Value from Big Data
Getting Big Value from Big Data
 
Webinar: Eventual Consistency != Hopeful Consistency
Webinar: Eventual Consistency != Hopeful ConsistencyWebinar: Eventual Consistency != Hopeful Consistency
Webinar: Eventual Consistency != Hopeful Consistency
 
Webinar | How Clear Capital Delivers Always-on Appraisals on 122 Million Prop...
Webinar | How Clear Capital Delivers Always-on Appraisals on 122 Million Prop...Webinar | How Clear Capital Delivers Always-on Appraisals on 122 Million Prop...
Webinar | How Clear Capital Delivers Always-on Appraisals on 122 Million Prop...
 
Webinar: Getting Started with Apache Cassandra
Webinar: Getting Started with Apache CassandraWebinar: Getting Started with Apache Cassandra
Webinar: Getting Started with Apache Cassandra
 
Webinar | From Zero to 1 Million with Google Cloud Platform and DataStax
Webinar | From Zero to 1 Million with Google Cloud Platform and DataStaxWebinar | From Zero to 1 Million with Google Cloud Platform and DataStax
Webinar | From Zero to 1 Million with Google Cloud Platform and DataStax
 
Cassandra TK 2014 - Large Nodes
Cassandra TK 2014 - Large NodesCassandra TK 2014 - Large Nodes
Cassandra TK 2014 - Large Nodes
 
Cassandra Community Webinar | Practice Makes Perfect: Extreme Cassandra Optim...
Cassandra Community Webinar | Practice Makes Perfect: Extreme Cassandra Optim...Cassandra Community Webinar | Practice Makes Perfect: Extreme Cassandra Optim...
Cassandra Community Webinar | Practice Makes Perfect: Extreme Cassandra Optim...
 
Webinar: 2 Billion Data Points Each Day
Webinar: 2 Billion Data Points Each DayWebinar: 2 Billion Data Points Each Day
Webinar: 2 Billion Data Points Each Day
 
Don’t Get Caught in a PCI Pickle: Meet Compliance and Protect Payment Card Da...
Don’t Get Caught in a PCI Pickle: Meet Compliance and Protect Payment Card Da...Don’t Get Caught in a PCI Pickle: Meet Compliance and Protect Payment Card Da...
Don’t Get Caught in a PCI Pickle: Meet Compliance and Protect Payment Card Da...
 
Cassandra Community Webinar | Make Life Easier - An Introduction to Cassandra...
Cassandra Community Webinar | Make Life Easier - An Introduction to Cassandra...Cassandra Community Webinar | Make Life Easier - An Introduction to Cassandra...
Cassandra Community Webinar | Make Life Easier - An Introduction to Cassandra...
 

Plus de Patrick McFadin

Successful Architectures for Fast Data
Successful Architectures for Fast DataSuccessful Architectures for Fast Data
Successful Architectures for Fast DataPatrick McFadin
 
Open source or proprietary, choose wisely!
Open source or proprietary,  choose wisely!Open source or proprietary,  choose wisely!
Open source or proprietary, choose wisely!Patrick McFadin
 
An Introduction to time series with Team Apache
An Introduction to time series with Team ApacheAn Introduction to time series with Team Apache
An Introduction to time series with Team ApachePatrick McFadin
 
Laying down the smack on your data pipelines
Laying down the smack on your data pipelinesLaying down the smack on your data pipelines
Laying down the smack on your data pipelinesPatrick McFadin
 
Help! I want to contribute to an Open Source project but my boss says no.
Help! I want to contribute to an Open Source project but my boss says no.Help! I want to contribute to an Open Source project but my boss says no.
Help! I want to contribute to an Open Source project but my boss says no.Patrick McFadin
 
Analyzing Time Series Data with Apache Spark and Cassandra
Analyzing Time Series Data with Apache Spark and CassandraAnalyzing Time Series Data with Apache Spark and Cassandra
Analyzing Time Series Data with Apache Spark and CassandraPatrick McFadin
 
Storing time series data with Apache Cassandra
Storing time series data with Apache CassandraStoring time series data with Apache Cassandra
Storing time series data with Apache CassandraPatrick McFadin
 
A Cassandra + Solr + Spark Love Triangle Using DataStax Enterprise
A Cassandra + Solr + Spark Love Triangle Using DataStax EnterpriseA Cassandra + Solr + Spark Love Triangle Using DataStax Enterprise
A Cassandra + Solr + Spark Love Triangle Using DataStax EnterprisePatrick McFadin
 
Cassandra 3.0 advanced preview
Cassandra 3.0 advanced previewCassandra 3.0 advanced preview
Cassandra 3.0 advanced previewPatrick McFadin
 
Advanced data modeling with apache cassandra
Advanced data modeling with apache cassandraAdvanced data modeling with apache cassandra
Advanced data modeling with apache cassandraPatrick McFadin
 
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 cassandraPatrick McFadin
 
Apache cassandra and spark. you got the the lighter, let's start the fire
Apache cassandra and spark. you got the the lighter, let's start the fireApache cassandra and spark. you got the the lighter, let's start the fire
Apache cassandra and spark. you got the the lighter, let's start the firePatrick McFadin
 
Owning time series with team apache Strata San Jose 2015
Owning time series with team apache   Strata San Jose 2015Owning time series with team apache   Strata San Jose 2015
Owning time series with team apache Strata San Jose 2015Patrick McFadin
 
Nike Tech Talk: Double Down on Apache Cassandra and Spark
Nike Tech Talk:  Double Down on Apache Cassandra and SparkNike Tech Talk:  Double Down on Apache Cassandra and Spark
Nike Tech Talk: Double Down on Apache Cassandra and SparkPatrick McFadin
 
Apache cassandra & apache spark for time series data
Apache cassandra & apache spark for time series dataApache cassandra & apache spark for time series data
Apache cassandra & apache spark for time series dataPatrick McFadin
 
Real data models of silicon valley
Real data models of silicon valleyReal data models of silicon valley
Real data models of silicon valleyPatrick McFadin
 
Introduction to cassandra 2014
Introduction to cassandra 2014Introduction to cassandra 2014
Introduction to cassandra 2014Patrick McFadin
 
Making money with open source and not losing your soul: A practical guide
Making money with open source and not losing your soul: A practical guideMaking money with open source and not losing your soul: A practical guide
Making money with open source and not losing your soul: A practical guidePatrick McFadin
 
Time series with Apache Cassandra - Long version
Time series with Apache Cassandra - Long versionTime series with Apache Cassandra - Long version
Time series with Apache Cassandra - Long versionPatrick McFadin
 
Time series with apache cassandra strata
Time series with apache cassandra   strataTime series with apache cassandra   strata
Time series with apache cassandra strataPatrick McFadin
 

Plus de Patrick McFadin (20)

Successful Architectures for Fast Data
Successful Architectures for Fast DataSuccessful Architectures for Fast Data
Successful Architectures for Fast Data
 
Open source or proprietary, choose wisely!
Open source or proprietary,  choose wisely!Open source or proprietary,  choose wisely!
Open source or proprietary, choose wisely!
 
An Introduction to time series with Team Apache
An Introduction to time series with Team ApacheAn Introduction to time series with Team Apache
An Introduction to time series with Team Apache
 
Laying down the smack on your data pipelines
Laying down the smack on your data pipelinesLaying down the smack on your data pipelines
Laying down the smack on your data pipelines
 
Help! I want to contribute to an Open Source project but my boss says no.
Help! I want to contribute to an Open Source project but my boss says no.Help! I want to contribute to an Open Source project but my boss says no.
Help! I want to contribute to an Open Source project but my boss says no.
 
Analyzing Time Series Data with Apache Spark and Cassandra
Analyzing Time Series Data with Apache Spark and CassandraAnalyzing Time Series Data with Apache Spark and Cassandra
Analyzing Time Series Data with Apache Spark and Cassandra
 
Storing time series data with Apache Cassandra
Storing time series data with Apache CassandraStoring time series data with Apache Cassandra
Storing time series data with Apache Cassandra
 
A Cassandra + Solr + Spark Love Triangle Using DataStax Enterprise
A Cassandra + Solr + Spark Love Triangle Using DataStax EnterpriseA Cassandra + Solr + Spark Love Triangle Using DataStax Enterprise
A Cassandra + Solr + Spark Love Triangle Using DataStax Enterprise
 
Cassandra 3.0 advanced preview
Cassandra 3.0 advanced previewCassandra 3.0 advanced preview
Cassandra 3.0 advanced preview
 
Advanced data modeling with apache cassandra
Advanced data modeling with apache cassandraAdvanced data modeling with apache cassandra
Advanced data modeling with apache cassandra
 
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
 
Apache cassandra and spark. you got the the lighter, let's start the fire
Apache cassandra and spark. you got the the lighter, let's start the fireApache cassandra and spark. you got the the lighter, let's start the fire
Apache cassandra and spark. you got the the lighter, let's start the fire
 
Owning time series with team apache Strata San Jose 2015
Owning time series with team apache   Strata San Jose 2015Owning time series with team apache   Strata San Jose 2015
Owning time series with team apache Strata San Jose 2015
 
Nike Tech Talk: Double Down on Apache Cassandra and Spark
Nike Tech Talk:  Double Down on Apache Cassandra and SparkNike Tech Talk:  Double Down on Apache Cassandra and Spark
Nike Tech Talk: Double Down on Apache Cassandra and Spark
 
Apache cassandra & apache spark for time series data
Apache cassandra & apache spark for time series dataApache cassandra & apache spark for time series data
Apache cassandra & apache spark for time series data
 
Real data models of silicon valley
Real data models of silicon valleyReal data models of silicon valley
Real data models of silicon valley
 
Introduction to cassandra 2014
Introduction to cassandra 2014Introduction to cassandra 2014
Introduction to cassandra 2014
 
Making money with open source and not losing your soul: A practical guide
Making money with open source and not losing your soul: A practical guideMaking money with open source and not losing your soul: A practical guide
Making money with open source and not losing your soul: A practical guide
 
Time series with Apache Cassandra - Long version
Time series with Apache Cassandra - Long versionTime series with Apache Cassandra - Long version
Time series with Apache Cassandra - Long version
 
Time series with apache cassandra strata
Time series with apache cassandra   strataTime series with apache cassandra   strata
Time series with apache cassandra strata
 

Dernier

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
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
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 

Dernier (20)

#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
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...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
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...
 
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
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
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
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 

Cassandra Virtual Node talk

  • 1. V is for vnodes Patrick McFadin, Sr Solution Architect DataStax ©2012 DataStax 1 Friday, February 15, 13
  • 2. Agenda for today • What is a node? • How vnodes work • Converting your cluster • Benefits ©2012 DataStax 2 Friday, February 15, 13
  • 3. Since the beginning... Cassandra has had... Clusters, which have... Keyspaces, which have... Column Families, which have... ©2012 DataStax 3 Friday, February 15, 13
  • 4. Row Keys Unique in a column family Can be up to 64k in size Can be sorted in the cluster Byte Ordered Partitioner OR... Can be randomly placed in cluster Random Partitioner ©2012 DataStax 4 Friday, February 15, 13
  • 5. Row Keys How do you... • Create a random number? • Make sure the number is big enough? • Make it reproducible? MD5 does the job Input a Row Key MD5 Get a 128 bit number ©2012 DataStax 5 Friday, February 15, 13
  • 6. Row Keys Input Get @PatrickMcFadin MD5 0xcfc2d0610aaa712a8c36711d08a2550a Input Get 8675309 MD5 0x6cc0d36686e6a433aa76f96773852d35 The number produced is a range between: 0 and 2128-1... but Cassandra uses 2127-1 2128 = 340,282,366,920,938,463,463,374,607,431,768,211,456 ...otherwise known as a HUGE number. ©2012 DataStax 6 Friday, February 15, 13
  • 7. ©2012 DataStax 7 Friday, February 15, 13
  • 8. Token Assignment • Each Cassandra node is assigned a token • Each token is a number inside the huge range • Tokens mark the ownership range of Row Keys From: Token = 0 To: Token = 56713727820156410577229101238628035242 From: To: Token = 113427455640312821154458202477256070484 ©2012 DataStax 8 Friday, February 15, 13
  • 9. Row Key to Token Input Get @PatrickMcFadin MD5 276161727147663567581939045564154008842 Token = 0 I’ll Token = 56713727820156410577229101238628035242 take it! Token = 113427455640312821154458202477256070484 ©2012 DataStax 9 Friday, February 15, 13
  • 10. Row Key to Token Input Get @PatrickMcFadin MD5 276161727147663567581939045564154008842 Token = 0 I’ll Token = 56713727820156410577229101238628035242 take it! Token = 113427455640312821154458202477256070484 ©2012 DataStax 9 Friday, February 15, 13
  • 11. Row Key to Token Input Get @PatrickMcFadin MD5 276161727147663567581939045564154008842 Token = 0 I’ll Token = 56713727820156410577229101238628035242 take it! Token = 113427455640312821154458202477256070484 ©2012 DataStax 9 Friday, February 15, 13
  • 12. Cassandra 1.1 Node • Responsible for a single range of keys • Range determined by single token • One server = One token = One node ©2012 DataStax 10 Friday, February 15, 13
  • 13. Cassandra 1.1 Node • Responsible for a single range of keys • Range determined by single token • One server = One token = One node ©2012 DataStax 10 Friday, February 15, 13
  • 14. Cassandra 1.1 Node • Responsible for a single range of keys • Range determined by single token • One server = One token = One node Commodity node? ©2012 DataStax 10 Friday, February 15, 13
  • 15. Cassandra 1.1 Node • Responsible for a single range of keys • Range determined by single token • One server = One token = One node Commodity node? ©2012 DataStax 10 Friday, February 15, 13
  • 16. Cassandra 1.1 Node • Responsible for a single range of keys • Range determined by single token • One server = One token = One node Commodity node? What you really want. ©2012 DataStax 10 Friday, February 15, 13
  • 17. Cassandra 1.1 Node • Responsible for a single range of keys • Range determined by single token • One server = One token = One node Commodity node? What you really want. ©2012 DataStax 10 Friday, February 15, 13
  • 18. Time for a new plan • Hardware is only getting bigger • One node is responsible for more data • Token assignments are a pain ©2012 DataStax 11 Friday, February 15, 13
  • 19. Token assignment (sucks) • Tokens need to be evenly spread • Growing a ring... not good options • Shrinking a ring... not good options • Tokens have to be added to each server config ©2012 DataStax 12 Friday, February 15, 13
  • 20. Enter Virtual Nodes • One server should have many nodes • Each node should be small • Tokens should be automatic Version 1.1 Version 1.2 Server 1 Server 1 1 2 1-4 4 3 ©2012 DataStax 13 Friday, February 15, 13
  • 21. Virtual Node Features • Default 256 Nodes per server • Auto assign tokens • Faster rebuilds of servers • Faster server add to cluster • New partitioner (More later) ©2012 DataStax 14 Friday, February 15, 13
  • 22. Transitioning to vnodes Super easy! Find these lines in your cassandra.yaml file: #num_tokens: initial_token: <some big number> Change to: num_tokens: 256 initial_token: and restart. Repeat on all nodes in cluster ©2012 DataStax 15 Friday, February 15, 13
  • 23. Transitioning to vnodes After all Cassandra instances have been reset Initialize a shuffle operation [patrick@cassandra0 ~]$ cassandra-shuffle create Enable shuffling [patrick@cassandra0 ~]$ cassandra-shuffle enable List pending relocations* [patrick@cassandra0 ~]$ cassandra-shuffle ls Let’s walk through it... *This is a slow op. Be patient. ©2012 DataStax 16 Friday, February 15, 13
  • 24. Existing 1.1 cluster Server 1 Server 2 1-4 4-8 Server 4 Server 3 13-16 9-12 ©2012 DataStax Friday, February 15, 13
  • 25. Set num_tokens and restart Server 1 Server 2 1-4 1-4 4-8 4-8 1-4 1-4 4-8 4-8 Server 4 Server 3 13-16 13-16 9-12 9-12 13-16 13-16 9-12 9-12 ©2012 DataStax 18 Friday, February 15, 13
  • 26. Set num_tokens and restart Server 1 Server 2 1 2 5 6 3 4 7 8 Server 4 Server 3 13 14 9 10 15 16 11 12 ©2012 DataStax Initialize and Enable shuffling... 19 Friday, February 15, 13
  • 27. Shuffle enable Server 1 Server 2 1 5 2 6 13 9 14 10 Server 4 Server 3 3 7 4 8 16 12 15 11 ©2012 DataStax 20 Friday, February 15, 13
  • 28. Shuffle complete Server 1 Server 2 1 5 2 6 13 9 14 10 Server 4 Server 3 3 7 4 8 16 12 15 11 ©2012 DataStax 21 Friday, February 15, 13
  • 29. Ops life with vnodes • Add any number of nodes • No token assignments! • Bigger server? Larger num_tokens • Decommission any number of nodes • New nodetool command: status One more time now! ©2012 DataStax 22 Friday, February 15, 13
  • 30. Bonus new thing • New Partitioner: Murmur3Partitoner • Murmur3 replaces MD5 • Slightly faster than MD5 in certain cases • Go forward partitioner for NEW clusters • No need to convert More details here: https://issues.apache.org/jira/browse/CASSANDRA-3772 ©2012 DataStax 23 Friday, February 15, 13
  • 31. In conclusion... Go out and try some vnode love today! Download Cassandra 1.2 now http://www.datastax.com/download/community http://cassandra.apache.org/download/ ©2012 DataStax 24 Friday, February 15, 13
  • 32. Some handy references http://www.datastax.com/dev/blog/virtual-nodes-in-cassandra-1-2 http://www.datastax.com/dev/blog/upgrading-an-existing-cluster-to-vnodes Follow me on Twitter for more: @PatrickMcFadin ©2012 DataStax 25 Friday, February 15, 13
  • 33. We power the apps that transform business. ©2012 DataStax 26 Friday, February 15, 13