SlideShare a Scribd company logo
1 of 52
Download to read offline
osmc.de
November 7, 2018
Rob Skillington
Observability and M3, Uber NYC
M3
The new age of metrics and
monitoring in an increasingly
complex world
● Working on monitoring “observability” “running computers” now at Uber
for 3 continuous years
● Wrote a lot of database code in the hope that I wouldn’t get paged
anymore (I don’t recommend it, but also.. please contribute!)
● Interested in reusable monitoring software, less interested in “all in one”
ecosystems
Why are you here?
Agenda
● Where we came from and where we
are going
● “High dimensionality metrics”
● Why use highly dimensional metrics
● Case study: Uber
● How to use M3, an open source
metrics platform
Where we came from
and where we are going
4
● Nagios
○ For example, check a local HTTP service (but similar for many things):
#!/bin/sh
/usr/lib/nagios/plugins/check_http 
-I 127.0.0.1 
-p 5390 
-s OK 
-w 90 
-c 180
Where we came from
What does this look like?
● A simple way to interpret Nagios:
○ Execute scripts in a distributed way
○ View summary information of script execution success across
machines
○ Drill down to view logs of single script execution
○ A way to send alerts
What is this really?
PromQL for “alert me when more than N kafka local agents are unhealthy”
Wouldn’t it be nice? (adjust on the fly)
● Simple way to execute the actual checks and collect these metrics
○ https://github.com/google/cloudprober
“Integration with open source monitoring stack of Prometheus and Grafana. Cloudprober
exports probe results as counter based metrics that work well with Prometheus and
Grafana.”
○ What about non-HTTP? (but use HTTP where possible)
“Arbitrary, complex probes can be run through the external probe type. For example, you
could write a simple script to insert and delete a row in your database, and execute this
script through the 'EXTERNAL' probe type.”
Can we do this today?
Wouldn’t it be nice? (slice and dice by dimensions, look back 30 days)
“Any dimension?” well.. within reason
● Metrics are great for getting a 10,000 ft view of your applications systems
● Also becoming increasingly valuable for drill downs when using “high
cardinality” metrics
○ Example: P99 of requests broken down by
■ Region (US_East, EU_West, etc)
■ Endpoint
■ User segment (client attributes, device, operating system, etc)
Wouldn’t it be nice? (to have metrics “for everything”)
● Plug and play compatibility for open source systems becoming common
Wouldn’t it be nice? (to have metrics “for every type of thing”)
Redis Prometheus Grafana Dashboard
● Going from a metrics graph directly to logs
○ Drill down into discovered issues from graphs or double check 5XXs
match a theory
● Today we have to pivot and move to our logging platform and reconstruct
a query that should surface events similar to the metrics query
Wouldn’t it be nice? (easy navigability to detailed logs)
context.Measure(“http_serve_request”).
With(Tags{“route”:...,“status_code”:”400”,”city”:”berlin”)).
Record(1, 42 * time.Millisecond).
Log(Details{“error”:“foo”,“stack”:...,“other”:...})
Wouldn’t it be nice? (single instrumentation, both logs and metrics)
Metrics Logs
UI
(pivot on both)
Wouldn’t it be nice? (UIs autodiscover structure of metrics and logs)
“High dimensionality metrics”
Huh?
16
● Take a single metric, such as status code delivered by our frontends
○ http_status_code
● At Uber, we have roughly a few hundred important HTTP routes we want
to drill down into the status code with the following dimensions:
○ Route (few hundred)
○ Status code (less than a few common status codes)
○ Places of operation (few hundred)
■ failures sometimes isolated to place of operation
○ App device version (few hundred)
High dimensionality metrics
● You can roll up metrics to make viewing fast
○ View status codes by route, but across all regions for single app
version
● However, it is still incredibly high dimensional, just to store
○ Routes (say 500) * Status code (say 5) * Region (say 5) * Client version
(say 20)
= 250,000 unique time series
○ Expensive but not too bad..? However add any other dimensions and
it gets out of control (any multiplier on 250k explodes to millions quickly)
High dimensionality metrics
Why use high cardinality metrics?
19
● Really useful for drill downs when monitoring lots of distinct things that can
fail independently of each other, even if they are the same software but
running with subtly different attributes (which is an increasing trend)
○ different region, configuration, client/server versions, upstream or downstream, protocol,
attributes of a request such as “type of a search” or “search in a category”, etc.).
● Time series are stored and compressed much higher than log data so you
can keep much more if the records have common values. They are also
much faster to fetch, visualize, and sub-aggregate together.
Why use high cardinality metrics?
● Log data
Values unaggregated:
{status_code: 400, user_agent: ios_11, client_version: 103, at: 2018-08-01 12:00:01}
{status_code: 400, user_agent: ios_11, client_version: 103, at: 2018-08-01 12:00:05}
{status_code: 400, user_agent: ios_11, client_version: 103, at: 2018-08-01 12:00:07}
{status_code: 400, user_agent: ios_11, client_version: 103, at: 2018-08-01 12:00:11}
● Metrics data
Key: {status_code: 400, user_agent: ios_11, client_version: 103, at: 2018-01-01 12:00:00}
Values aggregated at 10s and TSZ compressed to ~1.4 bytes per float value:
{at: 2018-08-01 12:00:00, value: 3}
{at: 2018-08-01 12:00:10, value: 1}
Generally...
● A manageable way to scale out capacity
○ A single Prometheus instance can hold N million time series
(where N does not usually reach the double digits, even on very big machines)
Ok great but what do I need?
“We good
yeah?”
● It’s a little like playing tetris, can I fit my high cardinality metrics into an
existing Prometheus instance or do I setup a new one, what happens
when it eclipses a single instance?
Ok great but what do I need?
Case Study: Uber
24
● ~4K Microservices with a central Observability self-service platform
● Onboarding? None, simply start emitting metrics
● Used for all manner of things:
○ Real-time alerting using application metrics (e.g., p99 response time)
○ Tracking business metrics (e.g., number of Uber rides in Berlin)
■ Why? So easy to get started
■ metrics.Tagged(Tags{“region”: “berlin”}).Counter(“ride_start”).Inc(1)
○ Capacity planning using system metrics (e.g., container load average)
○ And much more …
Uber and the M3 metrics platform
Discoverability
Service
End User Code (“Biz logic”)
RPC
Storage
(C*/Redis/…) ...
End User Code (“Biz logic”)
RPC
Storage
(C*/Redis/…) ...
Library owners:
- Dashboard panel template = f(serviceName)
- Ensure library emits metrics following given template
Application devs:
- Service: uses library
- Provide “serviceName” at time of generation
What’s so hard
about that?
Scale - Ingress
400-700M Pre-aggregated Metrics/s
(~130Gbits/sec)
(random week when I was making these slides)
Scale - Ingress
~29M Metrics Stored/s
(not including Replica Factor = 3)
(~50Gbits/sec)
(random week when I was making these slides)
Scale - Ingress
~ 9B Unique Metric IDs
(trending down due to metrics falling
out of retention)
(random week when I was making these slides)
Scale - Egress
~ 30B data points per second
(~20 gigabits/sec)
(services 150,000 scheduled “realtime” alerts)
(random week when I was making these slides)
Ok, but why M3?
● The best onboarding of a team or service, is no onboarding
○ Just start emitting metrics from an application or probe
○ Which is fine if you can just expand your central metrics cluster in an easy way
● The best operators of computers, is computers
○ Scripts don’t cut it after someone runs it the wrong way just N times, where N
is your pain threshold for correcting output of scripts triggered by humans
● The holy grail is of course, is a system that looks after itself (for the most part)
Needed turnkey way to just “add capacity”
● 2015 - 2016: M3 with Cassandra
○ Up to 80k writes/sec, poor compression
○ Replication but only RF=2
■ RF=3 too expensive, already very costly with RF=2
■ Repairs too slow to be feasible
○ Required expensive SSDs and hungry on CPU
■ Heavy compactions even with DTCS required top end CPU, RAM, disks
○ 16X YoY growth resulted in > 1500 hosts
■ Cost + Operational overhead not sustainable
Brief History of M3
● 2016 - Now: M3 with M3DB
○ Up to 500k writes/sec, 10x compression vs Cassandra using much less disk
■ This is while using significantly cheaper CPU and disk
○ Reduced cost of running M3 to 2.5% of all hardware/compute in use by Uber
■ This is with little-to-no restrictions on all usage of M3 amongst teams
○ Continually making improvements to further reduce footprint and increase
density in terms of throughput and on disk space usage
Brief History of M3
M3DB: High-Level Architecture
● Think Log Structured
Merge tree (LSM).. but
with
much less compaction
● Typical LSM will have
levelled or size based
compaction, M3DB
has time window
compaction which by
default avoids any data
compaction (unlike
Cassandra time
window compaction)
M3DB - Design Principles
● Optimized for high read and write volume per machine
○ vs. those built on large data storage tech (eg. OpenTSDB/HBASE)
● Optimized to reduce cost for large metrics warehouse (custom compression, etc)
○ vs. more generic IOT/SQL base TSDBs (eg TimeScale)
○ (if you want the most instrumentation/insight for your cost, this matters)
● Strongly consistent cluster membership backed by etcd with quorum writes
○ vs. eventual in Cassandra or IronDB
○ (avoid putting up with Gossip hassles with hundreds of machines)
● Low-Latency for metrics “Time To Visible” as we alert off our persisted data
○ Optimized for smaller batch size writes vs larger (InfluxDB)
● Support for high cardinality queries over large data sets (petabytes)
○ Data cannot live in “lukewarm” storage (Thanos uses S3, Cortex uses variety of
backends for its index, however Cassandra doesn’t support full text search so
this is done client side which makes it not great with a very large index)
● Optimized file-system storage with no need for compactions
○ We have fairly consistent ingestion load
○ We don’t downsample async due to added cost - do more with less!
● Optimized for node startup write availability and self-recovery after being down
○ Larger clusters = more HW failures
○ Need to optimize cluster upgrades with new tech
○ Better for compute platforms
M3DB - Design Principles
So how can you use M3?
45
Application
M3 - OSS (stable)
Prometheus
Grafana
AlertManager
M3DB
Index
M3
Coordinator
etcd
Application
M3DB
Read/Write
Application
M3 - OSS (beta)
M3DB
Grafana
PromQL (beta)
Grafana/Other
Alert Engine
M3
Aggregator
M3 Collector
M3 Query
Application
● Limited guides on how to use this
configuration currently
H1 2019
● Finish new dedicated scalable open source M3Query service for PromQL and
Graphite
● Open source support for Graphite metrics
● Better guides for M3 Aggregator and M3 Collector usage
● Kubernetes Operator
● CNCF Sandbox Submission
H2 2019
● You tell us…. on Gitter (gitter.im/m3db) or mail (m3db@googlegroups.com) or
GitHub issues (github.com/m3db/proposal/issues)
M3 - Roadmap
● PromQL
● Graphite
● M3QL
Application
M3 - OSS (future)
M3DB
Grafana
Grafana/Other
Alert Engine
M3
Aggregator
M3 Collector
M3 Query
Application
Application
Statsd /
Carbon App
Application
Prometheus
M3
Coordinator
Application Read/Write
You can also find us...
● On Google Hangout / Zoom (because video internet doesn’t suck all the time
anymore)
● Book some time at https://m3.appointlet.com
Questions?
Slides
https://bit.ly/m3-osmc
GitHub and Web
https://github.com/m3db/m3, https://m3db.io
Mailing List
https://groups.google.com/forum/#!topic/m3db
Gitter (like IRC, except.. it’s not IRC 😔)
https://gitter.im/m3db
M3 Eng Blog Post
https://eng.uber.com/m3
M3
Thank you
Proprietary © 2018 Uber Technologies, Inc. All rights reserved. No part of this
document may be reproduced or utilized in any form or by any means,
electronic or mechanical, including photocopying, recording, or by any
information storage or retrieval systems, without permission in writing from
Uber. This document is intended only for the use of the individual or entity to
whom it is addressed. All recipients of this document are notified that the
information contained herein includes proprietary information of Uber, and
recipient may not make use of, disseminate, or in any way disclose this
document or any of the enclosed information to any person other than
employees of addressee to the extent necessary for consultations with
authorized personnel of Uber.
Questions: email ospo@uber.com
Follow our Facebook page:
www.facebook.com/uberopensource

More Related Content

What's hot

Scalable Realtime Analytics with declarative SQL like Complex Event Processin...
Scalable Realtime Analytics with declarative SQL like Complex Event Processin...Scalable Realtime Analytics with declarative SQL like Complex Event Processin...
Scalable Realtime Analytics with declarative SQL like Complex Event Processin...Srinath Perera
 
Ted Dunning – Very High Bandwidth Time Series Database Implementation - NoSQL...
Ted Dunning – Very High Bandwidth Time Series Database Implementation - NoSQL...Ted Dunning – Very High Bandwidth Time Series Database Implementation - NoSQL...
Ted Dunning – Very High Bandwidth Time Series Database Implementation - NoSQL...NoSQLmatters
 
Introduction to Real-time data processing
Introduction to Real-time data processingIntroduction to Real-time data processing
Introduction to Real-time data processingYogi Devendra Vyavahare
 
Java one2015 - Work With Hundreds of Hot Terabytes in JVMs
Java one2015 - Work With Hundreds of Hot Terabytes in JVMsJava one2015 - Work With Hundreds of Hot Terabytes in JVMs
Java one2015 - Work With Hundreds of Hot Terabytes in JVMsSpeedment, Inc.
 
Strata 2014 Talk:Tracking a Soccer Game with Big Data
Strata 2014 Talk:Tracking a Soccer Game with Big DataStrata 2014 Talk:Tracking a Soccer Game with Big Data
Strata 2014 Talk:Tracking a Soccer Game with Big DataSrinath Perera
 
Learning From the Past: Automated Rule Generation for CEP - DEBS 2014
Learning From the Past: Automated Rule Generation for CEP - DEBS 2014Learning From the Past: Automated Rule Generation for CEP - DEBS 2014
Learning From the Past: Automated Rule Generation for CEP - DEBS 2014Alessandro Margara
 
Chronix Time Series Database - The New Time Series Kid on the Block
Chronix Time Series Database - The New Time Series Kid on the BlockChronix Time Series Database - The New Time Series Kid on the Block
Chronix Time Series Database - The New Time Series Kid on the BlockQAware GmbH
 
Big data @ uber vu (1)
Big data @ uber vu (1)Big data @ uber vu (1)
Big data @ uber vu (1)Mihnea Giurgea
 
Redis as a Main Database, Scaling and HA
Redis as a Main Database, Scaling and HARedis as a Main Database, Scaling and HA
Redis as a Main Database, Scaling and HADave Nielsen
 
Time Series Data in a Time Series World
Time Series Data in a Time Series WorldTime Series Data in a Time Series World
Time Series Data in a Time Series WorldMapR Technologies
 
Speed Up Uber's Presto with Alluxio
Speed Up Uber's Presto with AlluxioSpeed Up Uber's Presto with Alluxio
Speed Up Uber's Presto with AlluxioAlluxio, Inc.
 
Scaling up with Aerospike!
Scaling up with Aerospike!Scaling up with Aerospike!
Scaling up with Aerospike!Anshu Prateek
 
Dynamo db and Cross Region Migration
Dynamo db and Cross Region MigrationDynamo db and Cross Region Migration
Dynamo db and Cross Region MigrationAnamika Gupta
 
Apache Solr as a compressed, scalable, and high performance time series database
Apache Solr as a compressed, scalable, and high performance time series databaseApache Solr as a compressed, scalable, and high performance time series database
Apache Solr as a compressed, scalable, and high performance time series databaseFlorian Lautenschlager
 
Chris Hillman – Beyond Mapreduce Scientific Data Processing in Real-time
Chris Hillman – Beyond Mapreduce Scientific Data Processing in Real-timeChris Hillman – Beyond Mapreduce Scientific Data Processing in Real-time
Chris Hillman – Beyond Mapreduce Scientific Data Processing in Real-timeFlink Forward
 
InfluxDb and Grafana fighting with data
InfluxDb and Grafana fighting with dataInfluxDb and Grafana fighting with data
InfluxDb and Grafana fighting with dataIvan Vaskevych
 
Processing Big Data in Real-Time - Yanai Franchi, Tikal
Processing Big Data in Real-Time - Yanai Franchi, TikalProcessing Big Data in Real-Time - Yanai Franchi, Tikal
Processing Big Data in Real-Time - Yanai Franchi, TikalCodemotion Tel Aviv
 
If the data cannot come to the algorithm...
If the data cannot come to the algorithm...If the data cannot come to the algorithm...
If the data cannot come to the algorithm...Robert Burrell Donkin
 

What's hot (20)

Scalable Realtime Analytics with declarative SQL like Complex Event Processin...
Scalable Realtime Analytics with declarative SQL like Complex Event Processin...Scalable Realtime Analytics with declarative SQL like Complex Event Processin...
Scalable Realtime Analytics with declarative SQL like Complex Event Processin...
 
Ted Dunning – Very High Bandwidth Time Series Database Implementation - NoSQL...
Ted Dunning – Very High Bandwidth Time Series Database Implementation - NoSQL...Ted Dunning – Very High Bandwidth Time Series Database Implementation - NoSQL...
Ted Dunning – Very High Bandwidth Time Series Database Implementation - NoSQL...
 
Introduction to Real-time data processing
Introduction to Real-time data processingIntroduction to Real-time data processing
Introduction to Real-time data processing
 
Java one2015 - Work With Hundreds of Hot Terabytes in JVMs
Java one2015 - Work With Hundreds of Hot Terabytes in JVMsJava one2015 - Work With Hundreds of Hot Terabytes in JVMs
Java one2015 - Work With Hundreds of Hot Terabytes in JVMs
 
NUMA and Java Databases
NUMA and Java DatabasesNUMA and Java Databases
NUMA and Java Databases
 
Strata 2014 Talk:Tracking a Soccer Game with Big Data
Strata 2014 Talk:Tracking a Soccer Game with Big DataStrata 2014 Talk:Tracking a Soccer Game with Big Data
Strata 2014 Talk:Tracking a Soccer Game with Big Data
 
Learning From the Past: Automated Rule Generation for CEP - DEBS 2014
Learning From the Past: Automated Rule Generation for CEP - DEBS 2014Learning From the Past: Automated Rule Generation for CEP - DEBS 2014
Learning From the Past: Automated Rule Generation for CEP - DEBS 2014
 
Chronix Time Series Database - The New Time Series Kid on the Block
Chronix Time Series Database - The New Time Series Kid on the BlockChronix Time Series Database - The New Time Series Kid on the Block
Chronix Time Series Database - The New Time Series Kid on the Block
 
Big data @ uber vu (1)
Big data @ uber vu (1)Big data @ uber vu (1)
Big data @ uber vu (1)
 
Redis as a Main Database, Scaling and HA
Redis as a Main Database, Scaling and HARedis as a Main Database, Scaling and HA
Redis as a Main Database, Scaling and HA
 
Time Series Data in a Time Series World
Time Series Data in a Time Series WorldTime Series Data in a Time Series World
Time Series Data in a Time Series World
 
Speed Up Uber's Presto with Alluxio
Speed Up Uber's Presto with AlluxioSpeed Up Uber's Presto with Alluxio
Speed Up Uber's Presto with Alluxio
 
Scaling up with Aerospike!
Scaling up with Aerospike!Scaling up with Aerospike!
Scaling up with Aerospike!
 
Dynamo db and Cross Region Migration
Dynamo db and Cross Region MigrationDynamo db and Cross Region Migration
Dynamo db and Cross Region Migration
 
Apache Solr as a compressed, scalable, and high performance time series database
Apache Solr as a compressed, scalable, and high performance time series databaseApache Solr as a compressed, scalable, and high performance time series database
Apache Solr as a compressed, scalable, and high performance time series database
 
Intro to cassandra
Intro to cassandraIntro to cassandra
Intro to cassandra
 
Chris Hillman – Beyond Mapreduce Scientific Data Processing in Real-time
Chris Hillman – Beyond Mapreduce Scientific Data Processing in Real-timeChris Hillman – Beyond Mapreduce Scientific Data Processing in Real-time
Chris Hillman – Beyond Mapreduce Scientific Data Processing in Real-time
 
InfluxDb and Grafana fighting with data
InfluxDb and Grafana fighting with dataInfluxDb and Grafana fighting with data
InfluxDb and Grafana fighting with data
 
Processing Big Data in Real-Time - Yanai Franchi, Tikal
Processing Big Data in Real-Time - Yanai Franchi, TikalProcessing Big Data in Real-Time - Yanai Franchi, Tikal
Processing Big Data in Real-Time - Yanai Franchi, Tikal
 
If the data cannot come to the algorithm...
If the data cannot come to the algorithm...If the data cannot come to the algorithm...
If the data cannot come to the algorithm...
 

Similar to OSMC 2018 | Learnings, patterns and Uber’s metrics platform M3, open sourced as a Prometheus long term storage backend by Rob Skillington

FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...
FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...
FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...Rob Skillington
 
Data Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFixData Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFixC4Media
 
Scaling Monitoring At Databricks From Prometheus to M3
Scaling Monitoring At Databricks From Prometheus to M3Scaling Monitoring At Databricks From Prometheus to M3
Scaling Monitoring At Databricks From Prometheus to M3LibbySchulze
 
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned Omid Vahdaty
 
Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3  Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3 Omid Vahdaty
 
NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1Ruslan Meshenberg
 
MongoDB World 2019: Packing Up Your Data and Moving to MongoDB Atlas
MongoDB World 2019: Packing Up Your Data and Moving to MongoDB AtlasMongoDB World 2019: Packing Up Your Data and Moving to MongoDB Atlas
MongoDB World 2019: Packing Up Your Data and Moving to MongoDB AtlasMongoDB
 
Big data Argentina meetup 2020-09: Intro to presto on docker
Big data Argentina meetup 2020-09: Intro to presto on dockerBig data Argentina meetup 2020-09: Intro to presto on docker
Big data Argentina meetup 2020-09: Intro to presto on dockerFederico Palladoro
 
Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...
Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...
Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...Hernan Costante
 
Ledingkart Meetup #2: Scaling Search @Lendingkart
Ledingkart Meetup #2: Scaling Search @LendingkartLedingkart Meetup #2: Scaling Search @Lendingkart
Ledingkart Meetup #2: Scaling Search @LendingkartMukesh Singh
 
Big data @ Hootsuite analtyics
Big data @ Hootsuite analtyicsBig data @ Hootsuite analtyics
Big data @ Hootsuite analtyicsClaudiu Coman
 
Argus Production Monitoring at Salesforce
Argus Production Monitoring at SalesforceArgus Production Monitoring at Salesforce
Argus Production Monitoring at SalesforceHBaseCon
 
Argus Production Monitoring at Salesforce
Argus Production Monitoring at Salesforce Argus Production Monitoring at Salesforce
Argus Production Monitoring at Salesforce HBaseCon
 
Lessons learned from designing a QA Automation for analytics databases (big d...
Lessons learned from designing a QA Automation for analytics databases (big d...Lessons learned from designing a QA Automation for analytics databases (big d...
Lessons learned from designing a QA Automation for analytics databases (big d...Omid Vahdaty
 
AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned Omid Vahdaty
 
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | EnglishAWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | EnglishOmid Vahdaty
 
Design Like a Pro: How to Pick the Right System Architecture
Design Like a Pro: How to Pick the Right System ArchitectureDesign Like a Pro: How to Pick the Right System Architecture
Design Like a Pro: How to Pick the Right System ArchitectureInductive Automation
 
Our journey with druid - from initial research to full production scale
Our journey with druid - from initial research to full production scaleOur journey with druid - from initial research to full production scale
Our journey with druid - from initial research to full production scaleItai Yaffe
 
Netflix SRE perf meetup_slides
Netflix SRE perf meetup_slidesNetflix SRE perf meetup_slides
Netflix SRE perf meetup_slidesEd Hunter
 

Similar to OSMC 2018 | Learnings, patterns and Uber’s metrics platform M3, open sourced as a Prometheus long term storage backend by Rob Skillington (20)

FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...
FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...
FOSDEM 2019: M3, Prometheus and Graphite with metrics and monitoring in an in...
 
Data Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFixData Science in the Cloud @StitchFix
Data Science in the Cloud @StitchFix
 
Scaling Monitoring At Databricks From Prometheus to M3
Scaling Monitoring At Databricks From Prometheus to M3Scaling Monitoring At Databricks From Prometheus to M3
Scaling Monitoring At Databricks From Prometheus to M3
 
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
 
Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3  Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3
 
NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1NetflixOSS Meetup season 3 episode 1
NetflixOSS Meetup season 3 episode 1
 
MongoDB World 2019: Packing Up Your Data and Moving to MongoDB Atlas
MongoDB World 2019: Packing Up Your Data and Moving to MongoDB AtlasMongoDB World 2019: Packing Up Your Data and Moving to MongoDB Atlas
MongoDB World 2019: Packing Up Your Data and Moving to MongoDB Atlas
 
Big data Argentina meetup 2020-09: Intro to presto on docker
Big data Argentina meetup 2020-09: Intro to presto on dockerBig data Argentina meetup 2020-09: Intro to presto on docker
Big data Argentina meetup 2020-09: Intro to presto on docker
 
Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...
Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...
Eko10 - Security Monitoring for Big Infrastructures without a Million Dollar ...
 
Ledingkart Meetup #2: Scaling Search @Lendingkart
Ledingkart Meetup #2: Scaling Search @LendingkartLedingkart Meetup #2: Scaling Search @Lendingkart
Ledingkart Meetup #2: Scaling Search @Lendingkart
 
Big data @ Hootsuite analtyics
Big data @ Hootsuite analtyicsBig data @ Hootsuite analtyics
Big data @ Hootsuite analtyics
 
Argus Production Monitoring at Salesforce
Argus Production Monitoring at SalesforceArgus Production Monitoring at Salesforce
Argus Production Monitoring at Salesforce
 
Argus Production Monitoring at Salesforce
Argus Production Monitoring at Salesforce Argus Production Monitoring at Salesforce
Argus Production Monitoring at Salesforce
 
Lessons learned from designing a QA Automation for analytics databases (big d...
Lessons learned from designing a QA Automation for analytics databases (big d...Lessons learned from designing a QA Automation for analytics databases (big d...
Lessons learned from designing a QA Automation for analytics databases (big d...
 
AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned AWS Big Data Demystified #1: Big data architecture lessons learned
AWS Big Data Demystified #1: Big data architecture lessons learned
 
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | EnglishAWS big-data-demystified #1.1  | Big Data Architecture Lessons Learned | English
AWS big-data-demystified #1.1 | Big Data Architecture Lessons Learned | English
 
Design Like a Pro: How to Pick the Right System Architecture
Design Like a Pro: How to Pick the Right System ArchitectureDesign Like a Pro: How to Pick the Right System Architecture
Design Like a Pro: How to Pick the Right System Architecture
 
Our journey with druid - from initial research to full production scale
Our journey with druid - from initial research to full production scaleOur journey with druid - from initial research to full production scale
Our journey with druid - from initial research to full production scale
 
Cloud arch patterns
Cloud arch patternsCloud arch patterns
Cloud arch patterns
 
Netflix SRE perf meetup_slides
Netflix SRE perf meetup_slidesNetflix SRE perf meetup_slides
Netflix SRE perf meetup_slides
 

Recently uploaded

Vellore Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort Service
Vellore Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort ServiceVellore Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort Service
Vellore Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort ServiceDamini Dixit
 
Production diary Film the city powerpoint
Production diary Film the city powerpointProduction diary Film the city powerpoint
Production diary Film the city powerpointAshtonCains
 
Capstone slidedeck for my capstone project part 2.pdf
Capstone slidedeck for my capstone project part 2.pdfCapstone slidedeck for my capstone project part 2.pdf
Capstone slidedeck for my capstone project part 2.pdfeliklein8
 
CASH PAYMENT ON GIRL HAND TO HAND HOUSEWIFE
CASH PAYMENT ON GIRL HAND TO HAND HOUSEWIFECASH PAYMENT ON GIRL HAND TO HAND HOUSEWIFE
CASH PAYMENT ON GIRL HAND TO HAND HOUSEWIFECall girl Jaipur
 
Jual Obat Aborsi Palu ( Taiwan No.1 ) 085657271886 Obat Penggugur Kandungan C...
Jual Obat Aborsi Palu ( Taiwan No.1 ) 085657271886 Obat Penggugur Kandungan C...Jual Obat Aborsi Palu ( Taiwan No.1 ) 085657271886 Obat Penggugur Kandungan C...
Jual Obat Aborsi Palu ( Taiwan No.1 ) 085657271886 Obat Penggugur Kandungan C...ZurliaSoop
 
Film show investigation powerpoint for the site
Film show investigation powerpoint for the siteFilm show investigation powerpoint for the site
Film show investigation powerpoint for the siteAshtonCains
 
+971565801893>> ORIGINAL CYTOTEC ABORTION PILLS FOR SALE IN DUBAI AND ABUDHABI<<
+971565801893>> ORIGINAL CYTOTEC ABORTION PILLS FOR SALE IN DUBAI AND ABUDHABI<<+971565801893>> ORIGINAL CYTOTEC ABORTION PILLS FOR SALE IN DUBAI AND ABUDHABI<<
+971565801893>> ORIGINAL CYTOTEC ABORTION PILLS FOR SALE IN DUBAI AND ABUDHABI<<Health
 
Enjoy Night⚡Call Girls Palam Vihar Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Palam Vihar Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Palam Vihar Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Palam Vihar Gurgaon >༒8448380779 Escort ServiceDelhi Call girls
 
Improve Your Brand in Waco with a Professional Social Media Marketing Company
Improve Your Brand in Waco with a Professional Social Media Marketing CompanyImprove Your Brand in Waco with a Professional Social Media Marketing Company
Improve Your Brand in Waco with a Professional Social Media Marketing CompanyWSI INTERNET PARTNER
 
College & House wife Call Girls in Paharganj 9634446618 -Best Escort call gi...
College & House wife  Call Girls in Paharganj 9634446618 -Best Escort call gi...College & House wife  Call Girls in Paharganj 9634446618 -Best Escort call gi...
College & House wife Call Girls in Paharganj 9634446618 -Best Escort call gi...Heena Escort Service
 
Social media marketing/Seo expert and digital marketing
Social media marketing/Seo expert and digital marketingSocial media marketing/Seo expert and digital marketing
Social media marketing/Seo expert and digital marketingSheikhSaifAli1
 
Interpreting the brief for the media IDY
Interpreting the brief for the media IDYInterpreting the brief for the media IDY
Interpreting the brief for the media IDYgalaxypingy
 
Unlock the power of Instagram with SocioCosmos. Start your journey towards so...
Unlock the power of Instagram with SocioCosmos. Start your journey towards so...Unlock the power of Instagram with SocioCosmos. Start your journey towards so...
Unlock the power of Instagram with SocioCosmos. Start your journey towards so...SocioCosmos
 
BVG BEACH CLEANING PROJECTS- ORISSA , ANDAMAN, PORT BLAIR
BVG BEACH CLEANING PROJECTS- ORISSA , ANDAMAN, PORT BLAIRBVG BEACH CLEANING PROJECTS- ORISSA , ANDAMAN, PORT BLAIR
BVG BEACH CLEANING PROJECTS- ORISSA , ANDAMAN, PORT BLAIRNeha Kajulkar
 
Film show production powerpoint for site
Film show production powerpoint for siteFilm show production powerpoint for site
Film show production powerpoint for siteAshtonCains
 
Film the city investagation powerpoint :)
Film the city investagation powerpoint :)Film the city investagation powerpoint :)
Film the city investagation powerpoint :)AshtonCains
 
VIP Call Girls Morena 9332606886 Free Home Delivery 5500 Only
VIP Call Girls Morena 9332606886 Free Home Delivery 5500 OnlyVIP Call Girls Morena 9332606886 Free Home Delivery 5500 Only
VIP Call Girls Morena 9332606886 Free Home Delivery 5500 Onlykhanf3647647
 
Call Girls In South Ex. Delhi O9654467111 Women Seeking Men
Call Girls In South Ex. Delhi O9654467111 Women Seeking MenCall Girls In South Ex. Delhi O9654467111 Women Seeking Men
Call Girls In South Ex. Delhi O9654467111 Women Seeking MenSapana Sha
 
Film show post-production powerpoint for site
Film show post-production powerpoint for siteFilm show post-production powerpoint for site
Film show post-production powerpoint for siteAshtonCains
 

Recently uploaded (20)

The Butterfly Effect
The Butterfly EffectThe Butterfly Effect
The Butterfly Effect
 
Vellore Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort Service
Vellore Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort ServiceVellore Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort Service
Vellore Call Girls Service ☎ ️82500–77686 ☎️ Enjoy 24/7 Escort Service
 
Production diary Film the city powerpoint
Production diary Film the city powerpointProduction diary Film the city powerpoint
Production diary Film the city powerpoint
 
Capstone slidedeck for my capstone project part 2.pdf
Capstone slidedeck for my capstone project part 2.pdfCapstone slidedeck for my capstone project part 2.pdf
Capstone slidedeck for my capstone project part 2.pdf
 
CASH PAYMENT ON GIRL HAND TO HAND HOUSEWIFE
CASH PAYMENT ON GIRL HAND TO HAND HOUSEWIFECASH PAYMENT ON GIRL HAND TO HAND HOUSEWIFE
CASH PAYMENT ON GIRL HAND TO HAND HOUSEWIFE
 
Jual Obat Aborsi Palu ( Taiwan No.1 ) 085657271886 Obat Penggugur Kandungan C...
Jual Obat Aborsi Palu ( Taiwan No.1 ) 085657271886 Obat Penggugur Kandungan C...Jual Obat Aborsi Palu ( Taiwan No.1 ) 085657271886 Obat Penggugur Kandungan C...
Jual Obat Aborsi Palu ( Taiwan No.1 ) 085657271886 Obat Penggugur Kandungan C...
 
Film show investigation powerpoint for the site
Film show investigation powerpoint for the siteFilm show investigation powerpoint for the site
Film show investigation powerpoint for the site
 
+971565801893>> ORIGINAL CYTOTEC ABORTION PILLS FOR SALE IN DUBAI AND ABUDHABI<<
+971565801893>> ORIGINAL CYTOTEC ABORTION PILLS FOR SALE IN DUBAI AND ABUDHABI<<+971565801893>> ORIGINAL CYTOTEC ABORTION PILLS FOR SALE IN DUBAI AND ABUDHABI<<
+971565801893>> ORIGINAL CYTOTEC ABORTION PILLS FOR SALE IN DUBAI AND ABUDHABI<<
 
Enjoy Night⚡Call Girls Palam Vihar Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Palam Vihar Gurgaon >༒8448380779 Escort ServiceEnjoy Night⚡Call Girls Palam Vihar Gurgaon >༒8448380779 Escort Service
Enjoy Night⚡Call Girls Palam Vihar Gurgaon >༒8448380779 Escort Service
 
Improve Your Brand in Waco with a Professional Social Media Marketing Company
Improve Your Brand in Waco with a Professional Social Media Marketing CompanyImprove Your Brand in Waco with a Professional Social Media Marketing Company
Improve Your Brand in Waco with a Professional Social Media Marketing Company
 
College & House wife Call Girls in Paharganj 9634446618 -Best Escort call gi...
College & House wife  Call Girls in Paharganj 9634446618 -Best Escort call gi...College & House wife  Call Girls in Paharganj 9634446618 -Best Escort call gi...
College & House wife Call Girls in Paharganj 9634446618 -Best Escort call gi...
 
Social media marketing/Seo expert and digital marketing
Social media marketing/Seo expert and digital marketingSocial media marketing/Seo expert and digital marketing
Social media marketing/Seo expert and digital marketing
 
Interpreting the brief for the media IDY
Interpreting the brief for the media IDYInterpreting the brief for the media IDY
Interpreting the brief for the media IDY
 
Unlock the power of Instagram with SocioCosmos. Start your journey towards so...
Unlock the power of Instagram with SocioCosmos. Start your journey towards so...Unlock the power of Instagram with SocioCosmos. Start your journey towards so...
Unlock the power of Instagram with SocioCosmos. Start your journey towards so...
 
BVG BEACH CLEANING PROJECTS- ORISSA , ANDAMAN, PORT BLAIR
BVG BEACH CLEANING PROJECTS- ORISSA , ANDAMAN, PORT BLAIRBVG BEACH CLEANING PROJECTS- ORISSA , ANDAMAN, PORT BLAIR
BVG BEACH CLEANING PROJECTS- ORISSA , ANDAMAN, PORT BLAIR
 
Film show production powerpoint for site
Film show production powerpoint for siteFilm show production powerpoint for site
Film show production powerpoint for site
 
Film the city investagation powerpoint :)
Film the city investagation powerpoint :)Film the city investagation powerpoint :)
Film the city investagation powerpoint :)
 
VIP Call Girls Morena 9332606886 Free Home Delivery 5500 Only
VIP Call Girls Morena 9332606886 Free Home Delivery 5500 OnlyVIP Call Girls Morena 9332606886 Free Home Delivery 5500 Only
VIP Call Girls Morena 9332606886 Free Home Delivery 5500 Only
 
Call Girls In South Ex. Delhi O9654467111 Women Seeking Men
Call Girls In South Ex. Delhi O9654467111 Women Seeking MenCall Girls In South Ex. Delhi O9654467111 Women Seeking Men
Call Girls In South Ex. Delhi O9654467111 Women Seeking Men
 
Film show post-production powerpoint for site
Film show post-production powerpoint for siteFilm show post-production powerpoint for site
Film show post-production powerpoint for site
 

OSMC 2018 | Learnings, patterns and Uber’s metrics platform M3, open sourced as a Prometheus long term storage backend by Rob Skillington

  • 1. osmc.de November 7, 2018 Rob Skillington Observability and M3, Uber NYC M3 The new age of metrics and monitoring in an increasingly complex world
  • 2. ● Working on monitoring “observability” “running computers” now at Uber for 3 continuous years ● Wrote a lot of database code in the hope that I wouldn’t get paged anymore (I don’t recommend it, but also.. please contribute!) ● Interested in reusable monitoring software, less interested in “all in one” ecosystems Why are you here?
  • 3. Agenda ● Where we came from and where we are going ● “High dimensionality metrics” ● Why use highly dimensional metrics ● Case study: Uber ● How to use M3, an open source metrics platform
  • 4. Where we came from and where we are going 4
  • 5. ● Nagios ○ For example, check a local HTTP service (but similar for many things): #!/bin/sh /usr/lib/nagios/plugins/check_http -I 127.0.0.1 -p 5390 -s OK -w 90 -c 180 Where we came from
  • 6. What does this look like?
  • 7. ● A simple way to interpret Nagios: ○ Execute scripts in a distributed way ○ View summary information of script execution success across machines ○ Drill down to view logs of single script execution ○ A way to send alerts What is this really?
  • 8. PromQL for “alert me when more than N kafka local agents are unhealthy” Wouldn’t it be nice? (adjust on the fly)
  • 9. ● Simple way to execute the actual checks and collect these metrics ○ https://github.com/google/cloudprober “Integration with open source monitoring stack of Prometheus and Grafana. Cloudprober exports probe results as counter based metrics that work well with Prometheus and Grafana.” ○ What about non-HTTP? (but use HTTP where possible) “Arbitrary, complex probes can be run through the external probe type. For example, you could write a simple script to insert and delete a row in your database, and execute this script through the 'EXTERNAL' probe type.” Can we do this today?
  • 10. Wouldn’t it be nice? (slice and dice by dimensions, look back 30 days) “Any dimension?” well.. within reason
  • 11. ● Metrics are great for getting a 10,000 ft view of your applications systems ● Also becoming increasingly valuable for drill downs when using “high cardinality” metrics ○ Example: P99 of requests broken down by ■ Region (US_East, EU_West, etc) ■ Endpoint ■ User segment (client attributes, device, operating system, etc) Wouldn’t it be nice? (to have metrics “for everything”)
  • 12. ● Plug and play compatibility for open source systems becoming common Wouldn’t it be nice? (to have metrics “for every type of thing”) Redis Prometheus Grafana Dashboard
  • 13. ● Going from a metrics graph directly to logs ○ Drill down into discovered issues from graphs or double check 5XXs match a theory ● Today we have to pivot and move to our logging platform and reconstruct a query that should surface events similar to the metrics query Wouldn’t it be nice? (easy navigability to detailed logs)
  • 14. context.Measure(“http_serve_request”). With(Tags{“route”:...,“status_code”:”400”,”city”:”berlin”)). Record(1, 42 * time.Millisecond). Log(Details{“error”:“foo”,“stack”:...,“other”:...}) Wouldn’t it be nice? (single instrumentation, both logs and metrics) Metrics Logs UI (pivot on both)
  • 15. Wouldn’t it be nice? (UIs autodiscover structure of metrics and logs)
  • 17. ● Take a single metric, such as status code delivered by our frontends ○ http_status_code ● At Uber, we have roughly a few hundred important HTTP routes we want to drill down into the status code with the following dimensions: ○ Route (few hundred) ○ Status code (less than a few common status codes) ○ Places of operation (few hundred) ■ failures sometimes isolated to place of operation ○ App device version (few hundred) High dimensionality metrics
  • 18. ● You can roll up metrics to make viewing fast ○ View status codes by route, but across all regions for single app version ● However, it is still incredibly high dimensional, just to store ○ Routes (say 500) * Status code (say 5) * Region (say 5) * Client version (say 20) = 250,000 unique time series ○ Expensive but not too bad..? However add any other dimensions and it gets out of control (any multiplier on 250k explodes to millions quickly) High dimensionality metrics
  • 19. Why use high cardinality metrics? 19
  • 20. ● Really useful for drill downs when monitoring lots of distinct things that can fail independently of each other, even if they are the same software but running with subtly different attributes (which is an increasing trend) ○ different region, configuration, client/server versions, upstream or downstream, protocol, attributes of a request such as “type of a search” or “search in a category”, etc.). ● Time series are stored and compressed much higher than log data so you can keep much more if the records have common values. They are also much faster to fetch, visualize, and sub-aggregate together. Why use high cardinality metrics?
  • 21. ● Log data Values unaggregated: {status_code: 400, user_agent: ios_11, client_version: 103, at: 2018-08-01 12:00:01} {status_code: 400, user_agent: ios_11, client_version: 103, at: 2018-08-01 12:00:05} {status_code: 400, user_agent: ios_11, client_version: 103, at: 2018-08-01 12:00:07} {status_code: 400, user_agent: ios_11, client_version: 103, at: 2018-08-01 12:00:11} ● Metrics data Key: {status_code: 400, user_agent: ios_11, client_version: 103, at: 2018-01-01 12:00:00} Values aggregated at 10s and TSZ compressed to ~1.4 bytes per float value: {at: 2018-08-01 12:00:00, value: 3} {at: 2018-08-01 12:00:10, value: 1} Generally...
  • 22. ● A manageable way to scale out capacity ○ A single Prometheus instance can hold N million time series (where N does not usually reach the double digits, even on very big machines) Ok great but what do I need? “We good yeah?”
  • 23. ● It’s a little like playing tetris, can I fit my high cardinality metrics into an existing Prometheus instance or do I setup a new one, what happens when it eclipses a single instance? Ok great but what do I need?
  • 25. ● ~4K Microservices with a central Observability self-service platform ● Onboarding? None, simply start emitting metrics ● Used for all manner of things: ○ Real-time alerting using application metrics (e.g., p99 response time) ○ Tracking business metrics (e.g., number of Uber rides in Berlin) ■ Why? So easy to get started ■ metrics.Tagged(Tags{“region”: “berlin”}).Counter(“ride_start”).Inc(1) ○ Capacity planning using system metrics (e.g., container load average) ○ And much more … Uber and the M3 metrics platform
  • 28. End User Code (“Biz logic”) RPC Storage (C*/Redis/…) ...
  • 29. End User Code (“Biz logic”) RPC Storage (C*/Redis/…) ... Library owners: - Dashboard panel template = f(serviceName) - Ensure library emits metrics following given template Application devs: - Service: uses library - Provide “serviceName” at time of generation
  • 30.
  • 31.
  • 32.
  • 34. Scale - Ingress 400-700M Pre-aggregated Metrics/s (~130Gbits/sec) (random week when I was making these slides)
  • 35. Scale - Ingress ~29M Metrics Stored/s (not including Replica Factor = 3) (~50Gbits/sec) (random week when I was making these slides)
  • 36. Scale - Ingress ~ 9B Unique Metric IDs (trending down due to metrics falling out of retention) (random week when I was making these slides)
  • 37. Scale - Egress ~ 30B data points per second (~20 gigabits/sec) (services 150,000 scheduled “realtime” alerts) (random week when I was making these slides)
  • 38. Ok, but why M3?
  • 39. ● The best onboarding of a team or service, is no onboarding ○ Just start emitting metrics from an application or probe ○ Which is fine if you can just expand your central metrics cluster in an easy way ● The best operators of computers, is computers ○ Scripts don’t cut it after someone runs it the wrong way just N times, where N is your pain threshold for correcting output of scripts triggered by humans ● The holy grail is of course, is a system that looks after itself (for the most part) Needed turnkey way to just “add capacity”
  • 40. ● 2015 - 2016: M3 with Cassandra ○ Up to 80k writes/sec, poor compression ○ Replication but only RF=2 ■ RF=3 too expensive, already very costly with RF=2 ■ Repairs too slow to be feasible ○ Required expensive SSDs and hungry on CPU ■ Heavy compactions even with DTCS required top end CPU, RAM, disks ○ 16X YoY growth resulted in > 1500 hosts ■ Cost + Operational overhead not sustainable Brief History of M3
  • 41. ● 2016 - Now: M3 with M3DB ○ Up to 500k writes/sec, 10x compression vs Cassandra using much less disk ■ This is while using significantly cheaper CPU and disk ○ Reduced cost of running M3 to 2.5% of all hardware/compute in use by Uber ■ This is with little-to-no restrictions on all usage of M3 amongst teams ○ Continually making improvements to further reduce footprint and increase density in terms of throughput and on disk space usage Brief History of M3
  • 42. M3DB: High-Level Architecture ● Think Log Structured Merge tree (LSM).. but with much less compaction ● Typical LSM will have levelled or size based compaction, M3DB has time window compaction which by default avoids any data compaction (unlike Cassandra time window compaction)
  • 43. M3DB - Design Principles ● Optimized for high read and write volume per machine ○ vs. those built on large data storage tech (eg. OpenTSDB/HBASE) ● Optimized to reduce cost for large metrics warehouse (custom compression, etc) ○ vs. more generic IOT/SQL base TSDBs (eg TimeScale) ○ (if you want the most instrumentation/insight for your cost, this matters) ● Strongly consistent cluster membership backed by etcd with quorum writes ○ vs. eventual in Cassandra or IronDB ○ (avoid putting up with Gossip hassles with hundreds of machines) ● Low-Latency for metrics “Time To Visible” as we alert off our persisted data ○ Optimized for smaller batch size writes vs larger (InfluxDB)
  • 44. ● Support for high cardinality queries over large data sets (petabytes) ○ Data cannot live in “lukewarm” storage (Thanos uses S3, Cortex uses variety of backends for its index, however Cassandra doesn’t support full text search so this is done client side which makes it not great with a very large index) ● Optimized file-system storage with no need for compactions ○ We have fairly consistent ingestion load ○ We don’t downsample async due to added cost - do more with less! ● Optimized for node startup write availability and self-recovery after being down ○ Larger clusters = more HW failures ○ Need to optimize cluster upgrades with new tech ○ Better for compute platforms M3DB - Design Principles
  • 45. So how can you use M3? 45
  • 46. Application M3 - OSS (stable) Prometheus Grafana AlertManager M3DB Index M3 Coordinator etcd Application M3DB Read/Write
  • 47. Application M3 - OSS (beta) M3DB Grafana PromQL (beta) Grafana/Other Alert Engine M3 Aggregator M3 Collector M3 Query Application ● Limited guides on how to use this configuration currently
  • 48. H1 2019 ● Finish new dedicated scalable open source M3Query service for PromQL and Graphite ● Open source support for Graphite metrics ● Better guides for M3 Aggregator and M3 Collector usage ● Kubernetes Operator ● CNCF Sandbox Submission H2 2019 ● You tell us…. on Gitter (gitter.im/m3db) or mail (m3db@googlegroups.com) or GitHub issues (github.com/m3db/proposal/issues) M3 - Roadmap
  • 49. ● PromQL ● Graphite ● M3QL Application M3 - OSS (future) M3DB Grafana Grafana/Other Alert Engine M3 Aggregator M3 Collector M3 Query Application Application Statsd / Carbon App Application Prometheus M3 Coordinator Application Read/Write
  • 50. You can also find us... ● On Google Hangout / Zoom (because video internet doesn’t suck all the time anymore) ● Book some time at https://m3.appointlet.com
  • 51. Questions? Slides https://bit.ly/m3-osmc GitHub and Web https://github.com/m3db/m3, https://m3db.io Mailing List https://groups.google.com/forum/#!topic/m3db Gitter (like IRC, except.. it’s not IRC 😔) https://gitter.im/m3db M3 Eng Blog Post https://eng.uber.com/m3 M3
  • 52. Thank you Proprietary © 2018 Uber Technologies, Inc. All rights reserved. No part of this document may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage or retrieval systems, without permission in writing from Uber. This document is intended only for the use of the individual or entity to whom it is addressed. All recipients of this document are notified that the information contained herein includes proprietary information of Uber, and recipient may not make use of, disseminate, or in any way disclose this document or any of the enclosed information to any person other than employees of addressee to the extent necessary for consultations with authorized personnel of Uber. Questions: email ospo@uber.com Follow our Facebook page: www.facebook.com/uberopensource