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
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
340
Producing Creativity
orderedlist
PRO
348
41k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
Amusing Abliteration
ianozsvald
1
310
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Testing 201, or: Great Expectations
jmmastey
46
8.3k
Statistics for Hackers
jakevdp
799
230k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
620
Believing is Seeing
oripsolob
1
220
Building Applications with DynamoDB
mza
96
7.2k
We Are The Robots
honzajavorek
0
380
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
2
1.8k
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