Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Prometheusでデータの水平分割を試みる/Let's split prometheu...
Search
watawuwu
January 15, 2020
Technology
11k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Prometheusでデータの水平分割を試みる/Let's split prometheus data
watawuwu
January 15, 2020
More Decks by watawuwu
See All by watawuwu
データルーター?Vector/Getting Started with Vector
watawuwu
6
1.1k
KubernetesでWebアプリケーションをリリースするまでに必要なものは/What you need with Kubernetes
watawuwu
10
1.9k
Thanosってどうですか?/Getting Started with Thanos
watawuwu
1
1.1k
Argo入門/Getting Started with Argo
watawuwu
0
1.1k
Concourse入門 / Concourse Getting Started
watawuwu
3
2.3k
Other Decks in Technology
See All in Technology
AI、CDK と協働する Full TypeScript アプリケーション開発 / Full TypeScript Application with AI and CDK
geekplus_tech
2
390
OpenTelemetryにおけるGoのゼロコード・コンパイル時計装について #fukuokago
quiver
0
110
Claude Code公式skillで 自分の仕事を少しずつ手放そう!(Claude Code開発ノウハウ大公開スペシャル by クラスメソッド)
kaym
1
490
OPENLOGI Company Profile for engineer
hr01
1
74k
「最後に責任を取るのはチーム」— 人間のPRレビューを最小化してアップデートしたメンタルモデル
jnishime_dresscode
0
920
SoccerMaster: A Vision Foundation Model for Soccer Understanding
kzykmyzw
0
140
ボーイスカウトルールでメモリやスキルを改善しよう
azukiazusa1
4
1.4k
10年目を迎えた「ABEMA」がどのように AI 活用を推進して、AI 駆動開発にシフトしているのか / How ABEMA, entering its 10th year, is promoting the use of AI and shifting toward AI-driven development
miyukki
0
280
SRE本の知られざる名シーン / The Hidden Gems of Google SRE Book
nari_ex
1
420
凡エンジニアがこの先生きのこるためには。〜TypeScript完全に理解したい〜
alchemy1115
2
310
ガバナンスの「ちょうどいい落とし所」を探れ!開発スピードを妨げない運用判断の勘所 / SRE NEXT 2026
genda
1
250
“それは自分の仕事じゃない"を越えて行け
yuukiyo
1
480
Featured
See All Featured
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
290
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.2k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.1k
How to Think Like a Performance Engineer
csswizardry
28
2.7k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
230
Agile that works and the tools we love
rasmusluckow
331
22k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Statistics for Hackers
jakevdp
799
230k
エンジニアに許された特別な時間の終わり
watany
108
250k
Building Applications with DynamoDB
mza
96
7.1k
Intergalactic Javascript Robots from Outer Space
tanoku
273
27k
GitHub's CSS Performance
jonrohan
1033
470k
Transcript
Prometheus で データ分割を試みる Prometheus Meetup Tokyo #3
profile: name: Wataru Matsui org: [ zlab.co.jp ] twitter: @watawuwu
Agenda • Motivation • Non-goal • How to respond to
increase • How to scale out • Configuration • Browse and Aelrts • Issue
Motivation
Address growing data
Non-goal
× Highly available ◦ Data redundancy × Long term storage
How to respond to increase in memory and storage usage
• Reduce data retention • Prolong scrape interval • Reduce
unnecessary metrics • Scale up • Scale out • Remote Write/Storage
How to scale out without remote storage
Prometheus is easy to scale out Pod Prometheus Pod Pod
Pod Prometheus
Configuration
A. Per scrape rule • For popular settings in Kubernetes
◦ Container Metrics(cAdvisor) ◦ Node Metrics ◦ Application Metrics cAdvisor Node Application
A. Per scrape rule • Application Metrics can be easily
split into multiple scrape rules App A App B - job_name: 'app-xxx' kubernetes_sd_configs: - role: endpoints relabel_configs: - source_labels: [__meta_kubernetes_service_annotation_app_xxx_scrape] action: keep
B. Per metrics(Not Time series) • Same scrape target, but
decide whether to scrape by metrics name metric_relabel_configs: - source_labels: [__name__] action: drop regex: 'container_fs' cAdvisor cAdvisor
C. Per label hash • Switch targets by label hash
- source_labels: [__address__] modulus: ${shard_total} target_label: __tmp_hash action: hashmod - source_labels: [__tmp_hash] regex: ${shard_num} action: keep cAdvisor cAdvisor addr: 10.26.80.18 addr: 10.26.80.19 shard_num: 0 shard_num: 1 shard_total: 2
Browse And Alerts
A. Aggregate using Remote read API remote_read: - url: http://prometheus-01:9090/api/v1/read
read_recent: true - url: http://prometheus-02:9090/api/v1/read read_recent: true - url: http://prometheus-03:9090/api/v1/read read_recent: true
B. Aggregate using Thanos Querier Ruler Sidecar Sidecar Sidecar
Issue
× Not autoscale × Complicated by redundancy × Can't resharding
or rebalancing
Thanks!