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
MySQLテーブル毎のデータサイズ集計をDatadog × Prometheus Export...
Search
VTRyo
January 19, 2024
Technology
0
270
MySQLテーブル毎のデータサイズ集計をDatadog × Prometheus Exporter × Kubernetesを使って自動化する / Automate data size aggregation for each MySQL table using Datadog, Prometheus Exporter and Kubernetes
2024/1/19 成長を続けるfreeeとマネーフォワードはサービスの信頼性をどう担保しているのか?
https://freee.connpass.com/event/304624/
VTRyo
January 19, 2024
Tweet
Share
More Decks by VTRyo
See All by VTRyo
2ヶ月かかるDBアップグレード検証を最大2週間に短縮した自作Go製CLIツール「Platinum」を紹介する / Introducing Go CLI tool "Platinum" for shortened DB upgrade validation
vtryo
3
380
自分だけの、誰も想像できないキャリアの育て方 ~懇親会で実践できる!偶然から始めるキャリアプラン~ / Career planning starting by luckly
vtryo
2
1.1k
なぜSREをはじめるのは難しいのか / Why is it hard to start SRE?
vtryo
1
460
Datadogでシステムとアプリケーション情報を民主化をはじめよう / System and Application information democratize with datadog
vtryo
2
2.6k
サービスと開発者に最も近いProduct SREsとして 取り組んでいるコト / Work as Product SREs closest to services and developers
vtryo
0
2.5k
一人から始めるプロダクトSRE / How to start SRE in a product team, all by yourself
vtryo
4
12k
へんなSlackスタンプMeetup
vtryo
0
330
Kubernetes × CircleCIで実現する安心安全Deploy / Safe Deploy with Kubernetes and CircleCI
vtryo
1
3k
【社内勉強会用】SQLアンチパターン / SQL Antipatterns study
vtryo
0
2.1k
Other Decks in Technology
See All in Technology
まだ間に合う! 生成AIトレンド一挙おさらい & AWSのBedrockに入門しよう
minorun365
PRO
4
380
Nuxt × Vue Router の力を最大限に引き出す機能を紹介
ytr0903
2
530
生成AIの活用パターンと継続的評価
asei
7
830
Trusted Types API と Vue.js
lycorptech_jp
PRO
1
180
最新のWasm事情
askua
5
2.6k
開発健全性の可視化と開発者体験の改善 ~ Compassでエンジニアに活力と生産性を ~
atlassianjapan
0
110
Demystifying Vite Internals
nozomuikuta
3
980
日経ビジュアルデータにおける スクロールテリングと地図/nikkei-tech-talk-26
nikkei_engineer_recruiting
0
130
Mobbing Practices
kawaguti
PRO
1
230
40代後半で開発エンジニアからクラウドインフラエンジニアにキャリアチェンジし、生き残れる自信がようやく持てた話
iwamot
9
8.4k
Deep dive into Nuxt Server Components
wattanx
1
1.6k
ActiveRecord SQLインジェクションクイズ (Rails 7.1.3.4)
kozy4324
3
280
Featured
See All Featured
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
27
1.9k
GraphQLの誤解/rethinking-graphql
sonatard
66
9.9k
A designer walks into a library…
pauljervisheath
202
24k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
9
660
Testing 201, or: Great Expectations
jmmastey
38
7k
Designing Experiences People Love
moore
138
23k
The Art of Programming - Codeland 2020
erikaheidi
51
13k
Embracing the Ebb and Flow
colly
84
4.4k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
10 Git Anti Patterns You Should be Aware of
lemiorhan
653
59k
Building an army of robots
kneath
302
42k
Typedesign – Prime Four
hannesfritz
39
2.4k
Transcript
None
- 人事労務SaaSのSRE - SRE NEXT 2022 「一人から始めるプロダクトSRE」 - Developers boost
2023 ベストスピーカー賞 - 同人・商業で作家活動 etc… 趣味は🍺と🍛とSAUNAです (🍺もSAUNAも資格有) 気になったら懇親会で…! • Money Forward, Inc 2021~ • SREチームの立ち上げ & Lead • 現在はIndividual Contributorに
SNSハッシュタグ #sre_fxm
信頼性って言われすぎて 段々よくわからなくなってくることない? #sre_fxm
信頼できるサービス = ? #sre_fxm
信頼できるサービスの特徴 3選 ユーザは利用目的を 達成できる 安心して 利用できる どんどん 進化する さまざまなメトリクスを使って 我々は日々モニタリングして守っている
#sre_fxm
お金を生み出しているシステムが 常に健全であることは ビジネス的にも価値がある #sre_fxm
マネーフォワード クラウド給与は 9年 目 #sre_fxm
常に約10年後を考えて システム開発している人 ✋ #sre_fxm
10年後どうなっているか予想できない #sre_fxm
しかし、想定せずに 運用するフェーズではなくなる瞬間がくる #sre_fxm
信頼できるサービスの特徴 3選 ユーザは利用目的を 達成できる 安心して 利用できる どんどん 進化する 成長とともに重要視する メトリクスは変わる
#sre_fxm
着実にユーザとデータ量が増えた先 #sre_fxm
運用作業限界への恐怖 #sre_fxm
"テーブルサイズ限界"のXデー #sre_fxm
Amazon Aurora 1AWS公式によると128TiBのサイ ズをサポートしている *1 MySQL 8.0のInstant DDLを使 えばある程度の規模までは運用に 問題がない
*1 https://docs.aws.amazon.com/ja_jp/AmazonRDS/latest/AuroraUserGuide/Aurora.Overview.StorageReliability.html #sre_fxm
弊チームトップエンジニアよる 検証により 限界サイズしきい値が判明する #sre_fxm
もともとSREチームではDBのサイズ推移を (思い出したときに) SQLで取ってGSSで分析していた メトリクス化して 継続的にモニタリングしよう (タイトル回収) #sre_fxm
MySQLテーブル毎のデータサイズ集計を Datadog × Prometheus Exporter × Kubernetes を使って自動化する #sre_fxm
Overview #sre_fxm
1. k8s manifest 2. MySQL settings 3. Datadog Dashboard view
#sre_fxm
k8s Manifest 公式はDockerでの使用方法のみ k8s用にごにょごにょする #sre_fxm
k8s Manifest - annotation Datadogでopenmetricsを使う 部分 init_config: {}を書き忘れて ハマった #sre_fxm
MySQL settings UserとGRANTが必要 information_schemaを取得できる最低限のもの - PROCESS - SELECT #sre_fxm
MySQL settings Q. すべてのテーブルに対してGRANTする必要がある? A. 「ユーザが適切なアクセス権限を持っているオブジェクトに対するテーブル行 だけ見れる」ということなので、付与しないと取得できない https://dev.mysql.com/doc/refman/5.7/en/information-schema-introduction.html#information-schema-privileges #sre_fxm
Datadog Dashboard view メトリクスとして取得さえできれば Dashboardであらゆる形式にして 表示できる しきい値Alertも可能に! #sre_fxm
Toil 解消! #sre_fxm
急成長サービスには地道な取り組みがつきもの 1. きたるべき未来に備えるためにモニタリングが必要だった 2. 手動で情報を取りに行っていた 3. しきい値が明確になったので自動化に踏み切った #sre_fxm
ご清聴 ありがとうございました