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
【視聴者参加型!】AWSセキュリティアンチパターンクイズ
syoshie
0
430
Kiro Crewしか勝たん!?
miu_crescent
PRO
0
180
Jetpack Compose で挑む新聞紙面UI ─ 複合ジェスチャー・ポリゴン記事領域・適応的ページ構成という3つの壁/droidkaigi2026
nikkei_engineer_recruiting
0
230
プロダクト思考 × 基盤思考を AIで実現する Compound Engineering
tkc66buzz
1
270
Azure Cost Management の FOCUS コストデータを迷わず読むための“3つの軸”
tetsuyaooooo
0
150
Bet AI Day 2026丨AIを「使う」から、AIが「働く」へ ― LayerXが進める「組織AI」の社会実装
layerx
PRO
3
2.6k
AI-DLCって実際どう? 〜聞きたいこと全部聞いてみる〜
news_it_enj
0
230
PM領域でのAI Agentの活用
lycorptech_jp
PRO
0
270
PfEingのアプローチで働こう
rindrics
0
180
Self Healing Rollouts: Automating Production Fixes with Agentic AI
kdubois
0
160
リージョンの壁を越える、 ちょっと変わったAWSサービスの話
falken
PRO
0
260
Bet AI Day 2026丨バクラク Autopilot、業務システムの再設計
layerx
PRO
2
1.5k
Featured
See All Featured
My Coaching Mixtape
mlcsv
0
310
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.9k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
53k
Making the Leap to Tech Lead
cromwellryan
135
10k
WCS-LA-2024
lcolladotor
0
820
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Documentation Writing (for coders)
carmenintech
77
5.5k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
490
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
270
sira's awesome portfolio website redesign presentation
elsirapls
0
400
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
400
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!