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
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)
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