Austin cassandra meetup

1,688 views

Published on

Slides used for my presentation to the Austin Cassandra Meetup where I discuss how Cassandra fits in to Rackspace Cloud Monitoring.

Hint: It's just a small part.

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,688
On SlideShare
0
From Embeds
0
Number of Embeds
11
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Self serviceExtensive dashboard12 platformsDeep analysis
  • Secondary, nice to have, but not critical to monitoring.
  • Austin cassandra meetup

    1. 1. How we use CassandraGary Dusbabek@gdusbabek
    2. 2. We’re hiringhttp://jobs.rackspace.com/
    3. 3. http://www.flickr.com/photos/ollesvensson/4252196844/Goals CM Overview Control Cluster Data Cluster
    4. 4. CM OverviewThousands of serversPre-existing solutionsLessons learned from CloudkickInternal versus externalMillions of checks http://www.flickr.com/photos/jean_koulev/2697677595/
    5. 5. Cassandra is the leastinteresting part
    6. 6. TerminologyEntity Something with an IP address or host name
    7. 7. TerminologyCheck Tied to an Entity Is an action Produces metrics
    8. 8. Features Remote checksCollectors in 5 DCs Processing in 3 DCsAlerting Notifications
    9. 9. All REST all the time More Ops friendlyFeatures Metrics Agent https://github.com/racker/virgo
    10. 10. Future Automation Prediction Support hooksAgent expansion Correlation AggregationEntity Spanning
    11. 11. 1,000 Words
    12. 12. Control ClusterMetadataStateThree datacentersHigh RFWide rowsEasy dump & loadhttps://github.com/racker/cassandra-syncer
    13. 13. Data ModelRich but simpleObjects used together stored together Simple parent-child relationsOne row per customer (tenant)Composite column names
    14. 14. Data Model Good: Single Parent/Child Acyclic
    15. 15. Data Model Bad: Complex Cyclic
    16. 16. Data Model As Columns Easy slicing
    17. 17. Y U NO MySQL?
    18. 18. Control ClusterAPI server is Node.jsJavascript ORM library• Define object model in JS• Read/write entire objects• Never think about CQLnode-cassandra-clienthttps://github.com/racker/node-cassandra-client
    19. 19. Control Cluster
    20. 20. The fun starts Data here Cluster
    21. 21. Data ClusterGoal: Fast graphsTime series dataFewer data pointsOK to shave resolutionRecent data is most important
    22. 22. LocatorIdentifies a single metric check identifier + nameE.g. my:check:id:ttfb
    23. 23. GranularityFull, 5m, 20m, 60m, 240m, 1440m
    24. 24. Rollup ConceptsSlot (Range)• Pegged at 4032 slots• One slot is a range of seconds (varies with granularity)• metrics_locator CF• Key is granularity name + slot num• Columns index keys in rollup tables
    25. 25. Keyed by asciiBigint column names Blob column values JDBC Rollups
    26. 26. Full Resolution! Arrival• time, name, several metrics• metric = name, type, value• Compute locator and slot• Insert metrics col=timestamp, value=encoded metric• Single Cassandra APPLY BATCH;
    27. 27. Rollups• Two types – Rollup all metrics from timeX to timeY – Rollup a single metric from timeX to timeY – Times may span multiple slots (ranges)• Use rollups to produce rollups – E.g.: use 20m data points to create 60m point. – Store number of data points with rollup
    28. 28. Rollups• Gotchas! – Do not want to rollup a coarse range when finer range that feeds data to it is scheduled for rollup shortly 60m | | | … 20m | | | | | | | |… . 5m |||||||||||||||||||||||||||||… – Mind the “tail” during datapoint queries (calculate rollups on the fly)
    29. 29. It ScalesRollup operations are idempotent* Simplifies availabilityRollups are easily parallelized Hash partition the locator space
    30. 30. But…What if data arrives after rollup is performed?More than 24hrs late: don’t care, forget itElse treat normally: slots are scheduled for rollups as they age
    31. 31. http://www.flickr.com/photos/nateone/3768979925 / HBase@gdusbabek
    32. 32. Image Creditssoccer http://www.flickr.com/photos/ollesvensson/4252196844/apples http://www.flickr.com/photos/jean_koulev/2697677595/ bored http://www.flickr.com/photos/aidanmorgan/3709199304/ clock http://www.flickr.com/photos/szift/3196084839/hallway http://www.flickr.com/photos/orinrobertjohn/4354716077/ car http://www.flickr.com/photos/ellenm1/3541270451control http://www.flickr.com/photos/germanium/117612088/model http://www.flickr.com/photos/mikeschinkel/2703438152/ robot http://www.flickr.com/photos/kb35/430976324/swings http://www.flickr.com/photos/pierrebedat/1095337445/cluster http://www.flickr.com/photos/inl/5097547405/ dish http://www.flickr.com/photos/mrpbps/2862208028/ sand http://www.flickr.com/photos/backkratze/3480338854/ slots http://www.flickr.com/photos/andresrueda/2925383781 sushi http://www.flickr.com/photos/basykes/4348613931/ airplane http://www.flickr.com/photos/fhashemi/72489620/ scale http://www.flickr.com/photos/puuikibeach/4765115333 hourglass http://www.flickr.com/photos/aidanmorgan/2331754875/ street http://www.flickr.com/photos/nateone/3768979925/

    ×