Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Bad Habits Die Hard
Staying on the Right Cassandra Path
1 Sliding back into a relational mindset
2 Benchmarking, how does this go again?
3 My client is slower than molasses in Ja...
Your
© 2015 DataStax, All Rights Reserved. 3
Background is Showing
© 2015 DataStax, All Rights Reserved. 4
© 2015 DataStax, All Rights Reserved. 5
Sliding back into
the relational
mindset
Sliding Back into the Relational Mindset
CQL is almost too reminiscent of SQL
© 2015 DataStax, All Rights Reserved. 6
I’m ...
© 2015 DataStax, All Rights Reserved. 7
Sliding Back into the Relational Mindset
CQL is almost too reminiscent of SQL
© 2015 DataStax, All Rights Reserved. 8
Quer...
Sliding Back into the Relational Mindset
Oh, wait, I forgot there’s no joins in Cassandra!
© 2015 DataStax, All Rights Res...
© 2015 DataStax, All Rights Reserved. 10
Sliding Back into the Relational Mindset
Oh, wait, I forgot there’s no joins in Cassandra!
© 2015 DataStax, All Rights Res...
Sliding Back into the Relational Mindset
© 2015 DataStax, All Rights Reserved. 12
I’ve played with C* and it has indexes
G...
© 2015 DataStax, All Rights Reserved. 13
Nope
Sliding Back into the Relational Mindset
© 2015 DataStax, All Rights Reserved. 14
Querying one partition is cheaper.
I’ve ...
Sweet! DataStax Enterprise has SparkSQL!
© 2015 DataStax, All Rights Reserved. 15
Great…we can use the ODBC driver just
li...
© 2015 DataStax, All Rights Reserved. 16
Sliding Back into the Relational Mindset
DataStax Enterprise has SparkSQL!
© 2015 DataStax, All Rights Reserved. 17
Spark ...
© 2015 DataStax, All Rights Reserved. 18
!=
Remember:
© 2015 DataStax, All Rights Reserved. 19
© 2015 DataStax, All Rights Reserved. 20
Or perhaps
a SAN?
Benchmarking, how does this go again?
Let us test
on a VM!
© 2015 DataStax, All Rights Reserved. 21
No Cigar
© 2015 DataStax, All Rights Reserved. 22
Benchmarking, how does this go again?
Why not select suitable hardware instead?
T...
© 2015 DataStax, All Rights Reserved. 23
Let’s try and break it with cassandra-stress!
With only one client running, the c...
© 2015 DataStax, All Rights Reserved. 24
© 2015 DataStax, All Rights Reserved. 25
Let’s try and break it with cassandra-stress!
Distributed Database = Distributed ...
© 2015 DataStax, All Rights Reserved. 26
How long should we run this for?
Benchmarking, how does this go again?
© 2015 DataStax, All Rights Reserved. 27
© 2015 DataStax, All Rights Reserved. 28
How long do we run this for?
Aim for days or weeks.
Benchmarking, how does this g...
© 2015 DataStax, All Rights Reserved. 29
Benchmarking, how does this go again?
© 2015 DataStax, All Rights Reserved. 30
NO
MAKE IT STOP
© 2015 DataStax, All Rights Reserved. 31
Use real data volumes, not pretend ones.
Benchmarking, how does this go again?
© 2015 DataStax, All Rights Reserved. 32
is slower than
Molasses in
January
© 2015 DataStax, All Rights Reserved. 33
Why is my Client slower than
molasses in January?
1. Download DataStax Driver
2. ...
© 2015 DataStax, All Rights Reserved. 34
© 2015 DataStax, All Rights Reserved. 35
1. Download DataStax Driver
2. Use Prepared Statements and
Async Requests
3. Use ...
© 2015 DataStax, All Rights Reserved. 36
OPERATIONS
© 2015 DataStax, All Rights Reserved. 37
Bad Operations Habits
1. Meh Backups
2. Meh Repairs
3. Meh Latency on 1% of our O...
© 2015 DataStax, All Rights Reserved. 38
© 2015 DataStax, All Rights Reserved. 39
Use OpsCenter
1. Backup service
2. Repair service
3. Capacity service
4. Proactiv...
© 2015 DataStax, All Rights Reserved. 40
Bad Operations Habits
1. Clock skew, you got it covered
on that one node right?
2...
© 2015 DataStax, All Rights Reserved. 41
NO
© 2015 DataStax, All Rights Reserved. 42
Good Operations Habits
1. Install & configure NTP on
every node
2. NetworkTopolog...
© 2015 DataStax, All Rights Reserved. 43
Yes
Feeling better?
• Free Online Training to Up Your Game
• www.academy.datastax.com
• More Advanced Courses as well as Beginner
• Introducti...
© 2015 DataStax, All Rights Reserved. 45
Questions?
Upcoming SlideShare
Loading in …5
×

Bad Habits Die Hard

663 views

Published on

.

Published in: Technology
  • Be the first to comment

Bad Habits Die Hard

  1. 1. Bad Habits Die Hard Staying on the Right Cassandra Path
  2. 2. 1 Sliding back into a relational mindset 2 Benchmarking, how does this go again? 3 My client is slower than molasses in January 4 Bad operations habits 5 Q & A © 2015 DataStax, All Rights Reserved. 2
  3. 3. Your © 2015 DataStax, All Rights Reserved. 3 Background is Showing
  4. 4. © 2015 DataStax, All Rights Reserved. 4
  5. 5. © 2015 DataStax, All Rights Reserved. 5 Sliding back into the relational mindset
  6. 6. Sliding Back into the Relational Mindset CQL is almost too reminiscent of SQL © 2015 DataStax, All Rights Reserved. 6 I’m lazy, let’s just copy the schema
  7. 7. © 2015 DataStax, All Rights Reserved. 7
  8. 8. Sliding Back into the Relational Mindset CQL is almost too reminiscent of SQL © 2015 DataStax, All Rights Reserved. 8 Query-Driven Methodology, say it with me
  9. 9. Sliding Back into the Relational Mindset Oh, wait, I forgot there’s no joins in Cassandra! © 2015 DataStax, All Rights Reserved. 9 That’s OK, we’ll just do those client side
  10. 10. © 2015 DataStax, All Rights Reserved. 10
  11. 11. Sliding Back into the Relational Mindset Oh, wait, I forgot there’s no joins in Cassandra! © 2015 DataStax, All Rights Reserved. 11 Remember, denormalization is cheaper than joins
  12. 12. Sliding Back into the Relational Mindset © 2015 DataStax, All Rights Reserved. 12 I’ve played with C* and it has indexes Great! We’ll use them then.
  13. 13. © 2015 DataStax, All Rights Reserved. 13 Nope
  14. 14. Sliding Back into the Relational Mindset © 2015 DataStax, All Rights Reserved. 14 Querying one partition is cheaper. I’ve played with C* and it has indexes
  15. 15. Sweet! DataStax Enterprise has SparkSQL! © 2015 DataStax, All Rights Reserved. 15 Great…we can use the ODBC driver just like an RDBMS! Sliding Back into the Relational Mindset
  16. 16. © 2015 DataStax, All Rights Reserved. 16
  17. 17. Sliding Back into the Relational Mindset DataStax Enterprise has SparkSQL! © 2015 DataStax, All Rights Reserved. 17 Spark is OLAP not OLTP
  18. 18. © 2015 DataStax, All Rights Reserved. 18 != Remember:
  19. 19. © 2015 DataStax, All Rights Reserved. 19
  20. 20. © 2015 DataStax, All Rights Reserved. 20 Or perhaps a SAN? Benchmarking, how does this go again? Let us test on a VM!
  21. 21. © 2015 DataStax, All Rights Reserved. 21 No Cigar
  22. 22. © 2015 DataStax, All Rights Reserved. 22 Benchmarking, how does this go again? Why not select suitable hardware instead? Test on 5 nodes with RF=3For search or analytics use more RAM (128GB+)
  23. 23. © 2015 DataStax, All Rights Reserved. 23 Let’s try and break it with cassandra-stress! With only one client running, the cluster won’t do more than 1,000 tps? What gives? Benchmarking, how does this go again?
  24. 24. © 2015 DataStax, All Rights Reserved. 24
  25. 25. © 2015 DataStax, All Rights Reserved. 25 Let’s try and break it with cassandra-stress! Distributed Database = Distributed Clients Benchmarking, how does this go again?
  26. 26. © 2015 DataStax, All Rights Reserved. 26 How long should we run this for? Benchmarking, how does this go again?
  27. 27. © 2015 DataStax, All Rights Reserved. 27
  28. 28. © 2015 DataStax, All Rights Reserved. 28 How long do we run this for? Aim for days or weeks. Benchmarking, how does this go again?
  29. 29. © 2015 DataStax, All Rights Reserved. 29 Benchmarking, how does this go again?
  30. 30. © 2015 DataStax, All Rights Reserved. 30 NO MAKE IT STOP
  31. 31. © 2015 DataStax, All Rights Reserved. 31 Use real data volumes, not pretend ones. Benchmarking, how does this go again?
  32. 32. © 2015 DataStax, All Rights Reserved. 32 is slower than Molasses in January
  33. 33. © 2015 DataStax, All Rights Reserved. 33 Why is my Client slower than molasses in January? 1. Download DataStax Driver 2. Used unlogged BATCH statements 3. Connected Client to Load Balancer
  34. 34. © 2015 DataStax, All Rights Reserved. 34
  35. 35. © 2015 DataStax, All Rights Reserved. 35 1. Download DataStax Driver 2. Use Prepared Statements and Async Requests 3. Use the DataStax Driver to Load Balance Why is my Client slower than molasses in January?
  36. 36. © 2015 DataStax, All Rights Reserved. 36 OPERATIONS
  37. 37. © 2015 DataStax, All Rights Reserved. 37 Bad Operations Habits 1. Meh Backups 2. Meh Repairs 3. Meh Latency on 1% of our Ops 4. Let’s add a couple nodes to scale
  38. 38. © 2015 DataStax, All Rights Reserved. 38
  39. 39. © 2015 DataStax, All Rights Reserved. 39 Use OpsCenter 1. Backup service 2. Repair service 3. Capacity service 4. Proactive Alerts, External Notifications and Best Practices
  40. 40. © 2015 DataStax, All Rights Reserved. 40 Bad Operations Habits 1. Clock skew, you got it covered on that one node right? 2. Configured your Topology Strategy? 3. Set the right snitch? 4. Did you just use C* as a queue? 5. Checked your versions are the same?
  41. 41. © 2015 DataStax, All Rights Reserved. 41 NO
  42. 42. © 2015 DataStax, All Rights Reserved. 42 Good Operations Habits 1. Install & configure NTP on every node 2. NetworkTopology Strategy 3. GossipingPropertyFileSnitch 4. Queue? Stop misusing Cassandra 5. Upgrade strategy: rolling upgrades, node by node
  43. 43. © 2015 DataStax, All Rights Reserved. 43 Yes Feeling better?
  44. 44. • Free Online Training to Up Your Game • www.academy.datastax.com • More Advanced Courses as well as Beginner • Introduction to Apache Cassandra • Cassandra Core Concepts • Operations and Performance Tuning • Data Modeling • DataStax Enterprise Search with Apache Solr • DataStax Enterprise Analytics with Apache Spark • Seek Advice • Talk to a friendly Solutions Engineer from DataStax © 2015 DataStax, All Rights Reserved. 44 Where to learn more:
  45. 45. © 2015 DataStax, All Rights Reserved. 45 Questions?

×