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言語での並行処理失敗パターン
Search
nwiizo
November 16, 2021
3
1.6k
インフラエンジニアが学んだ Go言語での並行処理失敗パターン
2021/11/16 Infra Study 2nd #7「SREと組織」にて発表
https://forkwell.connpass.com/event/228038/
nwiizo
November 16, 2021
Tweet
Share
More Decks by nwiizo
See All by nwiizo
SREの前に
nwiizo
12
3k
2024年版 運用者たちのLLM
nwiizo
3
860
Platform Engineering と SRE の門
nwiizo
16
5.5k
運用者の各領域で向き合うLLM
nwiizo
1
460
可観測性ガイダンス
nwiizo
14
3.6k
書を捨てよ、現場へ出よう
nwiizo
12
11k
走馬灯のIaCは考えておいて
nwiizo
10
5.9k
SREとPlatform Engineerの交差点
nwiizo
9
6.7k
SREからPlatform Engineerへの拡大
nwiizo
15
3.8k
Featured
See All Featured
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
Building an army of robots
kneath
302
43k
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
4 Signs Your Business is Dying
shpigford
180
21k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
The Language of Interfaces
destraynor
154
24k
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Building Applications with DynamoDB
mza
90
6.1k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Transcript
݄*OGSB4UVEZOEʮ43&ͱ৫ʯ!OXJJ[P ΠϯϑϥΤϯδχΞֶ͕Μͩ (PݴޠͰͷฒߦॲཧࣦഊύλʔϯ ̑ͱ͍͏ͷΕͯ֓ཁ͚ͩ࡞ͯ͠ࢿྉ࡞࣌ʹ٧ΜͩͷͰ ͋ͱͰɺϒϩάॻ͖·͢ɻ
TIBLFձࣾʹస৬ͯ͠ ܦաͨ͠ !OXJJ[PͰ͢
ΠϯϑϥΤϯδχΞͷඇಉظॲཧ w ʹΑΔόοΫάϥϯυॲཧ w YBSHTʹΑΔฒྻ࣮ߦ time seq 10 | xargs
-t -P1 -n1 'sleep' sleep 1 sleep 2 … ________________________________________________________ Executed in 55.11 secs fish external usr time 13.14 millis 0.19 millis 12.94 millis sys time 47.95 millis 2.26 millis 45.69 millis time seq 10 | xargs -t -P3 -n1 'sleep' sleep 1 sleep 2 … ________________________________________________________ Executed in 22.04 secs fish external usr time 10.70 millis 0.18 millis 10.52 millis sys time 33.78 millis 2.25 millis 31.53 millis w Ҿͷ͚ͩ4MFFQ͢ΔϫϯϥΠφʔΛ ฒྻͰ࣮ߦ͢Δ߹ ඵͰྃ ͱฒྻͰ࣮ߦͨ͠߹ ඵͰྃ $ ίϚϯυ & [1] 4403 w ίϚϯυͷ࠷ޙʹΛՃ͢Δ͜ͱʹΑΓɺ ͦͷίϚϯυΛόοΫάϥϯυͰಈ͔͢͜ͱ͕Ͱ͖Δɻ ແअؾʹΔͱμϝ͕ͩίϯτϩʔϧՄೳ ແअؾʹGPSΛճ͢ͱΫϥΠΞϯτɺαʔόʔ ͞·͟·ͳͷ͕ࢮ͵ େ͖ͳγΣϧεΫϦϓτ
(PݴޠʹΑΔฒྻॲཧͷ
(PݴޠʹΑΔฒྻॲཧͷ ຊޠͰྑ͍ͷ͕ͨ͘͞Μ͋Δ IUUQTMFBSOJOHPSFJMMZDPNMJCSBSZWJFXHPZBOZVOJZPSVCJOHYJOHDIVMJ IUUQT[FOOEFWITBLJCPPLTHPMBOHDPODVSSFODZ ͳͷͰɺجຊతجૅͷ͠·ͤΜɻ ͪͳΈʹɺͦͦ͜͜େ͖ͳγεςϜΛ࡞Δ͜ͱʹͳΔͱઈରʹಡΉ͜ͱʹͳΔ
ͷͰɺࠓճͷ-5Ͱ ΠϯϑϥΤϯδχΞ͕ؕΓͦ͏ͳ (PݴޠͰͷฒߦॲཧࣦഊύλʔϯ
্͔Β࣮ߦ͞ΕΔͱ͍͏ࡨ֮ͰӬԕʹσόοά͕ऴΘΒͳ͍ w Ұମɺ͍͔ͭΒ্͔Β࣮ߦ͞ΕΔͱɻɻɻ w ιʔείʔυ্͔ΒԼʹ͔ͬͯॻ͍͍ͯ͘͜ͱ͕ଟ͍ͱ ࢥ͍·͢ɻ͜ͷ͜ͱ͔Βʮίʔυ্͔ΒԼʹॱ൪ʹ࣮ߦ͞ ΕΔͩΖ͏ʯͱ͍͏ࡨ֮ʹؕΓ͕ͪͰ͕͢ɺฒߦॲཧΛ͢ Δ߹ʹ͜ΕΒ͕࣮ߦ͞ΕΔ·Ͱ͔Βͳ͍ɻ
ͦͷͨΊɺຊʹ͔ΒͣʹͱΜͰͳ͍λΠϛϯάͰ ࢥͬͯͳ͍ॲཧ͕࣮ߦ͞ΕΔ߹͕͋ΔͷͰ ͜ͷࡨ֮ૣʑʹࣺͯڈ͙ͬͯ͢ʹͷલͷ ϩάͱਅ伨ʹ͖߹͍·͠ΐ͏ʂ w ฒߦॲཧʹ͓͚Δ࣮ߦॱ൪ͷอূΛ͍ͬͯ͘ w εϦʔϓʹΑΔॱ൪อূ w ΞτϛοΫੑ w TZOD.VUFY
ͦΕɺෳͷϩδοΫΛڠௐͤ͞Α͏ͱͯ͠·͔͢ʁϚδʁ w ϩδοΫΛݟͨ͠ํ͕͍͍߹ଟ͋͘Δ w ͋ͳ͕ͨຊʹඞཁͳͷฒߦੑͷ͋ΔॲཧͰ͔͢ʁ w 3BDF$POEJUJPO ڝ߹ঢ়ଶ Λආ͚Δඞཁ͕͋Δ w
ڞ༗ϝϞϦʹਖ਼͘͠ΞΫηε͠ͳ͍ͱ͍͚ͳ͍ w ষେن։ൃͰͷฒྻॲཧͳͲΛख़ಡ͢Δ͜ͱ͕ඞཁ ɹෆ݈શͳΰϧʔνϯΛ͢ͳͲΊͪΌͪ͘Ό͍͠ w ඞཁͳͷடংΛ࣋ͬͨඇಉظॲཧ͡ΌͶʁ w σόοάͷ࣌ʹSVOUJNF(0."9130$4 ΛߴΊͨΓͯ͠ ڝ߹Λ֬ೝ͢Δ࡞ۀͱ͔ਖ਼ɺͨ͘͠ͳ͍ɻɻɻ w HPSPVUJOFͷಉظɺඇಉظʹ͍ͭͯ ڥม࣮Ͱ͓࣋ͬͯ͘ͱ߹͕ଟ͍͜ͱ͕͋Δ O`reillyɹGoݴޠʹΑΔฒߦॲཧɹΑΓҾ༻
࣮ߦ࣌ͷෛՙͦͷڥͰͦͷλΠϛϯάͰ࣮ߦ͢Δ·Ͱ͔Βͳ͍ w ࣮ߦ͢Δ·Ͱ͔Βͳ͍ w ෛՙͷ͔͔ΔॲཧΛ੍ݶͳ͠ʹฒྻԽͯ͠ຊʹҙຯͳ ͘Ή͠ΖѱͰ͢ɻॲཧͷฒྻΛ༧ଌՄೳͳ߹ɺͦ ΕΛ࣮ߦ͢ΕΑ͍Ͱ͕͢ෆ໌֬ͳ߹ʹɺ$16ͷί Ξ͕ͨΓʹͳΔ͜ͱ͕͋Γ·͢ɻ (PҎ߱ɺσϑΥϧτίΞͷʹͳΓ·͢ɻ
ͦͷͨΊɺຊ൪ڥͱखݩͰ࣮ߦ͕࣌ؒมΘΔ͜ͱ͕͋Δ w ͪ͜ΒSVOUJNF(0."9130$4 SVOUJNF/VN$16 Λຊ൪Ͱ͢ͳ w ·ͨɺຊ൪ӡ༻தͷόονॲཧΛᢞΊ͔͔ͯΔͱ λΠϛϯάʹΑͬͯطʹ"1*%#ʹෛՙֻ͕͔ͬͯ Δɻଞͷόον͕ͬͯΔͳͲɻʰனؒʹखݩͷڥ͔Β ͏·͘ߦͬͨͷͰຊ൪Ͱ0,ͳͷͩʱͱؾܰʹߟ͑ͯ ͍Δͱͦͷͷʹढ͍ͷΦϯίʔϧ͕ݦݱ͢ΔΑ
w ্͔Β࣮ߦ͞ΕΔͱ͍͏ࡨ֮ͰӬԕʹσόοά͕ऴΘΒͳ͍ w ͦΕɺෳͷϩδοΫΛڠௐͤ͞Α͏ͱͯ͠·͔͢ʁϚδʁ w ࣮ߦ࣌ͷෛՙͦͷڥͰͦͷλΠϛϯάͰ࣮ߦ͢Δ·Ͱ͔Βͳ͍ 'JO ࠓʮ43&ͱ৫ʯͳͷͰ͕͢ ৫ʹؔͯ͠ϋʔτϏʔτͱڞʹԿ͔ݴٴ͔ͨͬͨ͠ͷͰ͕͢ ͍͍ײ͡ͷΛࢥ͍͔ͭͳ͔ͬͨͷͰऴྃͰ͢ɻ
ʮ43&(BQTཧͱ࣮ફ͔Β43&Λ࠶ߟ͢ΔʯΈ͍ͨͳΠϕϯτ ͬͯͷͰ43&ͷ୳ٻͷͲͷষ͕໘ന͔ͬͨͱ͍͏Λ͢ΕΑ͔ͬͨ ͱޙչ͢ΔOXJJ[PͰ͋ͬͨ ·ͱΊ ͜͏͍͏ܦݧ͕ΞϓϦέʔγϣϯଆͷൃݟʹܨ͕Δ