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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
860
Wantedly での Datadog 活用事例
bgpat
2
6.4k
KubernetesでDatadogを飼うならオートディスカバリーを使わないと損
bgpat
2
1.1k
マイクロサービス基盤にフルマネージドサービスではなくKubernetesを選択する理由
bgpat
12
4.7k
400万ユーザーに価値を届けるエンジニアを を支えるインフラ基盤
bgpat
3
560
Ruby製社内ツールのGo移行
bgpat
2
880
Featured
See All Featured
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
240
How STYLIGHT went responsive
nonsquared
100
6.3k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
240
Large-scale JavaScript Application Architecture
addyosmani
515
110k
Designing Powerful Visuals for Engaging Learning
tmiket
1
550
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
420
The agentic SEO stack - context over prompts
schlessera
0
940
Making the Leap to Tech Lead
cromwellryan
135
10k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
290
Building Applications with DynamoDB
mza
96
7.2k
How to Think Like a Performance Engineer
csswizardry
28
2.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