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
Macとオーディオ再生 2024/11/02
yusukeito
0
370
Realtime API 入門
riofujimon
0
150
CSC509 Lecture 12
javiergs
PRO
0
160
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
190
Duckdb-Wasmでローカルダッシュボードを作ってみた
nkforwork
0
120
Ethereum_.pdf
nekomatu
0
460
ECS Service Connectのこれまでのアップデートと今後のRoadmapを見てみる
tkikuc
2
250
광고 소재 심사 과정에 AI를 도입하여 광고 서비스 생산성 향상시키기
kakao
PRO
0
170
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
170
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.7k
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
受け取る人から提供する人になるということ
little_rubyist
0
230
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
136
6.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Designing Experiences People Love
moore
138
23k
The Cult of Friendly URLs
andyhume
78
6k
Documentation Writing (for coders)
carmenintech
65
4.4k
4 Signs Your Business is Dying
shpigford
180
21k
Teambox: Starting and Learning
jrom
133
8.8k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
It's Worth the Effort
3n
183
27k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
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 \ʕ⊙౪⚆ʔ/