SlideShare a Scribd company logo
1 Atigeo Confidential
Cassandra in xPatterns
Cassandra Day Seattle
July 2014
2 Atigeo Confidential
• xPatterns Architecture
• xPatterns dashboard application (Demo)
• Export to NoSql API & GUI (Demo)
• Data model optimization
• Publishing from HDFS/Hive/Shark to Cassandra
• Generated REST API’s
 Instrumentation
 Throttling & auto-retries
• Geo-Replication
 Cross-data-center replication, encryption & failover
• Lessons Learned since 0.6 till 2.0.6
Agenda
3 Atigeo Confidential
4 Atigeo Confidential
5 Atigeo Confidential
Export to NoSql API
• Datasets in the warehouse need to be exposed to high-throughput low-latency real-time
APIs. Each application requires extra processing performed on top of the core datasets,
hence additional transformations are executed for building data marts inside the
warehouse
• Exporter tool builds the efficient data model and runs an export of data from a Shark/Hive
table to a Cassandra Column Family, through a custom Spark job with configurable
throughput (configurable Spark processors against a Cassandra ring) (instrumentation
dashboard embedded, logs, progress and instrumentation events pushed though SSE)
• Data Modeling is driven by the read access patterns provided by an application engineer
building dashboards and visualizations: lookup key, columns (record fields to read), paging,
sorting, filtering
• The end result of a job run is a REST API endpoint (instrumented, monitored, resilient, geo-
replicated) that uses the underlying generated Cassandra data model and fuels the data in
the dashboards
• Configuration API provided for creating export jobs and executing them (ad-hoc or
scheduled).
6 Atigeo Confidential
7 Atigeo Confidential
Mesos/Spark cluster
8 Atigeo Confidential
Cassandra multi DC ring – write latency
9 Atigeo Confidential
Nagios monitoring
10 Atigeo Confidential
11 Atigeo Confidential
Referral Provider Network
• One of the many applications that we built for our largest healthcare customers using
the xPatterns APIs and tools on the new upgraded infrastructure: ELT Pipeline, Jaws,
Export to NoSql API. The dashboard for the RPN application was built using D3.js and
angular against the generic api published by the export tool.
• The application allows for building a graph of downstream and upstream referred and
referring providers, grouped by specialty, with computed aggregates like patient counts,
claim counts and total charged amounts. RPN is used for both fraud detection and for
aiding a clinic buying decision, by following the busiest graph paths.
• The dataset behind the app consists of 8 billion medical records, from which we
extracted 1.7 million providers (Shark warehouse) and built 53 million relationships in
the graph (persisted in Cassandra)
• While we demo the graph building we will also look at the Graphite instrumentation
dashboard for analyzing the runtime performance of the geo-replicated Cassandra read
operations (latency in the 20-50ms range)
12 Atigeo Confidential
13 Atigeo Confidential
Graphite – Cassandra multi DC ring
14 Atigeo Confidential
VPC-to-VPC IPSEC Tunnel
15 Atigeo Confidential
• NTP: synchronize ALL clocks (servers and clients)
• Reduce the number of CFs (avoid OOM … memtable_total_space_in_mb)
• Rows not too skinny and not too wide (avoid OOM)
o Less memory pressure during high-throughput writes
o Reduced network I/O, less rows, more column slices
o Key cache & bloom filter index size affects perf
o Efficient compaction, avoid hot spots
• Custom serialization and dynamic columns for maximum perf gain (40%)
• Do not drop CFs before emptying them (truncate/compact first)
• Monitoring, instrumentation, automatic restarts
• ConsistencyLevel: ONE is best … for our use cases
• Key cache, Snappy (LZ4) compression, vnodes
Lessons learned 0.6 - 2.0.6
16 Atigeo Confidential
Q & A
© 2013 Atigeo, LLC. All rights reserved. Atigeo and the xPatterns logo are trademarks of Atigeo. The information herein is for informational purposes only and represents the current view of Atigeo as of the date of this
presentation. Because Atigeo must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Atigeo, and Atigeo cannot guarantee the accuracy of any information provided
after the date of this presentation. ATIGEO MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

More Related Content

PPTX
Lessons learned from embedding Cassandra in xPatterns
PPTX
xPatterns - Spark Summit 2014
PDF
How Sensor Data Can Help Manufacturers Gain Insight to Reduce Waste, Energy C...
PDF
DataStax: The Whys of NoSQL
PDF
DataStax: Steps to successfully implementing NoSQL in the enterprise
PDF
#GeodeSummit - Wall St. Derivative Risk Solutions Using Geode
PDF
the tooling of a modern and agile oracle dba
PPTX
Kurt Schneider [Discover Financial] | How Discover Modernizes Observability w...
Lessons learned from embedding Cassandra in xPatterns
xPatterns - Spark Summit 2014
How Sensor Data Can Help Manufacturers Gain Insight to Reduce Waste, Energy C...
DataStax: The Whys of NoSQL
DataStax: Steps to successfully implementing NoSQL in the enterprise
#GeodeSummit - Wall St. Derivative Risk Solutions Using Geode
the tooling of a modern and agile oracle dba
Kurt Schneider [Discover Financial] | How Discover Modernizes Observability w...

What's hot (20)

PDF
Machine Learning Deep Dive
PPTX
Lego-like building blocks of Storm and Spark Streaming Pipelines
PDF
DataStax: Making a Difference with Smart Analytics
PDF
Architecture at Scale
PDF
Logging, Metrics, and APM: The Operations Trifecta
PPTX
Engineers guide to data analysis
PDF
Architecture Best Practices to Master + Pitfalls to Avoid
PDF
Using Azure Databricks, Structured Streaming, and Deep Learning Pipelines to ...
PDF
L’approche Big Data en finance de marché 1/2
PPTX
Scylla Summit 2018: Grab and Scylla: Driving Southeast Asia Forward
PPTX
Accumulo Summit 2014: Accumulo with Distributed SQL queries
PDF
Apache Flink Adoption at Shopify
PPTX
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Why is my Hadoop cluster s...
PDF
How KeyBank Used Elastic to Build an Enterprise Monitoring Solution
PDF
InfluxDB and Grafana: An Introduction to Time-Based Data Storage and Visualiz...
PPTX
Building an intelligent big data application in 30 minutes
PDF
From Batch to Streaming ET(L) with Apache Apex
PDF
Logging, Metrics, and APM: The Operations Trifecta (P)
PDF
How to teach your data scientist to leverage an analytics cluster with Presto...
PDF
Nine Publishing: Building a modern infrastructure with the Elastic Stack
Machine Learning Deep Dive
Lego-like building blocks of Storm and Spark Streaming Pipelines
DataStax: Making a Difference with Smart Analytics
Architecture at Scale
Logging, Metrics, and APM: The Operations Trifecta
Engineers guide to data analysis
Architecture Best Practices to Master + Pitfalls to Avoid
Using Azure Databricks, Structured Streaming, and Deep Learning Pipelines to ...
L’approche Big Data en finance de marché 1/2
Scylla Summit 2018: Grab and Scylla: Driving Southeast Asia Forward
Accumulo Summit 2014: Accumulo with Distributed SQL queries
Apache Flink Adoption at Shopify
Big Data Day LA 2016/ Hadoop/ Spark/ Kafka track - Why is my Hadoop cluster s...
How KeyBank Used Elastic to Build an Enterprise Monitoring Solution
InfluxDB and Grafana: An Introduction to Time-Based Data Storage and Visualiz...
Building an intelligent big data application in 30 minutes
From Batch to Streaming ET(L) with Apache Apex
Logging, Metrics, and APM: The Operations Trifecta (P)
How to teach your data scientist to leverage an analytics cluster with Presto...
Nine Publishing: Building a modern infrastructure with the Elastic Stack
Ad

Similar to Cassandra in xPatterns (20)

PPTX
xPatterns on Spark, Shark, Mesos, Tachyon
PDF
Architecting Data Lakes on AWS
PDF
Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...
PDF
Cloud arch patterns
PDF
Scalarium and CouchDB
PPTX
xPatterns ... beyond Hadoop (Spark, Shark, Mesos, Tachyon)
PDF
Five Years of EC2 Distilled
PPTX
Сloud Webinar #1 “Architecture of Highly Loaded Geo-Distributed Applications”
PDF
Data Warehousing Infrastructure on Cloud
PPTX
C* Summit 2013: Cassandra at eBay Scale by Feng Qu and Anurag Jambhekar
PDF
Netflix oss season 2 episode 1 - meetup Lightning talks
PPT
Life After Sharding: Monitoring and Management of a Complex Data Cloud
PDF
MinIO January 2020 Briefing
PDF
Nuxeo platform in 15mn
PPTX
Make your data fly - Building data platform in AWS
PDF
Netflix Open Source Meetup Season 4 Episode 2
PPTX
How to get Real-Time Value from your IoT Data - Datastax
PDF
EVCache: Lowering Costs for a Low Latency Cache with RocksDB
PDF
20141021 AWS Cloud Taekwon - Big Data on AWS
PDF
Nuxeo in 2011: A year in review and a preview of what's next!
xPatterns on Spark, Shark, Mesos, Tachyon
Architecting Data Lakes on AWS
Designing Resilient Application Platforms with Apache Cassandra - Hayato Shim...
Cloud arch patterns
Scalarium and CouchDB
xPatterns ... beyond Hadoop (Spark, Shark, Mesos, Tachyon)
Five Years of EC2 Distilled
Сloud Webinar #1 “Architecture of Highly Loaded Geo-Distributed Applications”
Data Warehousing Infrastructure on Cloud
C* Summit 2013: Cassandra at eBay Scale by Feng Qu and Anurag Jambhekar
Netflix oss season 2 episode 1 - meetup Lightning talks
Life After Sharding: Monitoring and Management of a Complex Data Cloud
MinIO January 2020 Briefing
Nuxeo platform in 15mn
Make your data fly - Building data platform in AWS
Netflix Open Source Meetup Season 4 Episode 2
How to get Real-Time Value from your IoT Data - Datastax
EVCache: Lowering Costs for a Low Latency Cache with RocksDB
20141021 AWS Cloud Taekwon - Big Data on AWS
Nuxeo in 2011: A year in review and a preview of what's next!
Ad

More from DataStax Academy (20)

PDF
Forrester CXNYC 2017 - Delivering great real-time cx is a true craft
PPTX
Introduction to DataStax Enterprise Graph Database
PPTX
Introduction to DataStax Enterprise Advanced Replication with Apache Cassandra
PPTX
Cassandra on Docker @ Walmart Labs
PDF
Cassandra 3.0 Data Modeling
PPTX
Cassandra Adoption on Cisco UCS & Open stack
PDF
Data Modeling for Apache Cassandra
PDF
Coursera Cassandra Driver
PDF
Production Ready Cassandra
PDF
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
PPTX
Cassandra @ Sony: The good, the bad, and the ugly part 1
PPTX
Cassandra @ Sony: The good, the bad, and the ugly part 2
PDF
Standing Up Your First Cluster
PDF
Real Time Analytics with Dse
PDF
Introduction to Data Modeling with Apache Cassandra
PDF
Cassandra Core Concepts
PPTX
Enabling Search in your Cassandra Application with DataStax Enterprise
PPTX
Bad Habits Die Hard
PDF
Advanced Data Modeling with Apache Cassandra
PDF
Advanced Cassandra
Forrester CXNYC 2017 - Delivering great real-time cx is a true craft
Introduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Advanced Replication with Apache Cassandra
Cassandra on Docker @ Walmart Labs
Cassandra 3.0 Data Modeling
Cassandra Adoption on Cisco UCS & Open stack
Data Modeling for Apache Cassandra
Coursera Cassandra Driver
Production Ready Cassandra
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Sony: The good, the bad, and the ugly part 1
Cassandra @ Sony: The good, the bad, and the ugly part 2
Standing Up Your First Cluster
Real Time Analytics with Dse
Introduction to Data Modeling with Apache Cassandra
Cassandra Core Concepts
Enabling Search in your Cassandra Application with DataStax Enterprise
Bad Habits Die Hard
Advanced Data Modeling with Apache Cassandra
Advanced Cassandra

Cassandra in xPatterns

  • 1. 1 Atigeo Confidential Cassandra in xPatterns Cassandra Day Seattle July 2014
  • 2. 2 Atigeo Confidential • xPatterns Architecture • xPatterns dashboard application (Demo) • Export to NoSql API & GUI (Demo) • Data model optimization • Publishing from HDFS/Hive/Shark to Cassandra • Generated REST API’s  Instrumentation  Throttling & auto-retries • Geo-Replication  Cross-data-center replication, encryption & failover • Lessons Learned since 0.6 till 2.0.6 Agenda
  • 5. 5 Atigeo Confidential Export to NoSql API • Datasets in the warehouse need to be exposed to high-throughput low-latency real-time APIs. Each application requires extra processing performed on top of the core datasets, hence additional transformations are executed for building data marts inside the warehouse • Exporter tool builds the efficient data model and runs an export of data from a Shark/Hive table to a Cassandra Column Family, through a custom Spark job with configurable throughput (configurable Spark processors against a Cassandra ring) (instrumentation dashboard embedded, logs, progress and instrumentation events pushed though SSE) • Data Modeling is driven by the read access patterns provided by an application engineer building dashboards and visualizations: lookup key, columns (record fields to read), paging, sorting, filtering • The end result of a job run is a REST API endpoint (instrumented, monitored, resilient, geo- replicated) that uses the underlying generated Cassandra data model and fuels the data in the dashboards • Configuration API provided for creating export jobs and executing them (ad-hoc or scheduled).
  • 8. 8 Atigeo Confidential Cassandra multi DC ring – write latency
  • 11. 11 Atigeo Confidential Referral Provider Network • One of the many applications that we built for our largest healthcare customers using the xPatterns APIs and tools on the new upgraded infrastructure: ELT Pipeline, Jaws, Export to NoSql API. The dashboard for the RPN application was built using D3.js and angular against the generic api published by the export tool. • The application allows for building a graph of downstream and upstream referred and referring providers, grouped by specialty, with computed aggregates like patient counts, claim counts and total charged amounts. RPN is used for both fraud detection and for aiding a clinic buying decision, by following the busiest graph paths. • The dataset behind the app consists of 8 billion medical records, from which we extracted 1.7 million providers (Shark warehouse) and built 53 million relationships in the graph (persisted in Cassandra) • While we demo the graph building we will also look at the Graphite instrumentation dashboard for analyzing the runtime performance of the geo-replicated Cassandra read operations (latency in the 20-50ms range)
  • 13. 13 Atigeo Confidential Graphite – Cassandra multi DC ring
  • 15. 15 Atigeo Confidential • NTP: synchronize ALL clocks (servers and clients) • Reduce the number of CFs (avoid OOM … memtable_total_space_in_mb) • Rows not too skinny and not too wide (avoid OOM) o Less memory pressure during high-throughput writes o Reduced network I/O, less rows, more column slices o Key cache & bloom filter index size affects perf o Efficient compaction, avoid hot spots • Custom serialization and dynamic columns for maximum perf gain (40%) • Do not drop CFs before emptying them (truncate/compact first) • Monitoring, instrumentation, automatic restarts • ConsistencyLevel: ONE is best … for our use cases • Key cache, Snappy (LZ4) compression, vnodes Lessons learned 0.6 - 2.0.6
  • 17. © 2013 Atigeo, LLC. All rights reserved. Atigeo and the xPatterns logo are trademarks of Atigeo. The information herein is for informational purposes only and represents the current view of Atigeo as of the date of this presentation. Because Atigeo must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Atigeo, and Atigeo cannot guarantee the accuracy of any information provided after the date of this presentation. ATIGEO MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

Editor's Notes

  • #4: the logical architecture diagram with the 3 logical layers of xPatterns: Infrastructure, Analytics and Visualization and the roles: ELT Engineer, Data Scientist, Application Engineer. xPatterns is a big data analytics platform as a service that enables a rapid development of enterprise-grade analytical applications. It provides tools, api sets and a management console for building an ELT pipeline with data monitoring and quality gates, a data warehouse for ad-hoc and scheduled querying, analysis, model building and experimentation, tools for exporting data to NoSql and solrCloud cluster for real-time access through low-latency/high-throughput apis as well as dashboard and visualization api/tools leveraging the available data and models. In this presentation we will showcase one of the analytical applications build on top of xPatterns for our largest customer for that runs xPatterns in production on top a data warehouse consisting of several hundreds TB of medical, pharmacy and lab data records consisting of tens of billions of records. We will showcase the xPatterns components in the form of APIs and tools employed throughout the entire lifecycle of this application.”
  • #5: The physical architecture diagram for our largest customer deployment, demonstrating the enterprise-grade attributes of the platform: scalability, high availability, performance, resilience, manageability while providing means for geo-failover (warehouse), geo-replication (real-time DB), data and system monitoring, instrumentation, backup & restore. Cassandra rings are DC-replicated across EC2 east and west coast regions, data between geo-replicas synchronized in real time through an ipsec tunnel (VPC-to-VPC). Geo-replicated apis behind an AWS Route 53 DNS service (latency based resource records sets) and ELBs ensures users requests are served from the closest geographical location. Failure to an entire region (happened to us during a big conference!) does not affect our availability and SLAs. User facing dashboards are served from Cassandra (real-time store), with data being exported from a data warehouse (Shark/Hive) build on top a Mesos-managed Spark/Hadoop cluster. Export jobs are instrumented and provide a throttling mechanism to control throughput. Export jobs run on the east-coast only, data is synchronized in real time with the west coast ring. Generated apis are automatically instrumented (Graphite) and monitored (Nagios).
  • #6: Datasets in the warehouse need to be exposed to high-throughput low-latency real-time APIs. Each application requires extra processing performed on top of the core datasets, hence additional transformations are executed for building data marts inside the warehouse Pre-optimization Shark/Hive queries required for building an efficient data model for Cassandra persistence: minimal number of column families, wide rows (50-100 MB compressed). Resulting data model is efficient for both read (dashboard/API) and write (export/updates) requests Exporter tool builds the efficient data model and runs an export of data from a Shark/Hive table to a Cassandra Column Family, through a custom Spark job with configurable throughput (configurable Spark processors against a Cassandra ring) Data Modeling is driven by the read access patterns: lookup key, columns (record fields to read), paging, sorting, filtering. The data access patterns is used for automatically publishing a REST api that uses the underlying generated Cassandra data model and it fuels the data in the dashboards Execution logs behind workflows, progress report and instrumentation events for the dashboard are pushed to the browser through SSE (Zookeeper watchers used for synchronization)
  • #7: Datasets in the warehouse need to be exposed to high-throughput low-latency real-time APIs. Each application requires extra processing performed on top of the core datasets, hence additional transformations are executed for building data marts inside the warehouse Pre-optimization Shark/Hive queries required for building an efficient data model for Cassandra persistence: minimal number of column families, wide rows (50-100 MB compressed). Resulting data model is efficient for both read (dashboard/API) and write (export/updates) requests Exporter tool builds the efficient data model and runs an export of data from a Shark/Hive table to a Cassandra Column Family, through a custom Spark job with configurable throughput (configurable Spark processors against a Cassandra ring) Data Modeling is driven by the read access patterns: lookup key, columns (record fields to read), paging, sorting, filtering. The data access patterns is used for automatically publishing a REST api that uses the underlying generated Cassandra data model and it fuels the data in the dashboards Execution logs behind workflows, progress report and instrumentation events for the dashboard are pushed to the browser through SSE (Zookeeper watchers used for synchronization)
  • #8: Mesos/Spark context (CoarseGrainedMode) with a fixed 120 cores spread out across 4 nodes for the export job
  • #9: Instrumentation dashboard showcasing the write latency measured during the export to noSql job (7ms max). Writes are performed against the east-coast DC … they are propagated to the west coast, however the JMX metric exposed (Write.Latency.OneMinuteRate) does not reflect it … need to build a new dashboard with different metrics!
  • #10: Nagios monitoring for the geo-replicated, instrumented generated apis. The APIs (readers) and the Spark executors (writers) have a retry mechanism (AOP aspects) that implement throttling when Cassandra is under siege …
  • #11: Ganglia monitoring Dashboard
  • #12: Referral Provider Network: one of the 6 applications that we built for our healthcare customer using the xPatterns APIs and tools on the new beyond Hadoop infrastructure: ELT Pipeline, Export to NoSQL API. The dashboard for the RPN application was built using D3.js and angular against the generic api published by the export tool. The application allows for building a graph of downstream and upstream referred and referring providers, grouped by specialty and with computed aggregates like patient counts, claim counts and total charged amounts. RPN is used for both fraud detection and for aiding a clinic buying decision, by following the busiest graph paths. The dataset behind the app consists of 8 billion medical records, from which we extracted 1.7 million providers (Shark warehouse) and built 53 million relationships in the graph (persisted in Cassandra) While we demo the graph building we will also look at the Graphite instrumentation dashboard for analyzing the runtime performance of the geo-replicated Cassandra read operations during the demo  
  • #13: Referral Provider Network: one of the 6 applications that we built for our healthcare customer using the xPatterns APIs and tools on the new beyond Hadoop infrastructure: ELT Pipeline, Export to NoSQL API. The dashboard for the RPN application was built using D3.js and angular against the generic api published by the export tool. The application allows for building a graph of downstream and upstream referred and referring providers, grouped by specialty and with computed aggregates like patient counts, claim counts and total charged amounts. RPN is used for both fraud detection and for aiding a clinic buying decision, by following the busiest graph paths. The dataset behind the app consists of 8 billion medical records, from which we extracted 1.7 million providers (Shark warehouse) and built 53 million relationships in the graph (persisted in Cassandra) While we demo the graph building we will also look at the Graphite instrumentation dashboard for analyzing the runtime performance of the geo-replicated Cassandra read operations during the demo  
  • #14: Instrumentation dashboard showcasing the read latency measured during peak (40ms average, 60peak)
  • #15: Security Architecture for the VPC-to-VPC hosting the DC-replicated rings. Openswan used on the VPN Instances in the public subnets for the ipsec tunnel encryption http://aws.amazon.com/articles/5472675506466066
  • #16: Lessons learned over the past 3 years with operating Cassandra rings at scale. Custom serialization of objects instead of individually serializing column names/column values for object field names/field values, yields the most performance gains! Describe each tip in detail …