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
研究の再現性を高める 仕組みをGoでつくる / Creating a system to improve the reproducibility of research using go
linyows
1
110
奥が深いメールのシステム / The depth of Email system
linyows
3
410
IaCにおけるテスト考察 / Tests in IaC
linyows
2
420
リバースエンジニアリングとGoでSlackの認知負荷を下げる / Reducing cognitive load in Slack with Reverse-engineering and Go
linyows
2
270
透過型SMTPプロキシによる送信メールの可観測性向上 / Improved observability of outgoing emails with transparent smtp proxy
linyows
2
940
プロダクションで使うGo Pluginの利便性とパフォーマンス性 / Simplicity and Performance of Go plugin for Production
linyows
0
500
求められるソフトウェアエンジニア像とキャリア戦略 / Engineers and Career Strategies Required Now
linyows
2
470
CloudflareのCAPTCHAを使って ユーザ体験を下げず不正利用を排除する / Cloudflare's captcha case study that does not degrade ux
linyows
0
350
なぜNotionを使うのか2022 / Why use notion as our workspace in 2022
linyows
3
6k
Other Decks in Programming
See All in Programming
Vaporモードを大規模サービスに最速導入して学びを共有する
kazukishimamoto
4
4.3k
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
7
430
Amazon Neptuneで始めてみるグラフDB-OpenSearchによるグラフの全文検索-
satoshi256kbyte
4
320
2万ページのSSG運用における工夫と注意点 / Vue Fes Japan 2024
chinen
3
1.3k
Why Spring Matters to Jakarta EE - and Vice Versa
ivargrimstad
0
960
カスタムしながら理解するGraphQL Connection
yanagii
1
1.2k
CSC305 Lecture 13
javiergs
PRO
0
130
hotwire_or_react
harunatsujita
8
4k
カラム追加で増えるActiveRecordのメモリサイズ イメージできますか?
asayamakk
4
1.5k
リリース8年目のサービスの1800個のERBファイルをViewComponentに移行した方法とその結果
katty0324
5
3.6k
CPython 인터프리터 구조 파헤치기 - PyCon Korea 24
kennethanceyer
0
240
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
210
Featured
See All Featured
Git: the NoSQL Database
bkeepers
PRO
425
64k
Writing Fast Ruby
sferik
626
61k
Faster Mobile Websites
deanohume
304
30k
Product Roadmaps are Hard
iamctodd
PRO
48
10k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
231
17k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
48k
Building an army of robots
kneath
302
42k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
4
290
Designing for humans not robots
tammielis
249
25k
How GitHub (no longer) Works
holman
311
140k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
7.9k
Building Your Own Lightsaber
phodgson
102
6k
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 \ʕ⊙౪⚆ʔ/