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
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
420
hotwire_or_react
harunatsujita
8
4k
リリース8年目のサービスの1800個のERBファイルをViewComponentに移行した方法とその結果
katty0324
5
3.5k
Progressive Web Apps für Desktop und Mobile mit Angular (Hands-on)
christianliebel
PRO
0
110
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
420
カラム追加で増えるActiveRecordのメモリサイズ イメージできますか?
asayamakk
4
1.5k
Kotlin2でdataクラスの copyメソッドを禁止する/Data class copy function to have the same visibility as constructor
eichisanden
1
120
2万ページのSSG運用における工夫と注意点 / Vue Fes Japan 2024
chinen
3
1.3k
組織に自動テストを書く文化を根付かせる戦略(2024秋版) / Building Automated Test Culture 2024 Autumn Edition
twada
PRO
10
4.5k
PHP でアセンブリ言語のように書く技術
memory1994
PRO
1
150
CPython 인터프리터 구조 파헤치기 - PyCon Korea 24
kennethanceyer
0
240
Universal Linksの実装方法と陥りがちな罠
kaitokudou
1
220
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1365
200k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
BBQ
matthewcrist
85
9.3k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
9
680
How to Think Like a Performance Engineer
csswizardry
19
1.1k
Docker and Python
trallard
40
3.1k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
KATA
mclloyd
29
13k
How GitHub (no longer) Works
holman
311
140k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
32
1.8k
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 \ʕ⊙౪⚆ʔ/