Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
PrometheusでKubernetesの高速オートスケールを実現した話
Search
Atsushi Tanaka
June 01, 2018
1.7k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
PrometheusでKubernetesの高速オートスケールを実現した話
Atsushi Tanaka
June 01, 2018
More Decks by Atsushi Tanaka
See All by Atsushi Tanaka
プロダクト専任SREを置かずに 信頼性を追求する
bgpat
1
110
OpenCensusと歩んだ7年間
bgpat
0
760
SREだけど社内営業組織の業務改善をしてみた
bgpat
0
970
ウォンテッドリーにおける Platform Engineering
bgpat
0
890
Wantedly での Datadog 活用事例
bgpat
2
6.4k
KubernetesでDatadogを飼うならオートディスカバリーを使わないと損
bgpat
2
1.1k
マイクロサービス基盤にフルマネージドサービスではなくKubernetesを選択する理由
bgpat
12
4.7k
400万ユーザーに価値を届けるエンジニアを を支えるインフラ基盤
bgpat
3
580
Ruby製社内ツールのGo移行
bgpat
2
900
Featured
See All Featured
Utilizing Notion as your number one productivity tool
mfonobong
4
600
The Limits of Empathy - UXLibs8
cassininazir
1
690
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
420
Test your architecture with Archunit
thirion
2
2.4k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.6k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
440
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Accessibility Awareness
sabderemane
1
220
The SEO identity crisis: Don't let AI make you average
varn
0
560
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
460
Joys of Absence: A Defence of Solitary Play
codingconduct
1
530
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
3
1.3k
Transcript
©2018 Wantedly, Inc. PrometheusͰKubernetesͷߴΦʔτεέʔϧΛ࣮ݱͨ͠ Cloud Native Meetup Tokyo #2 LT
1.Jun.2018 - Atsushi Tanaka @bgpat
©2018 Wantedly, Inc. Atsushi Tanaka • @bgpat • Infrastructure Engineer
at Wantedly, Inc. • Favorites: Kubernetes, Docker, Golang JavaScript, Vue.js
©2018 Wantedly, Inc. w Φʔτεέʔϧ͕͍ w ͘εέʔϧ͢Δํ๏ w ϓϩμΫγϣϯͰͬͯΈͨ ͢͜ͱ
©2018 Wantedly, Inc. ࠓ·Ͱ͍ͬͯͨΦʔτεέʔϧ Horizontal Pod Autoscaler (HPA) + CPU
$16ෛՙ͕ߴ͘ͳΔͱεέʔϧ
©2018 Wantedly, Inc. ࠓ·Ͱ͍ͬͯͨΦʔτεέʔϧ $16ෛՙ͕ߴ͘ͳΔͱεέʔϧ ϝϦοτ w ظతͳΞΫηεͷ૿Ճʹڧ͍ w ݹ͍όʔδϣϯͰ͑Δ
Horizontal Pod Autoscaler (HPA) + CPU
©2018 Wantedly, Inc. ࠓ·Ͱ͍ͬͯͨΦʔτεέʔϧ $16ෛՙ͕ߴ͘ͳΔͱεέʔϧ ϝϦοτ w ظతͳΞΫηεͷ૿Ճʹڧ͍ w ݹ͍όʔδϣϯͰ͑Δ
σϝϦοτ w ॠؒతͳεύΠΫʹऑ͍ Horizontal Pod Autoscaler (HPA) + CPU
©2018 Wantedly, Inc.
©2018 Wantedly, Inc.
©2018 Wantedly, Inc.
©2018 Wantedly, Inc. શવؒʹ߹͍ͬͯͳ͍
©2018 Wantedly, Inc. ͬͱૣ͘εέʔϧͯ͠΄͍͠
©2018 Wantedly, Inc. εύΠΫʹڧ͍Φʔτεέʔϧ HPA + Custom Metrics ΞϓϦέʔγϣϯ͕ܾΊͨج४Ͱεέʔϧ w
W͔Β͑Δ w ྫ͑ʜϦΫΤετ ίωΫγϣϯ w Ξμϓλ͕ඞཁ
©2018 Wantedly, Inc. εύΠΫʹڧ͍Φʔτεέʔϧ HPA + Custom Metrics ΞϓϦέʔγϣϯ͕ܾΊͨج४Ͱεέʔϧ w
W͔Β͑Δ w ྫ͑ʜϦΫΤετ ίωΫγϣϯ w Ξμϓλ͕ඞཁˠ,VCFSOFUFTʹϝτϦΫεΛૹΔͨΊͷαʔόʔ
©2018 Wantedly, Inc. HPA + Custom Metrics k8s-prometheus-adapter 1SPNFUIFVT͕ऩूͨ͠ϝτϦΫεΛ,VCFSOFUFTʹૹͬͯ͘ΕΔαʔόʔ
©2018 Wantedly, Inc. ͋ͱج४ʹ͢ΔΛܾΊͯ Prometheus͕ಡΊΔϑΥʔϚοτͰग़ྗ͢Δ͚ͩ
©2018 Wantedly, Inc. ͋ͱج४ʹ͢ΔΛܾΊͯ Prometheus͕ಡΊΔϑΥʔϚοτͰग़ྗ͢Δ͚ͩ Ͱ͖ΕΠϯϑϥϨΠϠʔͰղܾ͍ͨ͠
©2018 Wantedly, Inc. εέʔϧͷఆج४ /HJOYͷTUVC@TUBUVT location /basic_status { stub_status; }
Active connections: 291 server accepts handled requests 16630948 16630948 31070465 Reading: 6 Writing: 179 Waiting: 106
©2018 Wantedly, Inc. εέʔϧͷఆج४ /HJOYͷTUVC@TUBUVT location /basic_status { stub_status; }
Active connections: 291 server accepts handled requests 16630948 16630948 31070465 Reading: 6 Writing: 179 Waiting: 106 ͪίωΫγϣϯΛ͏
©2018 Wantedly, Inc. εέʔϧͷఆج४ TUVC@TUBUVTΛFYQPSUFSͷܗࣜʹ͍ͨ͠ # HELP nginx_connections_current Number of
connections currently processed by nginx # TYPE nginx_connections_current gauge nginx_connections_current{state="active"} 2 nginx_connections_current{state="reading"} 0 nginx_connections_current{state="waiting"} 1 nginx_connections_current{state="writing"} 1
©2018 Wantedly, Inc. ,VCFSOFUFST "1*4FSWFS LTQSPNFUIFVTBEBQUFS 1SPNFUIFVT )PSJ[POUBM 1PE "VUPTDBMFS
%FQMPZNFOU 3FQMJDB4FU 1PE 1PE 1PE OHJOY@FYQPSUFS /HJOY TUVC@TUBUVT
©2018 Wantedly, Inc. ݁Ռ w සൟʹεέʔϧ͢ΔΑ͏ʹͳͬͨ w $16ෛՙ͕҆ఆͨ͠ w Ξϥʔτ͕໐Βͳ͘ͳͬͨ
©2018 Wantedly, Inc. ߴΦʔτεέʔϧ͕࣮ݱͰ͖ͨ
©2018 Wantedly, Inc. https://github.com/bgpat/k8s-hpa-example