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
継続的なAIコスト最適化
bgpat
1
350
プロダクト専任SREを置かずに 信頼性を追求する
bgpat
1
150
OpenCensusと歩んだ7年間
bgpat
0
780
SREだけど社内営業組織の業務改善をしてみた
bgpat
0
1k
ウォンテッドリーにおける Platform Engineering
bgpat
0
910
Wantedly での Datadog 活用事例
bgpat
2
6.5k
KubernetesでDatadogを飼うならオートディスカバリーを使わないと損
bgpat
2
1.1k
マイクロサービス基盤にフルマネージドサービスではなくKubernetesを選択する理由
bgpat
12
4.8k
400万ユーザーに価値を届けるエンジニアを を支えるインフラ基盤
bgpat
3
580
Featured
See All Featured
sira's awesome portfolio website redesign presentation
elsirapls
0
460
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
How to train your dragon (web standard)
notwaldorf
96
6.9k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
2
330
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
330
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
270
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
2
410
Six Lessons from altMBA
skipperchong
29
4.5k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
730
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
310
Technical Leadership for Architectural Decision Making
baasie
3
600
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