m3 and prometheus
play

M3 and Prometheus Monitoring at Planet Scale for Everyone Berlin, - PowerPoint PPT Presentation

M3 and Prometheus Monitoring at Planet Scale for Everyone Berlin, 2019-11-06 Rob Skillington & ukasz Szczsny Who are we? Rob Skillington CTO at Chronosphere @robskillington M3DB Creator OpenMetrics Contributor ukasz Szczsny


  1. M3 and Prometheus Monitoring at Planet Scale for Everyone Berlin, 2019-11-06 Rob Skillington & Łukasz Szczęsny

  2. Who are we? Rob Skillington CTO at Chronosphere @robskillington M3DB Creator OpenMetrics Contributor Łukasz Szczęsny Snr SRE at Chronosphere @wybczu M3 Contributor

  3. Let’s talk Monitoring an increasing number of things… Metrics being used as a platform more than ever... Operating in many regions or environments… M3 and Prometheus/Graphite…

  4. High dimensionality metrics? 4

  5. Example system being monitored mysql client frontend app v1.3 redis eu-west mysql client v2.0 frontend app redis eu-north client v1.3 client v2.0

  6. Example system being monitored Which code path to debug? Need to detect failure and isolate to: mysql route = /api/search ● client region = eu-west frontend app ● v1.3 client-version = v2.0 ● redis redis eu-west mysql client frontend app v2.0 redis redis eu-north client v1.3 client v2.0

  7. Let’s use high dimensionality metrics Let’s debug this using HTTP status code delivered by frontends: ● http_status_code ○ Route Status Code Region Client App Version (100?) (5?) (12?) (40?) /api/search 2xx eu-east 1.3 /api/order 4xx eu-west 2.0 .... ...

  8. Revisiting this example... Failure is isolated to: route = /api/search ● region = eu-west ● mysql client-version = v2.0 client ● frontend app v1.3 redis redis eu-west mysql client frontend app v2.0 redis eu-north client v1.3 client v2.0

  9. Ideally we would see...

  10. How many time series is that? Route Status Code Region Client App Version (100?) (5?) (12?) (40?) /api/search 2xx eu-east 1.3 /api/order 4xx eu-west 2.0 .... ... 100 routes * 5 status codes * 12 regions * 40 client versions = 240,000 unique time series

  11. Partial-solution #1 You can roll up metrics to make viewing fast region=eu-west client=v1.2 status=2xx ... region=eu-north client=v1.3 status=2xx ... status=2xx route=/api/search region=us-west client=v2.0 status=2xx ... region=eu-west client=v3.2 status=5xx ... status=4xx route=/api/search region=eu-north client=v3.1 status=5xx ... status=5xx route=/api/search region=eu-west client=v1.1 status=5xx ... region=eu-north client=v1.4 status=5xx ... region=us-west client=v2.3 status=5xx ...

  12. For drill down and high granular alerting 240k time series, expensive but not too bad..? However add any other dimensions and it gets out of control (any multiplier on 240k explodes to millions quickly) e.g. Unique country code user = 249 user_country=de client=v1.0 status=5xx ... status=5xx route=/api/search ... user_country=us client=v1.3 status=5xx ... user_country=lt client=v2.0 status=5xx ... user_country=pl client=v2.0 status=5xx ... ...

  13. What is Prometheus? What is M3? First built at SoundCloud (began Built at Uber to scale monitoring 2012, open source in 2014 ) horizontally and cost effective (began An open source monitoring 2015, open source in 2018) ● system and time series Distributed monitoring system ● database. and time series database, All-in-one single node compatible as remote storage for ● monitoring solution using Prometheus. metrics.

  14. Ok great, but what do I need? A single Prometheus instance can hold a reasonable amount of data (and you should always get started using Prometheus) “This is fine.. I’m okay with the events that are unfolding currently”

  15. Ok great, but what do I need?

  16. Ok great, but what do I need? Can I fit a service’s high cardinality metrics into an existing Prometheus instance? How do I scale up easily? mysql my-frontend my-api my-cache

  17. So what is M3 and how does it help? Horizontally scalable platform that supports multiple metric formats Grafana Alerting Prometheus Graphite (PromQL, Graphite) Engines M3 M3 Aggregation M3DB M3 Query M3DB M3DB Coordinator Cloud Region #0 Cloud Region #N

  18. Why M3 1. Suitable for many scenarios 2. Scalable to billions of metrics 3. Focus on simple operation

  19. 1. Suitable for many scenarios Cloud Native, Kubernetes or On Prem, Multi-Region, Prometheus and Graphite compatible

  20. 1. Suitable for many scenarios M3 and Prometheus ● Store metrics for weeks, months or years ● Store metrics at different retention based on mapping rules (e.g. app:nginx endpoints:/api*) ● Scale up storage just by adding more nodes

  21. Prometheus My App Grafana Prometheus Alerting

  22. DEMO

  23. Prometheus My App Grafana Prometheus Alerting Prometheus remote read and write to M3DB M3DB M3DB M3DB

  24. 1. Suitable for many scenarios M3 and Graphite ● Ingest Carbon TCP protocol ● Support for Graphite query API

  25. Graphite My App Carbon TCP line protocol ingestion Grafana M3DB M3DB M3DB Store Graphite and Alerting Prometheus metrics side-by-side

  26. 2. Scalable to billions of metrics

  27. 2. Scalable to billions of metrics M3 at scale ● Collects metrics for 1000s of applications ● No onboarding to monitoring or provisioning of servers (just add storage nodes as required)

  28. 2. Scalable to billions of metrics Reverse index uses FST segments, like ElasticSearch with Apache Lucene. It can regexp over billions of metric names and dimensions, unlike other solutions out there. M3 Query m3coordinator Each storage node Find metrics matching query and return in parallel knowing Node ... exactly where to extract series M3DB M3DB M3DB M3DB data from local store. Node Node Node

  29. Global view with region-local storage Grafana Alerting PromQL or HTTP Load Graphite query Balancer (hit any region) Region 1 Region 2 Region 3 M3 Query M3 Coordinator M3 Query M3 Query M3 Coordinator M3 Coordinator M3DB M3DB M3DB M3DB M3DB M3DB M3DB M3DB M3DB Multi-Region

  30. 2. Scalable to billions of metrics Architected for Reliability and Scale ● Global metrics collection and query ● Low inter-region network bandwidth, data always kept in region ● Replication across Availability Zones within a region as soon as metric collected

  31. 3. Focus on simple operation

  32. 3. Focus on simple operation M3 can be deployed on premise without any ● dependencies - it’s easy to get started. One binary and a YAML configuration file ○ Can be easily deployed using your favourite config ○ management tool Clustered version is open source ● HA setup is pretty straightforward ○ Scaling a cluster used to require a lot of manual work ○

  33. 3. Focus on simple operation M3 runs on Kubernetes and the M3DB k8s operator ● can manage the cluster for you! See more at https://github.com/m3db/m3db-operator

  34. Why M3 1. Suitable for many scenarios 2. Scalable to billions of metrics 3. Focus on simple operation

  35. Come say hi!

  36. Thank you and Q&A M3 GitHub Monorepo (Apache 2 licensed): https://github.com/m3db/m3 M3 Slack: https://bit.ly/m3slack Chronosphere: https://chronosphere.io Twitter: https://twitter.com/chronosphereio

  37. M3 Links and References License: Apache 2 Website: https://www.m3db.io Docs: https://docs.m3db.io Mailing list: https://groups.google.com/forum/#!forum/m3db

  38. M3 and Prometheus with read/write isolation My App Prometheus Grafana Dedicated M3 M3 M3 Query Coordinator local Coordinator to availability zone Alerting to coordinate replication Dedicated M3 Query to isolate M3DB queries impacting M3DB M3DB Single Region writes

  39. What is Prometheus and M3 used for? Real time alerting of application metrics

  40. What is Prometheus and M3 used for? Tracking business metrics (e.g., searches for “books” with category “biographies” in a region): m.Tagged(Tags{region=“eu-west”,category=”books”,subcategory=”biographies”}).Counter(“searches”).Inc(1)

  41. What is Prometheus and M3 used for? Infrastructure metrics such as network routing and datacenter health

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend