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
Goでサーバの健全性を確保する / Keeping servers healthy with Go
Search
linyows
April 24, 2021
Programming
0
2.2k
Goでサーバの健全性を確保する / Keeping servers healthy with Go
2021年4月24日 FUKUOKA Engineers Day 2021 Online での資料です。
linyows
April 24, 2021
Tweet
Share
More Decks by linyows
See All by linyows
透過型SMTPプロキシによる送信メールの可観測性向上: Update Edition / Improved observability of outgoing emails with transparent smtp proxy: Update edition
linyows
2
210
研究の再現性を高める 仕組みをGoでつくる / Creating a system to improve the reproducibility of research using go
linyows
1
120
奥が深いメールのシステム / The depth of Email system
linyows
3
420
IaCにおけるテスト考察 / Tests in IaC
linyows
2
440
リバースエンジニアリングとGoでSlackの認知負荷を下げる / Reducing cognitive load in Slack with Reverse-engineering and Go
linyows
2
280
透過型SMTPプロキシによる送信メールの可観測性向上 / Improved observability of outgoing emails with transparent smtp proxy
linyows
2
960
プロダクションで使うGo Pluginの利便性とパフォーマンス性 / Simplicity and Performance of Go plugin for Production
linyows
0
510
求められるソフトウェアエンジニア像とキャリア戦略 / Engineers and Career Strategies Required Now
linyows
2
480
CloudflareのCAPTCHAを使って ユーザ体験を下げず不正利用を排除する / Cloudflare's captcha case study that does not degrade ux
linyows
0
360
Other Decks in Programming
See All in Programming
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
110
Make Impossible States Impossibleを 意識してReactのPropsを設計しよう
ikumatadokoro
0
170
距離関数を極める! / SESSIONS 2024
gam0022
0
280
ふかぼれ!CSSセレクターモジュール / Fukabore! CSS Selectors Module
petamoriken
0
150
TypeScript Graph でコードレビューの心理的障壁を乗り越える
ysk8hori
2
1.1k
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
890
ヤプリ新卒SREの オンボーディング
masaki12
0
130
受け取る人から提供する人になるということ
little_rubyist
0
230
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
120
Jakarta Concurrencyによる並行処理プログラミングの始め方 (JJUG CCC 2024 Fall)
tnagao7
1
290
Click-free releases & the making of a CLI app
oheyadam
2
110
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.5k
Practical Orchestrator
shlominoach
186
10k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Building a Scalable Design System with Sketch
lauravandoore
459
33k
Become a Pro
speakerdeck
PRO
25
5k
Optimizing for Happiness
mojombo
376
70k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Code Review Best Practice
trishagee
64
17k
Transcript
FUKUOKA Engineers Day 2021 Online Tomohisa Oda / Apr 24,
2021 Keeping Servers Healthywith Go GoͰαʔόͷ݈શੑΛ֬อ͢Δ
FUKUOKA Engineers Day 2021 Online @linyows Blog: tomohisaoda.com Affiliation: GMO
pepabo, inc. Fukuoka.go, Fukuoka.ts Organizer ࠷ۙɺNotionʹࣄྫհهࣄͰࣅإֆΛॻ͍ͯΒ͍·ͨ͠ɻ ࠓͳΜͱɺGo Conference Tokyo 2021͕ࠓ͍͋ͬͯ·͢ɻ#gocon
FUKUOKA Engineers Day 2021 Online ๏ ϗεςΟϯάࣄۀ෦ Senior Engineering Lead
ࣄۀ෦ͷCTOVPoEͷΑ͏ͳͷ ๏ ϖύϘݚڀॴ भେֶڞಉݚڀ 2020 Պݚඅ࠾ https://kaken.nii.ac.jp/grant/KAKENHI-PROJECT-20K11791/ ܰྔίϯςφʹΑΔେنߴूੵϝʔϧϗεςΟϯάج൫ʹ͓͚Δૹ৴ػೳͷߴػೳԽ In Pepabo…
FUKUOKA Engineers Day 2021 Online Private Projects ΞϓϦέʔγϣϯ͕ࣗϦϙδτϦ͔ Β࠷৽ͷίʔυΛݕͯࣗ͠ಈͰσϓϩ ΠͱσϦόϦʔΛߦ͏πʔϧ
linuxͷuser໊લղܾΛGitHubͷ TeamϝϯόʔϦϙδτϦͷΞΫηε ݖݶऀ͔Βߦ͏πʔϧ ϝʔϧૹ৴༻ͷಁաܕSMTPϓϩΩγͰ ϦΫΤετͱϨεϙϯεΛϩάσʔλ ϕʔεʹग़ྗ͢Δ͜ͱ͕Ͱ͖Δ New!!
FUKUOKA Engineers Day 2021 Online GoͰαʔόͷ݈શੑΛ֬อ͢Δ 👨⚕
FUKUOKA Engineers Day 2021 Online ๏ ϜʔϜʔυϝΠϯ — https://muumuu-domain.com ๏
ςϜϧ — https://heteml.jp ๏ ϩϦϙοϓ — https://lolipop.jp ๏ ϚωʔδυΫϥυ — https://mc.lolipop.jp ϗεςΟϯάࣄۀ෦
FUKUOKA Engineers Day 2021 Online ๏ Domain — DNS ๏
Compute — HTTP, SSH, FTP and WebDav… ๏ Mail — SMTP, POP, IMAP… ๏ Database — MySQL, SQLite… ֤αʔόϦιʔεͷ҆ఆతఏڙͱӡ༻
FUKUOKA Engineers Day 2021 Online αʔόΛཧ͢Δ͜ͱ͕ͱͯॏཁ ⚠
FUKUOKA Engineers Day 2021 Online ཧαʔόͷཧ ๏ ϗεςΟϯάࣄۀ෦͚ͩͰཧαʔό͕େମ1000Ҏ্͋Δ ๏ αʔόނো͢Δͷ
๏ อकظؒͯ͘5ؒɺյΕͨΒഇغ͢Δ͔ɺߴֹͳඅ༻Λͬͯमཧ͢Δ͔ ๏ αʔόͷݮՁঈ٫5ɺͭ·Γαʔόͷ༻͕লྩͰ5ͱͳ͍ͬͯΔ ๏ ఆظతʹαʔόΛϦϓϨʔε͢Δඞཁ͕͋Δ ๏ ͪͳΈʹϕϯμʔʹΑͬͯnͭɺͨͳ͍Έ͍ͨͳͷͳΜͱͳ͋͘ΔͬΆ͍
FUKUOKA Engineers Day 2021 Online Ծαʔόͷཧ ๏ ཧαʔό্ʹͷKVMOpenStackΛͬͯԾڥΛ࡞͍ͬͯΔ ๏ ࠷ۙOpenStack্ʹKubernetesڥΛ࡞ͬͯਫ਼ྗతʹίϯςφԽΛਐΊ͍ͯΔ
๏ VMͬ͟ͱ600Πϯελϯε΄Ͳ͋Δ ๏ વϋʔυΣΞҎ֎ʹιϑτΣΞݹ͘ͳΔͷͰɺ੬ऑੑରԠͳͲɺOSϛυϧ ΣΞͷΞοϓσʔτܧଓతʹඞཁ ๏ ϑΝΠϧͷ߹ੑࢹڴҖݕग़੬ऑੑݕग़ʹWazuhΛར༻͍ͯ͠Δ͕ཏతͰͳ ͍
FUKUOKA Engineers Day 2021 Online ηΩϡϦςΟͷཧ ๏ IDSʢ৵ೖݕγεςϜʣ ʹWazuhΛར༻͍ͯ͠Δ ๏
WazuhڴҖݕҎ֎ʹ ϑΝΠϧͷ߹ੑࢹ ੬ऑੑݕग़ʢCVE databaseʣͰ͖Δ
FUKUOKA Engineers Day 2021 Online ࢿ࢈ͱͯ͠ͷαʔόཧ ๏ ߴֹͳαʔόձࣾࢿ࢈ͷ̍ͭ ๏ ͍ͭɺͩΕ͕ɺͲ͔͜ΒɺͳʹΛɺͳΜͷͨΊʹɺ͕͔ΔΑ͏ʹཧ͍ͯ͠Δ
๏ ࣗલͷΞϓϦέʔγϣϯͱDBʹΑ࣮ͬͯݱ͍ͯ͠Δ ๏ ҰൠతʹɺDCIMʢData Center Infrastructure ManagementʣIPAMʢIP Adress ManagerʣͷൣᙝͰ͋Δαʔό͕ऩ༰͞ΕΔϥοΫͷॴαʔόͷεϖοΫɺ αʔό͕͍ͬͯΔIPΞυϨεͷཧͦͷΞϓϦέʔγϣϯʹೖ͍ͬͯΔ ๏ ࢿ࢈ཧͪΌΜͱͰ͖͍ͯΔ
FUKUOKA Engineers Day 2021 Online 😭 ཧӡ༻͢Δ͜ͱ͕ΊͬͪΌ͋Δ 😭
FUKUOKA Engineers Day 2021 Online ՝ ๏ ෳͷαʔϏεɺෳͷνʔϜɺෳͷαʔόڥʹΑΓશମ૾ͷѲ͕Ͱ ͖͍ͯͳ͍ 👉
ཏతʹશମѲ͕Ͱ͖Δঢ়ଶʹ͍ͨ͠ʂ ๏ αʔόཧΛϝΠϯʹ͍ͬͯΔνʔϜͳ͘ӡ༻ͷยखؒͳͨΊɺରԠ͕ ޙखʹͳΓ͕ͪ 👉 ੵۃతʹαʔόͷ݈શੑΛҡ࣋Ͱ͖Δঢ়گΛͭ͘Γ͍ͨʂ
FUKUOKA Engineers Day 2021 Online GoͰ͋ΒΏΔαʔόͷInventoryΛͭ͘Δ
FUKUOKA Engineers Day 2021 Online Architecture - ཧαʔόೲ࣌ʹਓ͕ࢿ࢈DBʹొ͢Δ - ࢿ࢈DB͔Βཧαʔόͷใऔಘ͢Δ
- KVMϗετʹSSHͯ͠ήετใΛऔಘ͢Δ - OpenStackAPI͔Βςφϯτ͝ͱʹ InstanceͷใΛऔಘ͢Δ - શͯΛϦετԽͨ͠ϑΝΠϧΛgitཧͯ͠ຖ िࠩΛࢦࠩ֬͠ೝ͢Δ - Wazuhαʔόͱagentͷ໊دͤΛͯ͠શಋ ೖΛ࿙Εͳ͘ΔʢಋೖͷՄࢹԽʣ
FUKUOKA Engineers Day 2021 Online Architecture - ཧαʔόೲ࣌ʹਓ͕ࢿ࢈DBʹొ͢Δ - ࢿ࢈DB͔Βཧαʔόͷใऔಘ͢Δ
- KVMϗετʹSSHͯ͠ήετใΛऔಘ͢Δ - OpenStackAPI͔Βςφϯτ͝ͱʹ InstanceͷใΛऔಘ͢Δ - શͯΛϦετԽͨ͠ϑΝΠϧΛgitཧͯ͠ຖ िࠩΛࢦࠩ֬͠ೝ͢Δ - Wazuhαʔόͱagentͷ໊دͤΛͯ͠શಋ ೖΛ࿙Εͳ͘ΔʢಋೖͷՄࢹԽʣ
FUKUOKA Engineers Day 2021 Online Architecture - ཧαʔόೲ࣌ʹਓ͕ࢿ࢈DBʹొ͢Δ - ࢿ࢈DB͔Βཧαʔόͷใऔಘ͢Δ
- KVMϗετʹSSHͯ͠ήετใΛऔಘ͢Δ - OpenStackAPI͔Βςφϯτ͝ͱʹ InstanceͷใΛऔಘ͢Δ - શͯΛϦετԽͨ͠ϑΝΠϧΛgitཧͯ͠ຖ िࠩΛࢦࠩ֬͠ೝ͢Δ - Wazuhαʔόͱagentͷ໊دͤΛͯ͠શಋ ೖΛ࿙Εͳ͘ΔʢಋೖͷՄࢹԽʣ
FUKUOKA Engineers Day 2021 Online Architecture - ཧαʔόೲ࣌ʹਓ͕ࢿ࢈DBʹొ͢Δ - ࢿ࢈DB͔Βཧαʔόͷใऔಘ͢Δ
- KVMϗετʹSSHͯ͠ήετใΛऔಘ͢Δ - OpenStackAPI͔Βςφϯτ͝ͱʹ InstanceͷใΛऔಘ͢Δ - શͯΛϦετԽͨ͠ϑΝΠϧΛgitཧͯ͠ຖ िࠩΛࢦࠩ֬͠ೝ͢Δ - Wazuhαʔόͱagentͷ໊دͤΛͯ͠શಋ ೖΛ࿙Εͳ͘ΔʢಋೖͷՄࢹԽʣ
FUKUOKA Engineers Day 2021 Online Architecture - ཧαʔόೲ࣌ʹਓ͕ࢿ࢈DBʹొ͢Δ - ࢿ࢈DB͔Βཧαʔόͷใऔಘ͢Δ
- KVMϗετʹSSHͯ͠ήετใΛऔಘ͢Δ - OpenStackAPI͔Βςφϯτ͝ͱʹ InstanceͷใΛऔಘ͢Δ - શͯΛϦετԽͨ͠ϑΝΠϧΛgitཧͯ͠ຖ िࠩΛࢦࠩ֬͠ೝ͢Δ - Wazuhαʔόͱagentͷ໊دͤΛͯ͠શಋ ೖΛ࿙Εͳ͘ΔʢಋೖͷՄࢹԽʣ
FUKUOKA Engineers Day 2021 Online Architecture - ཧαʔόೲ࣌ʹਓ͕ࢿ࢈DBʹొ͢Δ - ࢿ࢈DB͔Βཧαʔόͷใऔಘ͢Δ
- KVMϗετʹSSHͯ͠ήετใΛऔಘ͢Δ - OpenStackAPI͔Βςφϯτ͝ͱʹ InstanceͷใΛऔಘ͢Δ - શͯΛϦετԽͨ͠ϑΝΠϧΛgitཧͯ͠ຖ िࠩΛࢦࠩ֬͠ೝ͢Δ - Wazuhαʔόͱagentͷ໊دͤΛͯ͠શಋ ೖΛ࿙Εͳ͘ΔʢಋೖͷՄࢹԽʣ 0 150 300 450 600 A B C D
FUKUOKA Engineers Day 2021 Online ग़དྷͨͷ
FUKUOKA Engineers Day 2021 Online
FUKUOKA Engineers Day 2021 Online ಈ͘ͷ͕Ͱ͖Δ·Ͱ̍िؒ - ։ൃͨ͠ͷΛҰൠԽ͠ʹ͍ͨ͘Ίɺιʔε ίʔυඇެ։ -
Architecture͔Β͔Δ௨Γฐࣾͷӡ༻ମ ੍ґଘ͕େ͖͍ - Goඪ४Ϟδϡʔϧ͕ॆ࣮͍ͯ͠ΔͷͰ֎ ෦ϥΠϒϥϦൺֱతʹগͳ͍
FUKUOKA Engineers Day 2021 Online Test - IntegrationςετྗٕͬΆ͍͕ɺSSH αʔόΛGoͰىಈͤͯ͞Stub͢ΔΑ͏ʹ͠ ͍ͯΔ
- ͨͩɺSSHαʔόॻ͘ͷ݁ߏखܰͰ170ߦ ͙Β͍Ͱॻ͚Δ $ wc -l ssh_test.go 170
FUKUOKA Engineers Day 2021 Online SSHӽ͠ʹTest - SSHαʔό͕ड͚औͬͨೖྗ͔Βग़ྗ͢Δ ༰ΛఆٛΛ͢Δ -
goroutineͰSSHαʔόΛىಈ͢Δ - ରͷϝιουΛݺͼग़͢ - ظ͢ΔίϚϯυΛSSHαʔό͕ड͚औͬ ͍ͯΔ͔Λݕূ͢Δ
FUKUOKA Engineers Day 2021 Online SSHӽ͠ʹTest - SSHαʔό͕ड͚औͬͨೖྗ͔Βग़ྗ͢Δ ༰ΛఆٛΛ͢Δ -
goroutineͰSSHαʔόΛىಈ͢Δ - ରͷϝιουΛݺͼग़͢ - ظ͢ΔίϚϯυΛSSHαʔό͕ड͚औͬ ͍ͯΔ͔Λݕূ͢Δ
FUKUOKA Engineers Day 2021 Online SSHӽ͠ʹTest - SSHαʔό͕ड͚औͬͨೖྗ͔Βग़ྗ͢Δ ༰ΛఆٛΛ͢Δ -
goroutineͰSSHαʔόΛىಈ͢Δ - ରͷϝιουΛݺͼग़͢ - ظ͢ΔίϚϯυΛSSHαʔό͕ड͚औͬ ͍ͯΔ͔Λݕূ͢Δ
FUKUOKA Engineers Day 2021 Online SSHӽ͠ʹTest - SSHαʔό͕ड͚औͬͨೖྗ͔Βग़ྗ͢Δ ༰ΛఆٛΛ͢Δ -
goroutineͰSSHαʔόΛىಈ͢Δ - ରͷϝιουΛݺͼग़͢ - ظ͢ΔίϚϯυΛSSHαʔό͕ड͚औͬ ͍ͯΔ͔Λݕূ͢Δ
FUKUOKA Engineers Day 2021 Online Metrics - ύϑΥʔϚϯεϞχλϦϯάPrometheusΛ͍ͬͯΔ - PrometheusͷΧελϜίϨΫλͱͯ͠ϑΝΠϧΛग़ྗ
- ཧαʔόͷՔಇΛyoung, middle,oldͱͯ͠ྨ͠ɺ αʔϏε͝ͱͷαʔόͷ݈શੑΛՄࢹԽ͍ͯ͠Δ - ՄࢹԽ͢Δ͜ͱͰੵۃతͳαʔόϦϓϨʔε͕ՄೳʹͳΔͱߟ ͍͑ͯΔ
FUKUOKA Engineers Day 2021 Online ๏ Ϗδωε্͋ΒΏΔαʔόΛཧ͍ͯ͘͜͠ͱ͕ॏཁͰ͋Δ ๏ ཧαʔόෳڥͷԾαʔόʹରͯ͠ཏతͳாΛGoΛͬͯ࡞ͨ͠ ๏
ாͷใ͔Βશαʔό࿙Εͳ͘IDSΛಋೖ͢Δ͜ͱɺੵۃతͳαʔόϦϓϨʔεΛߦ ͏ڥΛඋͰ͖ͨ ๏ ෳࡶͳߏͷεΫϦϓτͰൺֱత؆୯ʹIntegration TestͰ͖Δ Conclusion
FUKUOKA Engineers Day 2021 Online Fukuoka.goɺGoݴޠΛத৺ʹιϑτΣΞΤϯδχΞϦϯάͷڞ༗Λߦ͏ίϛϡ χςΟͰ͢ɻ2020ͷΤϯδχΞϑϨϯυϦʔγςΟԬΞϫʔυίϛϡχςΟ෦ Ͱड͠·ͨ͠ɻ ڵຯ͕͋Γ·ͨ͠ΒɺConnpassͳͲ͔Β͝ࢀՃ͍ͩ͘͞ʂ https://fukuokago.dev/
Fukuoka.go
FUKUOKA Engineers Day 2021 Online Thank you \ʕ⊙౪⚆ʔ/