SlideShare ist ein Scribd-Unternehmen logo
1 von 26
High Throughput
Analytics with
Cassandra & Azure
Charles Lamanna
Principal Dev Lead
@clamanna
MetricsHub
keep cloud services up and running for the lowest possible cost
Live Status
Cost Awareness
Alerts and Notifications
Actions and Scaling
$
2000+ customers in 6 months
0
500
1000
1500
2000
2500
10/18/2012 12/7/2012 1/26/2013 3/17/2013 5/6/2013 6/25/2013
storing data
200M data points per hour
80,000 data points per second (peak)
Planning for huge data ingestion rates
Requires high scale, real-time data
1,000 data points per minute per VM
12 data points per endpoint per minute
Aggregate, analyze and take actions based on this data stream
(in near real-time)
Must be cheap, scalable and reliable
Scales fluidly
Grows horizontally – double the nodes, double capacity
Add / remove capacity / nodes with no downtime
Highly available
No single point of failure
Replication factor (i.e. hot copies) is just a config switch
… and by the way
Little-to-no operations cost
New nodes take minutes to setup
Nodes just keep running for months on end
“Aggregate on write” – no jobs required!
Distributed counters make it easy to do aggregates on write
…and a nice kicker: has *great* perf / COGS in Azure
architecture
68 virtual machines (PAAS and IAAS)
Table Storage
Jobs Worker Role
(24 instances)
SQL Database
Portal Web Role
(3 instances)
Cassandra VM Cluster
(32 XL instances)
Web API Web Role
(8 instances)
End User Web
Browsers
Monitored Customer Resources
(e.g. websites; SQL databases)
Monitored Virtual Machines
Endpoints Replicated data
in multiple
datacenters
Clients
PaaS
IaaS
Services
Avoiding state
• Application logic / code all
lives on stateless machines
• Keeps it simple: decreases
human operations cost
• Use Azure PAAS offerings
(Web and Worker roles)
Table Storage
Jobs Worker Role
(24 instances)
SQL
Database
Blob storage
Portal Web Role
(3 instances)
Cassandra VM Cluster
(32 XL instances)
Web API Web Role
(8 instances)
Endpoints Replicated data
in multiple
datacenters
PaaS
Azure Cloud Services (PAAS)
• Scale horizontally (grew from 1
to 30+ instances)
• Managed by the platform
(patched; coordinated
recycling; failover; etc.)
• 1 click deployment from Visual
Studio (with automatic load
balancer swaps)
Table Storage
Jobs Worker Role
(24 instances)
SQL
Database
Blob storage
Web API Web Role
(8 instances)
Endpoints Replicated data
in multiple
datacenters
Maintains all state for
metrics / time series data
32 XL Linux Virtual
Machines
Portal Web Role
(3 instances)
Cassandra VM Cluster
(32 XL instances)
Cassandra Cluster
IaaS
32 nodes, 8 “pods” of 4 nodes
Exposed via a single
endpoint
Exposed via a single
endpoint
Exposing the pods
• Each pod of 4 nodes
has a single load
balanced endpoint
• Clients (on our stateless
roles) treats the
endpoints as a pool
• Blacklists and skips an
endpoint if it starts
producing a lot of errors
Where does the data go?
• Data files are on 16 mounted network
backed disks (*not* ephemeral disks)
• Data disks are geo-replicated (3 copies
local; 1 remote) for “free” DR
• Azure data disks offer great
throughput (VMs end up CPU bound)
Our Column Families (CQL 3)
CREATE TABLE oneminute (
rk text,
ck text,
cnt counter,
sum counter,
PRIMARY KEY (rk, ck)
);
Updating values…
Realtime “average” values at any granularity, for any time window
update
oneminute/tenminute/oneday
set
sum = sum + {sample_value},
cnt = cnt + 1
where
rk = '{customer+metric}' and
ck = '{tags_and_timestamp}'
Reading values…
*ONE* round trip to fetch a metric over time (e.g. CPU over past week)
select * from oneminute
where
rk = ‘{customer_name}' and
ck < '{metric_path_start}' and
ck >= '{metric_path_end}‘
order by ck desc;
Some hard lessons…
• Static private IPs are a must; otherwise, reboots / outages can
confuse the cluster when nodes come back up
• Monitor performance carefully; once you tip over, it is hard to
rebalance the cluster and add new nodes
• Fit the cluster to the platform: in Azure, match the Upgrade
Domains / Fault Domains to preserve uptime during service
maintenance / hardware failure
Single node tests..
• 4 disks, RAID 0, no read cache
Workload
(%write)
Ops / sec Latency
median
Latency
95th
Latency
99th
%100 20018 1.5 3.7 7.9
%75 8361 85.9 376.6 584.8
%25 5412 459.9 759.1 940.1
• 4 disks, RAID 0, read cache
Workload
(%write)
Ops / sec Latency
median
Latency
95th
Latency
99th
%100 19208 1.5 3.8 7.9
18543 1.5 3.6 7.9
18563 1.4 3.6 8.2
%75 7112 195.9 595.8 1099.6
7581 168.9 589.5 985.2
5149 256.5 774.0 1402.9
%25 15358 23.0 110.2 309.1
3742 279.2 563.0 789.7
15376 22.1 98.8 293.3
0
1000
2000
3000
4000
5000
6000
7000
jbod RAID0
JBOD vs RAID 0 for read-
heavy workload
Workload
(%write)
Ops / sec Latency
Median
Latency
95th
Latency
99th
%100 13638 1.9 4.9 24.0
%75 3239 11.2 687.0 1099.3
%25 1825 243.6 687.0 808.7
Multi-node load tests..
• 4 Nodes; RF = 3 (Quorom)
• 8 Disks, RAID 0
Charles Lamanna
Charles.Lamanna@Microsoft.com
@clamanna

Weitere ähnliche Inhalte

Was ist angesagt?

ETL With Cassandra Streaming Bulk Loading
ETL With Cassandra Streaming Bulk LoadingETL With Cassandra Streaming Bulk Loading
ETL With Cassandra Streaming Bulk Loading
alex_araujo
 
From Postgres to Cassandra (Rimas Silkaitis, Heroku) | C* Summit 2016
From Postgres to Cassandra (Rimas Silkaitis, Heroku) | C* Summit 2016From Postgres to Cassandra (Rimas Silkaitis, Heroku) | C* Summit 2016
From Postgres to Cassandra (Rimas Silkaitis, Heroku) | C* Summit 2016
DataStax
 
What We Learned About Cassandra While Building go90 (Christopher Webster & Th...
What We Learned About Cassandra While Building go90 (Christopher Webster & Th...What We Learned About Cassandra While Building go90 (Christopher Webster & Th...
What We Learned About Cassandra While Building go90 (Christopher Webster & Th...
DataStax
 
Cassandra on Mesos Across Multiple Datacenters at Uber (Abhishek Verma) | C* ...
Cassandra on Mesos Across Multiple Datacenters at Uber (Abhishek Verma) | C* ...Cassandra on Mesos Across Multiple Datacenters at Uber (Abhishek Verma) | C* ...
Cassandra on Mesos Across Multiple Datacenters at Uber (Abhishek Verma) | C* ...
DataStax
 

Was ist angesagt? (20)

Monitoring Cassandra at Scale (Jason Cacciatore, Netflix) | C* Summit 2016
Monitoring Cassandra at Scale (Jason Cacciatore, Netflix) | C* Summit 2016Monitoring Cassandra at Scale (Jason Cacciatore, Netflix) | C* Summit 2016
Monitoring Cassandra at Scale (Jason Cacciatore, Netflix) | C* Summit 2016
 
ETL With Cassandra Streaming Bulk Loading
ETL With Cassandra Streaming Bulk LoadingETL With Cassandra Streaming Bulk Loading
ETL With Cassandra Streaming Bulk Loading
 
Seastar / ScyllaDB, or how we implemented a 10-times faster Cassandra
Seastar / ScyllaDB,  or how we implemented a 10-times faster CassandraSeastar / ScyllaDB,  or how we implemented a 10-times faster Cassandra
Seastar / ScyllaDB, or how we implemented a 10-times faster Cassandra
 
Python and cassandra
Python and cassandraPython and cassandra
Python and cassandra
 
Seastar @ SF/BA C++UG
Seastar @ SF/BA C++UGSeastar @ SF/BA C++UG
Seastar @ SF/BA C++UG
 
Cassandra Summit 2014: Reading Cassandra SSTables Directly for Offline Data A...
Cassandra Summit 2014: Reading Cassandra SSTables Directly for Offline Data A...Cassandra Summit 2014: Reading Cassandra SSTables Directly for Offline Data A...
Cassandra Summit 2014: Reading Cassandra SSTables Directly for Offline Data A...
 
From Postgres to Cassandra (Rimas Silkaitis, Heroku) | C* Summit 2016
From Postgres to Cassandra (Rimas Silkaitis, Heroku) | C* Summit 2016From Postgres to Cassandra (Rimas Silkaitis, Heroku) | C* Summit 2016
From Postgres to Cassandra (Rimas Silkaitis, Heroku) | C* Summit 2016
 
Instaclustr Webinar 50,000 Transactions Per Second with Apache Spark on Apach...
Instaclustr Webinar 50,000 Transactions Per Second with Apache Spark on Apach...Instaclustr Webinar 50,000 Transactions Per Second with Apache Spark on Apach...
Instaclustr Webinar 50,000 Transactions Per Second with Apache Spark on Apach...
 
ScyllaDB: NoSQL at Ludicrous Speed
ScyllaDB: NoSQL at Ludicrous SpeedScyllaDB: NoSQL at Ludicrous Speed
ScyllaDB: NoSQL at Ludicrous Speed
 
C* for Deep Learning (Andrew Jefferson, Tracktable) | Cassandra Summit 2016
C* for Deep Learning (Andrew Jefferson, Tracktable) | Cassandra Summit 2016C* for Deep Learning (Andrew Jefferson, Tracktable) | Cassandra Summit 2016
C* for Deep Learning (Andrew Jefferson, Tracktable) | Cassandra Summit 2016
 
Cassandra Community Webinar | Become a Super Modeler
Cassandra Community Webinar | Become a Super ModelerCassandra Community Webinar | Become a Super Modeler
Cassandra Community Webinar | Become a Super Modeler
 
Cassandra 3.0 Awesomeness
Cassandra 3.0 AwesomenessCassandra 3.0 Awesomeness
Cassandra 3.0 Awesomeness
 
Cassandra 2.0 better, faster, stronger
Cassandra 2.0   better, faster, strongerCassandra 2.0   better, faster, stronger
Cassandra 2.0 better, faster, stronger
 
Optimizing Your Cluster with Coordinator Nodes (Eric Lubow, SimpleReach) | Ca...
Optimizing Your Cluster with Coordinator Nodes (Eric Lubow, SimpleReach) | Ca...Optimizing Your Cluster with Coordinator Nodes (Eric Lubow, SimpleReach) | Ca...
Optimizing Your Cluster with Coordinator Nodes (Eric Lubow, SimpleReach) | Ca...
 
Introduction to the Mysteries of ClickHouse Replication, By Robert Hodges and...
Introduction to the Mysteries of ClickHouse Replication, By Robert Hodges and...Introduction to the Mysteries of ClickHouse Replication, By Robert Hodges and...
Introduction to the Mysteries of ClickHouse Replication, By Robert Hodges and...
 
Monitoring with Prometheus
Monitoring with PrometheusMonitoring with Prometheus
Monitoring with Prometheus
 
Terraform Modules Restructured
Terraform Modules RestructuredTerraform Modules Restructured
Terraform Modules Restructured
 
What We Learned About Cassandra While Building go90 (Christopher Webster & Th...
What We Learned About Cassandra While Building go90 (Christopher Webster & Th...What We Learned About Cassandra While Building go90 (Christopher Webster & Th...
What We Learned About Cassandra While Building go90 (Christopher Webster & Th...
 
Cassandra on Mesos Across Multiple Datacenters at Uber (Abhishek Verma) | C* ...
Cassandra on Mesos Across Multiple Datacenters at Uber (Abhishek Verma) | C* ...Cassandra on Mesos Across Multiple Datacenters at Uber (Abhishek Verma) | C* ...
Cassandra on Mesos Across Multiple Datacenters at Uber (Abhishek Verma) | C* ...
 
Cassandra 3.0 advanced preview
Cassandra 3.0 advanced previewCassandra 3.0 advanced preview
Cassandra 3.0 advanced preview
 

Ähnlich wie High Throughput Analytics with Cassandra & Azure

Ähnlich wie High Throughput Analytics with Cassandra & Azure (20)

C* Summit 2013: Optimizing the Public Cloud for Cost and Scalability with Cas...
C* Summit 2013: Optimizing the Public Cloud for Cost and Scalability with Cas...C* Summit 2013: Optimizing the Public Cloud for Cost and Scalability with Cas...
C* Summit 2013: Optimizing the Public Cloud for Cost and Scalability with Cas...
 
Introducing Cloudian HyperStore 6.0
Introducing Cloudian HyperStore 6.0Introducing Cloudian HyperStore 6.0
Introducing Cloudian HyperStore 6.0
 
BigData Developers MeetUp
BigData Developers MeetUpBigData Developers MeetUp
BigData Developers MeetUp
 
GECon2017_High-volume data streaming in azure_ Aliaksandr Laisha
GECon2017_High-volume data streaming in azure_ Aliaksandr LaishaGECon2017_High-volume data streaming in azure_ Aliaksandr Laisha
GECon2017_High-volume data streaming in azure_ Aliaksandr Laisha
 
Getting Started with Amazon Redshift
Getting Started with Amazon RedshiftGetting Started with Amazon Redshift
Getting Started with Amazon Redshift
 
Devops kc
Devops kcDevops kc
Devops kc
 
Best Practices for Supercharging Cloud Analytics on Amazon Redshift
Best Practices for Supercharging Cloud Analytics on Amazon RedshiftBest Practices for Supercharging Cloud Analytics on Amazon Redshift
Best Practices for Supercharging Cloud Analytics on Amazon Redshift
 
11g R2
11g R211g R2
11g R2
 
Building a Just-in-Time Application Stack for Analysts
Building a Just-in-Time Application Stack for AnalystsBuilding a Just-in-Time Application Stack for Analysts
Building a Just-in-Time Application Stack for Analysts
 
Developing on SQL Azure
Developing on SQL AzureDeveloping on SQL Azure
Developing on SQL Azure
 
Revolutionary Storage for Modern Databases, Applications and Infrastrcture
Revolutionary Storage for Modern Databases, Applications and InfrastrctureRevolutionary Storage for Modern Databases, Applications and Infrastrcture
Revolutionary Storage for Modern Databases, Applications and Infrastrcture
 
Getting Started with Amazon Redshift
Getting Started with Amazon RedshiftGetting Started with Amazon Redshift
Getting Started with Amazon Redshift
 
Databases Have Forgotten About Single Node Performance, A Wrongheaded Trade Off
Databases Have Forgotten About Single Node Performance, A Wrongheaded Trade OffDatabases Have Forgotten About Single Node Performance, A Wrongheaded Trade Off
Databases Have Forgotten About Single Node Performance, A Wrongheaded Trade Off
 
Tales From The Front: An Architecture For Multi-Data Center Scalable Applicat...
Tales From The Front: An Architecture For Multi-Data Center Scalable Applicat...Tales From The Front: An Architecture For Multi-Data Center Scalable Applicat...
Tales From The Front: An Architecture For Multi-Data Center Scalable Applicat...
 
Scalability strategies for cloud based system architecture
Scalability strategies for cloud based system architectureScalability strategies for cloud based system architecture
Scalability strategies for cloud based system architecture
 
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
SRV402 Deep Dive on Amazon EC2 Instances, Featuring Performance Optimization ...
 
Cloudsim & greencloud
Cloudsim & greencloud Cloudsim & greencloud
Cloudsim & greencloud
 
VMworld 2013: Virtualizing Databases: Doing IT Right
VMworld 2013: Virtualizing Databases: Doing IT Right VMworld 2013: Virtualizing Databases: Doing IT Right
VMworld 2013: Virtualizing Databases: Doing IT Right
 
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/DayDatadog: a Real-Time Metrics Database for One Quadrillion Points/Day
Datadog: a Real-Time Metrics Database for One Quadrillion Points/Day
 
Getting started with amazon redshift - Toronto
Getting started with amazon redshift - TorontoGetting started with amazon redshift - Toronto
Getting started with amazon redshift - Toronto
 

Mehr von DataStax Academy

Cassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart LabsCassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart Labs
DataStax Academy
 
Cassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stackCassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stack
DataStax Academy
 
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & PythonCassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
DataStax Academy
 
Standing Up Your First Cluster
Standing Up Your First ClusterStanding Up Your First Cluster
Standing Up Your First Cluster
DataStax Academy
 
Real Time Analytics with Dse
Real Time Analytics with DseReal Time Analytics with Dse
Real Time Analytics with Dse
DataStax Academy
 
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
DataStax Academy
 
Enabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax EnterpriseEnabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax Enterprise
DataStax Academy
 
Advanced Data Modeling with Apache Cassandra
Advanced Data Modeling with Apache CassandraAdvanced Data Modeling with Apache Cassandra
Advanced Data Modeling with Apache Cassandra
DataStax Academy
 

Mehr von DataStax Academy (20)

Forrester CXNYC 2017 - Delivering great real-time cx is a true craft
Forrester CXNYC 2017 - Delivering great real-time cx is a true craftForrester CXNYC 2017 - Delivering great real-time cx is a true craft
Forrester CXNYC 2017 - Delivering great real-time cx is a true craft
 
Introduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph DatabaseIntroduction to DataStax Enterprise Graph Database
Introduction to DataStax Enterprise Graph Database
 
Introduction to DataStax Enterprise Advanced Replication with Apache Cassandra
Introduction to DataStax Enterprise Advanced Replication with Apache CassandraIntroduction to DataStax Enterprise Advanced Replication with Apache Cassandra
Introduction to DataStax Enterprise Advanced Replication with Apache Cassandra
 
Cassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart LabsCassandra on Docker @ Walmart Labs
Cassandra on Docker @ Walmart Labs
 
Cassandra 3.0 Data Modeling
Cassandra 3.0 Data ModelingCassandra 3.0 Data Modeling
Cassandra 3.0 Data Modeling
 
Cassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stackCassandra Adoption on Cisco UCS & Open stack
Cassandra Adoption on Cisco UCS & Open stack
 
Data Modeling for Apache Cassandra
Data Modeling for Apache CassandraData Modeling for Apache Cassandra
Data Modeling for Apache Cassandra
 
Coursera Cassandra Driver
Coursera Cassandra DriverCoursera Cassandra Driver
Coursera Cassandra Driver
 
Production Ready Cassandra
Production Ready CassandraProduction Ready Cassandra
Production Ready Cassandra
 
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
Cassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & PythonCassandra @ Netflix: Monitoring C* at Scale, Gossip and Tickler & Python
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 1Cassandra @ Sony: The good, the bad, and the ugly part 1
Cassandra @ Sony: The good, the bad, and the ugly part 1
 
Cassandra @ Sony: The good, the bad, and the ugly part 2
Cassandra @ Sony: The good, the bad, and the ugly part 2Cassandra @ Sony: The good, the bad, and the ugly part 2
Cassandra @ Sony: The good, the bad, and the ugly part 2
 
Standing Up Your First Cluster
Standing Up Your First ClusterStanding Up Your First Cluster
Standing Up Your First Cluster
 
Real Time Analytics with Dse
Real Time Analytics with DseReal Time Analytics with Dse
Real Time Analytics with Dse
 
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
 
Cassandra Core Concepts
Cassandra Core ConceptsCassandra Core Concepts
Cassandra Core Concepts
 
Enabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax EnterpriseEnabling Search in your Cassandra Application with DataStax Enterprise
Enabling Search in your Cassandra Application with DataStax Enterprise
 
Bad Habits Die Hard
Bad Habits Die Hard Bad Habits Die Hard
Bad Habits Die Hard
 
Advanced Data Modeling with Apache Cassandra
Advanced Data Modeling with Apache CassandraAdvanced Data Modeling with Apache Cassandra
Advanced Data Modeling with Apache Cassandra
 
Advanced Cassandra
Advanced CassandraAdvanced Cassandra
Advanced Cassandra
 

High Throughput Analytics with Cassandra & Azure

  • 1. High Throughput Analytics with Cassandra & Azure Charles Lamanna Principal Dev Lead @clamanna
  • 2. MetricsHub keep cloud services up and running for the lowest possible cost
  • 3. Live Status Cost Awareness Alerts and Notifications Actions and Scaling $
  • 4.
  • 5. 2000+ customers in 6 months 0 500 1000 1500 2000 2500 10/18/2012 12/7/2012 1/26/2013 3/17/2013 5/6/2013 6/25/2013
  • 6. storing data 200M data points per hour 80,000 data points per second (peak)
  • 7. Planning for huge data ingestion rates Requires high scale, real-time data 1,000 data points per minute per VM 12 data points per endpoint per minute Aggregate, analyze and take actions based on this data stream (in near real-time) Must be cheap, scalable and reliable
  • 8.
  • 9. Scales fluidly Grows horizontally – double the nodes, double capacity Add / remove capacity / nodes with no downtime Highly available No single point of failure Replication factor (i.e. hot copies) is just a config switch
  • 10. … and by the way Little-to-no operations cost New nodes take minutes to setup Nodes just keep running for months on end “Aggregate on write” – no jobs required! Distributed counters make it easy to do aggregates on write …and a nice kicker: has *great* perf / COGS in Azure
  • 12. Table Storage Jobs Worker Role (24 instances) SQL Database Portal Web Role (3 instances) Cassandra VM Cluster (32 XL instances) Web API Web Role (8 instances) End User Web Browsers Monitored Customer Resources (e.g. websites; SQL databases) Monitored Virtual Machines Endpoints Replicated data in multiple datacenters Clients PaaS IaaS Services
  • 13. Avoiding state • Application logic / code all lives on stateless machines • Keeps it simple: decreases human operations cost • Use Azure PAAS offerings (Web and Worker roles) Table Storage Jobs Worker Role (24 instances) SQL Database Blob storage Portal Web Role (3 instances) Cassandra VM Cluster (32 XL instances) Web API Web Role (8 instances) Endpoints Replicated data in multiple datacenters PaaS
  • 14. Azure Cloud Services (PAAS) • Scale horizontally (grew from 1 to 30+ instances) • Managed by the platform (patched; coordinated recycling; failover; etc.) • 1 click deployment from Visual Studio (with automatic load balancer swaps)
  • 15. Table Storage Jobs Worker Role (24 instances) SQL Database Blob storage Web API Web Role (8 instances) Endpoints Replicated data in multiple datacenters Maintains all state for metrics / time series data 32 XL Linux Virtual Machines Portal Web Role (3 instances) Cassandra VM Cluster (32 XL instances) Cassandra Cluster IaaS
  • 16. 32 nodes, 8 “pods” of 4 nodes
  • 17. Exposed via a single endpoint Exposed via a single endpoint Exposing the pods • Each pod of 4 nodes has a single load balanced endpoint • Clients (on our stateless roles) treats the endpoints as a pool • Blacklists and skips an endpoint if it starts producing a lot of errors
  • 18. Where does the data go? • Data files are on 16 mounted network backed disks (*not* ephemeral disks) • Data disks are geo-replicated (3 copies local; 1 remote) for “free” DR • Azure data disks offer great throughput (VMs end up CPU bound)
  • 19. Our Column Families (CQL 3) CREATE TABLE oneminute ( rk text, ck text, cnt counter, sum counter, PRIMARY KEY (rk, ck) );
  • 20. Updating values… Realtime “average” values at any granularity, for any time window update oneminute/tenminute/oneday set sum = sum + {sample_value}, cnt = cnt + 1 where rk = '{customer+metric}' and ck = '{tags_and_timestamp}'
  • 21. Reading values… *ONE* round trip to fetch a metric over time (e.g. CPU over past week) select * from oneminute where rk = ‘{customer_name}' and ck < '{metric_path_start}' and ck >= '{metric_path_end}‘ order by ck desc;
  • 22. Some hard lessons… • Static private IPs are a must; otherwise, reboots / outages can confuse the cluster when nodes come back up • Monitor performance carefully; once you tip over, it is hard to rebalance the cluster and add new nodes • Fit the cluster to the platform: in Azure, match the Upgrade Domains / Fault Domains to preserve uptime during service maintenance / hardware failure
  • 23. Single node tests.. • 4 disks, RAID 0, no read cache Workload (%write) Ops / sec Latency median Latency 95th Latency 99th %100 20018 1.5 3.7 7.9 %75 8361 85.9 376.6 584.8 %25 5412 459.9 759.1 940.1 • 4 disks, RAID 0, read cache Workload (%write) Ops / sec Latency median Latency 95th Latency 99th %100 19208 1.5 3.8 7.9 18543 1.5 3.6 7.9 18563 1.4 3.6 8.2 %75 7112 195.9 595.8 1099.6 7581 168.9 589.5 985.2 5149 256.5 774.0 1402.9 %25 15358 23.0 110.2 309.1 3742 279.2 563.0 789.7 15376 22.1 98.8 293.3 0 1000 2000 3000 4000 5000 6000 7000 jbod RAID0 JBOD vs RAID 0 for read- heavy workload
  • 24. Workload (%write) Ops / sec Latency Median Latency 95th Latency 99th %100 13638 1.9 4.9 24.0 %75 3239 11.2 687.0 1099.3 %25 1825 243.6 687.0 808.7 Multi-node load tests.. • 4 Nodes; RF = 3 (Quorom) • 8 Disks, RAID 0
  • 25.