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
非コンテナ環境において宣言的Deploymentを手軽に実現する / Declarative deployment in non-container environments
linyows
0
21
メール送信サーバの集約における透過型SMTP プロキシの定量評価 / Quantitative Evaluation of Transparent SMTP Proxy in Email Sending Server Aggregation
linyows
0
400
透過型SMTPプロキシによる送信メールの可観測性向上: Update Edition / Improved observability of outgoing emails with transparent smtp proxy: Update edition
linyows
2
260
研究の再現性を高める 仕組みをGoでつくる / Creating a system to improve the reproducibility of research using go
linyows
1
140
奥が深いメールのシステム / The depth of Email system
linyows
4
450
IaCにおけるテスト考察 / Tests in IaC
linyows
2
480
リバースエンジニアリングとGoでSlackの認知負荷を下げる / Reducing cognitive load in Slack with Reverse-engineering and Go
linyows
2
300
透過型SMTPプロキシによる送信メールの可観測性向上 / Improved observability of outgoing emails with transparent smtp proxy
linyows
2
1k
プロダクションで使うGo Pluginの利便性とパフォーマンス性 / Simplicity and Performance of Go plugin for Production
linyows
0
540
Other Decks in Programming
See All in Programming
RWC 2024 DICOM & ISO/IEC 2022
m_seki
0
210
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
3
1.1k
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
150
急成長期の品質とスピードを両立するフロントエンド技術基盤
soarteclab
0
930
Haze - Real time background blurring
chrisbanes
1
510
良いユニットテストを書こう
mototakatsu
5
2k
CSC509 Lecture 14
javiergs
PRO
0
140
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
暇に任せてProxmoxコンソール 作ってみました
karugamo
1
720
今からはじめるAndroidアプリ開発 2024 / DevFest 2024
star_zero
0
1k
useSyncExternalStoreを使いまくる
ssssota
6
1k
CSC305 Lecture 25
javiergs
PRO
0
130
Featured
See All Featured
The Invisible Side of Design
smashingmag
298
50k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
5
440
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
247
1.3M
Designing on Purpose - Digital PM Summit 2013
jponch
116
7k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
Navigating Team Friction
lara
183
15k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
95
17k
The Cost Of JavaScript in 2023
addyosmani
45
7k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
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 \ʕ⊙౪⚆ʔ/