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
事業と歩む Ameba システム刷新の道 / the-road-to-ameba-system...
Search
kakerukaeru
June 07, 2022
Technology
0
1.7k
事業と歩む Ameba システム刷新の道 / the-road-to-ameba-system-renovation-aws-summit-online
AWS Summit Online 2022 で話してきた資料
登壇動画:
https://summits-japan.virtual.awsevents.com/media/1_jpps0jjk
kakerukaeru
June 07, 2022
Tweet
Share
More Decks by kakerukaeru
See All by kakerukaeru
大規模ImageOptimizer利用案件から学ぶ 安心安全のCDN移行 / Fastly yamagoya 2022
kakerukaeru
1
1.2k
事業と歩むAmebaシステム刷新の道 / the-road-to-ameba-system-renovation-cadc
kakerukaeru
0
530
The Shining / ~all work and no play makes jack a dull boy~
kakerukaeru
0
330
AmebaとCDNのお付き合いの歴史 / ameba cdn waiwai
kakerukaeru
0
100
fastlyでええかんじにサイトリニューアル @ Yamagoya Meetup 2018 / e-kanzi Website renewal with fastly
kakerukaeru
0
500
ghe_ameba_arekore
kakerukaeru
2
2.1k
20160907_Akamai_Tech_Deep_Dive
kakerukaeru
0
2.1k
はじめるCassandra
kakerukaeru
1
290
ansible is nani
kakerukaeru
1
350
Other Decks in Technology
See All in Technology
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
130
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
180
TypeScript、上達の瞬間
sadnessojisan
46
13k
アジャイルチームがらしさを発揮するための目標づくり / Making the goal and enabling the team
kakehashi
3
140
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
160
The Role of Developer Relations in AI Product Success.
giftojabu1
0
140
Engineer Career Talk
lycorp_recruit_jp
0
190
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
300
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
950
生成AIが変えるデータ分析の全体像
ishikawa_satoru
0
170
ノーコードデータ分析ツールで体験する時系列データ分析超入門
negi111111
0
420
Making your applications cross-environment - OSCG 2024 NA
salaboy
0
190
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
28
2k
Adopting Sorbet at Scale
ufuk
73
9.1k
10 Git Anti Patterns You Should be Aware of
lemiorhan
655
59k
Designing the Hi-DPI Web
ddemaree
280
34k
Why Our Code Smells
bkeepers
PRO
334
57k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Automating Front-end Workflow
addyosmani
1366
200k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
BBQ
matthewcrist
85
9.3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Transcript
© 2022, Amazon Web Services, Inc. or its affiliates. All
rights reserved. ࣄۀͱาΉ Ameba γεςϜ৽ͷಓ גࣜձࣾαΠόʔΤʔδΣϯτ ϝσΟΞ Amebaࣄۀຊ෦ CTO גࣜձࣾαΠόʔΤʔδΣϯτ ϝσΟΞ Amebaࣄۀຊ෦ Engineer ؠӬ ᠳ C U S - 3 1 ຊηογϣϯࢿྉهࡌ༰ʹ͍ͭͯҰͷస༻Λېࢭ͓ͯ͠Γ·͢
ؠӬ ᠳ Engineer / Ameba ٕज़ऀ KAKERU IWANAGA ̎ͪΐͬͱલ͔ΒAmebaͷٕज़ऀͯ͠·͢ Webٕज़ͱSREք۾ͷ͕͖Ͱ͢
͖ͳ͍ͨম͖ͷຯ܀͖ΜͱΜͰ͢ ΞϚκϯ Σϒ αʔϏε ( AWS ) େ͖Ͱ͢ʂ Engineer KAZUYA NAMBA AmebaͰΤϯδχΞΛγ͍ͯ·͢ 3ࣇͷͰ͢ɻࢠڙୡͱLEGOͰ༡ΜͰ·͢ɻ
CHAPTER1 Amebaͷྺ࢙ CHAPTER2 ৽ϓϩδΣΫτ্ཱͪ͛ Phase 1. Vision/Missionࡦఆ Phase 2. ϓϩδΣΫτԽ
Phase 3. ࣮ݱՄೳੑͷਫ਼্͛ CHAPTER3 AmebaPlatformͷ֓ཁ CHAPTER4 ·ͱΊ Contents
Amebaͷྺ࢙ CHAPTER 1 History
AmebaϒϩάΛத৺ͱͨ͠ ϝσΟΞϓϥοτϑΥʔϜ History
17ͷྺ࢙ʹΑΔ༷ʑͳมԽ Ξϝʔόϒϩάੜ 2015 ϩΰϦχϡʔΞϧ 2020 16प Ameba Piggੜ εϚϗγϑτ 2004
2009 2011 2015 2020 History
ग़యɿhttps://speakerdeck.com/cyberagent_recruit/cypitch?slide=23 ϝσΟΞࣄۀͷࢿͷྺ࢙ History
ख़ظ͔Β࠶ੜظ History
ଞαʔϏεͷ಄ History
͞Βʹྺ࢙ͷ͔͞ΒϓϩμΫτʹ͓͍ͯ ݹ͍ػೳγεςϜ͕ଟ͓ͬͯ͘Γɺ େ͖ͳෛ࠴๊͍͑ͯͨɻ ࠔΔϯΰ History
՝Λ͏গ͠ਂ΅Δ
History ࣄۀͷܧଓͱͱʹංେԽͨ͠γεςϜ ΞΧϯτ 200+ VM 6000+ ϦϙδτϦ 800+
ظͱൺֱͯ͠ॖখͨ͠৫ • ʮେਓͰͱʹ͔͘৽ن։ൃͷ࣌ʯ͔Βɺ ʮϓϩμΫτΛগਫ਼ӶͰຏ্͖͛Δ࣌ʯ • ͩͨ͠ɺੵΈॏͶ͖ͯͨେͳγεςϜͷอकܧଓ History
ٕज़બఆͷࡶ͞ʹΑΔೝෛՙ History Google Cloud Platform
History ࣄۀมભʹΑΔೝෛՙ
ࢢͷมԽɺαʔϏε৫ͷมԽʹ߹Θͤͯ ࢢ͕ٻΊΔεϐʔυͰɺૉૣ͘։ൃͰ͖Δ৫ γεςϜมԽ͢Δඞཁ͕͋Δ
৽ϓϩδΣΫτ্ཱͪ͛ CHAPTER 2 How
Vision AmebaͷVision͔Β ٕज़ઓུͰୡ͢Δঢ়ଶඪͱ ۩ମϓϩδΣΫτͱམͱ͍ͯ͘͠
Vision
γεςϜͰୡ͢Δঢ়ଶඪ ࣄۀऀ ΤϯδχΞऀͨͪ Ameba͕͜ͷઌɺ 10։ൃΛؾ࣋ͪΑ͘εϜʔζʹଓ͚ΒΕΔঢ়ଶ PM
ঢ়ଶඪͷͨΊͷɺཱ݅Λચ͍ग़͢ϫʔΫ
ཱ݅ͷཧ > ͜ΕΒΛ̏࣠ΛMissionͱͯ͠৽Project͕ಈ͖ग़͢͜ͱʹ Ameba͕ఏڙ͍ͨ͠ՁʹԊͬͨ αʔϏεͱγεςϜαΠζʹͳ͍ͬͯΔ ෛ࠴ͷՄࢹԽ͕Έͱͯ͠ػೳ͠ɺ ࣄۀஅͷʹ͋͛ΒΕΔঢ়ଶʹͳ͍ͬͯΔ Amebaͱͯ͠౷߹͞ΕͨΞʔΩςΫνϟΛ࣠ʹ γεςϜΛ࠶ߏஙͰ͖͍ͯΔ
ཱ݅ͷཧ > ͜ΕΒΛ̏࣠ΛMissionͱͯ͠৽Project͕ಈ͖ग़͢͜ͱʹ Ameba͕ఏڙ͍ͨ͠ՁʹԊͬͨ αʔϏεͱγεςϜαΠζʹͳ͍ͬͯΔ ෛ࠴ͷՄࢹԽ͕Έͱͯ͠ػೳ͠ɺ ࣄۀஅͷʹ͋͛ΒΕΔঢ়ଶʹͳ͍ͬͯΔ Amebaͱͯ͠౷߹͞ΕͨΞʔΩςΫνϟΛ࣠ʹ γεςϜΛ࠶ߏஙͰ͖͍ͯΔ
ཱ݅ͷཧ > ͜ΕΒΛ̏࣠ΛMissionͱͯ͠৽Project͕ಈ͖ग़͢͜ͱʹ > ݴ͍͑Δͱ ̍ʣ৽ϓϩδΣΫτલʹ ౷ഇ߹Λ܁Γฦ͠ɺγεςϜࣗମΛεϦϜԽ͠ ̏ʣ৽Ռ ܭଌՄೳͳࢦඪͰஅɻࢦඪܦӦࢦඪͱͯ͠ӡ༻ ̎ʣͬͨγεςϜ͕࣋ͭAmebaݻ༗ͷ՝Λղফ͠
AWSϑϧεΫϥονͰஈ֊৽Ҡઃ
ཱ݅ͷཧ > ͜ΕΒΛ̏࣠ΛMissionͱͯ͠৽Project͕ಈ͖ग़͢͜ͱʹ > ࣮ߦʹࢸΔ·Ͱ Ameba͕ఏڙ͍ͨ͠ՁʹԊͬͨ αʔϏεͱγεςϜαΠζʹͳ͍ͬͯΔ ෛ࠴ͷՄࢹԽ͕Έͱͯ͠ػೳ͠ɺ ࣄۀஅͷʹ͋͛ΒΕΔঢ়ଶʹͳ͍ͬͯΔ Amebaͱͯ͠౷߹͞ΕͨΞʔΩςΫνϟΛ࣠ʹ
γεςϜΛ࠶ߏஙͰ͖͍ͯΔ
ཱ݅ͷཧ > ͜ΕΒΛ̏࣠ΛMissionͱͯ͠৽Project͕ಈ͖ग़͢͜ͱʹ Ameba͕ఏڙ͍ͨ͠ՁʹԊͬͨ αʔϏεͱγεςϜαΠζʹͳ͍ͬͯΔ ෛ࠴ͷՄࢹԽ͕Έͱͯ͠ػೳ͠ɺ ࣄۀஅͷʹ͋͛ΒΕΔঢ়ଶʹͳ͍ͬͯΔ Amebaͱͯ͠౷߹͞ΕͨΞʔΩςΫνϟΛ࣠ʹ γεςϜΛ࠶ߏஙͰ͖͍ͯΔ ࠓίίΛ
ޙ΄Ͳਂ΅Γ·͢
ཱ݅ͷཧ > ͜ΕΒΛ̏࣠ΛMissionͱͯ͠৽Project͕ಈ͖ग़͢͜ͱʹ > ࣮ߦʹࢸΔ·Ͱ Ameba͕ఏڙ͍ͨ͠ՁʹԊͬͨ αʔϏεͱγεςϜαΠζʹͳ͍ͬͯΔ ෛ࠴ͷՄࢹԽ͕Έͱͯ͠ػೳ͠ɺ ࣄۀஅͷʹ͋͛ΒΕΔঢ়ଶʹͳ͍ͬͯΔ Amebaͱͯ͠౷߹͞ΕͨΞʔΩςΫνϟΛ࣠ʹ
γεςϜΛ࠶ߏஙͰ͖͍ͯΔ
ACTION ͦΕͧΕͷMissionʹର͠ ͲͷΑ͏ʹΞϓϩʔνΛ͍͔ͯ͘͠
Amebaͱͯ͠ ౷߹͞ΕͨΞʔΩςΫνϟΛ࣠ʹ γεςϜΛ࠶ߏஙͰ͖͍ͯΔ Mission 2
ٕज़બఆͷࡶ͞ʹΑΔೝෛՙ Mission > Amebaͱͯ͠౷߹͞ΕͨΞʔΩςΫνϟΛ࣠ʹγεςϜΛ࠶ߏஙͰ͖͍ͯΔ Google Cloud Platform
ར༻͢Δٕज़Λ੍ݶ Mission > Amebaͱͯ͠౷߹͞ΕͨΞʔΩςΫνϟΛ࣠ʹγεςϜΛ࠶ߏஙͰ͖͍ͯΔ > Ξϓϩʔν Google Cloud Platform
Mission > Amebaͱͯ͠౷߹͞ΕͨΞʔΩςΫνϟΛ࣠ʹγεςϜΛ࠶ߏஙͰ͖͍ͯΔ > Ξϓϩʔν ։ൃϑϩʔͷ౷߹ Development Delivery Operation Project
Template Project Template CI Terraform AWS
Mission > Amebaͱͯ͠౷߹͞ΕͨΞʔΩςΫνϟΛ࣠ʹγεςϜΛ࠶ߏஙͰ͖͍ͯΔ ࣮ߦͷΞϓϩʔν • ΠϯϑϥΛAWS্ʹ౷߹ = AmebaPlatform • AWSબఆཧ༝ɿDBͷ҆ఆੑɺAmebaϝϯόʔͷशख़ɺϚωʔδυαʔϏεͷॆ࣮
• ٕज़બఆΛ੍͋͑ͯݶ͠ɺ։ൃϑϩʔΛڞ௨Խ • AmebaγεςϜݻ༗ͷΛղܾͭͭ͠ɺGoͰ࠶࣮ͯ͠ΦϯϓϨ͔ΒAWSҠߦ • ҠߦෛՙΛݮΒͨ͢Ίͷڞ௨ϥΠϒϥϦܗΛఏڙ • ༏ઌ͕͍ͷҰ࣌తʹطଘDCͰܧଓ ࣮ݱ͞ΕΔ͜ͱ • ֶशίετͱอकෛ୲ͷܰݮ • ։ൃޮͷ্ • ਓࡐͷྲྀಈੑͷ্
ෛ࠴ͷՄࢹԽ͕Έͱͯ͠ػೳ͠ɺ ࣄۀஅͷʹ͋͛ΒΕΔঢ়ଶʹͳ͍ͬͯΔ Mission 3
Mission > ෛ࠴ͷՄࢹԽ͕Έͱͯ͠ػೳ͠ɺࣄۀஅͷʹڍ͛ΒΕΔঢ়ଶʹͳ͍ͬͯΔ ৽ͷޭՄ൱ ෛ࠴ͷྺ࢙Λ܁Γฦ͞ͳ͍ͨΊʹ ܭଌՄೳࢦඪͰͷɺ߹ҙܗ͕ඞཁ
Mission > ෛ࠴ͷՄࢹԽ͕Έͱͯ͠ػೳ͠ɺࣄۀஅͷʹڍ͛ΒΕΔঢ়ଶʹͳ͍ͬͯΔ γεςϜέΠύϏϦςΟ • ͍ΘΏΔγεςϜͷσϦόϦʔύϑΥʔϚϯεΛՄࢹԽ • ͜ΕΒͷࢦඪ͕৽લޙͰվળ͞Ε͍ͯΔ͜ͱɺ ɹɹɹ·ͨࠓޙܧଓతʹҡ࣋ग़དྷΔࣄΛࢦ͢
• four keys Project Λར༻ ։ൃ৫έΠύϏϦςΟ • Amebaݻ༗ͷ։ൃͷॏ͞ʹରͯ͠ͷΞϓϩʔν • όϦϡʔετϦʔϜϚοϐϯάͰ։ൃͷॏ͞ΛੳɾՄࢹԽ • ৽Ͱղܾ͍ͨ͠Amebaݻ༗ͷೝෛՙʹΑΔ • ӡ༻ɾ։ൃൺͷܧଓͨ͠ܭଌͱՄࢹԽ • [WIP] asana Ͱܧଓͯ͠ϘτϧωοΫܭଌ
Mission > ෛ࠴ͷՄࢹԽ͕Έͱͯ͠ػೳ͠ɺࣄۀஅͷʹڍ͛ΒΕΔঢ়ଶʹͳ͍ͬͯΔ > γεςϜέΠύϏϦςΟ ܭଌରͱɺAmebaతఆٛ • σϓϩΠස • deployͷΛऔΔ͚ͩ؆୯
• ϦʔυλΠϜ • σϓϩΠʹؚ·ΕΔશͯͷίϛοτͷதԝ • σϓϩΠʹؚ·ΕΔ࠷ॳͷίϛοτͷதԝ • MTTR • ΞϓϦέʔγϣϯͷ෮ݩ࣌ؒͰͳ͘ • ࢹΞϥʔτʹΑΔ෮ݩ࣌ؒΛଌఆ • োมߋ • จతʹͦ͜·Ͱॏཁࢹ͞Εͯͳ͔ͬͨͷͰ༏ઌԼ͛
Mission > ෛ࠴ͷՄࢹԽ͕Έͱͯ͠ػೳ͠ɺࣄۀஅͷʹڍ͛ΒΕΔঢ়ଶʹͳ͍ͬͯΔ > γεςϜέΠύϏϦςΟ Handler DATA Incidents Commits Deployments
PR ूܭγεςϜͱɺAmebaతܭଌख๏ • σϓϩΠසɾϦʔυλΠϜ • GitHub Deployments api ͔Β commit ཤྺΛऩू • GitHub Actions workflowΛࣄલʹ४උ • ରrepoʹ Actions ΛίϐϖͰࠐΉ • MTTR • طଘͷΠϯγσϯτϑϩʔΛ • Datadog incident ཧʹஔ͖͑Δ • Datadog API ͔Β σʔλΛऔͬͯ͛ࠐΉ
Mission > ෛ࠴ͷՄࢹԽ͕Έͱͯ͠ػೳ͠ɺࣄۀஅͷʹڍ͛ΒΕΔঢ়ଶʹͳ͍ͬͯΔ γεςϜέΠύϏϦςΟ • ͍ΘΏΔγεςϜͷσϦόϦʔύϑΥʔϚϯεΛՄࢹԽ • ͜ΕΒͷࢦඪ͕৽લޙͰվળ͞Ε͍ͯΔ͜ͱɺ ɹɹɹ·ͨࠓޙܧଓతʹҡ࣋ग़དྷΔࣄΛࢦ͢
• four keys Project Λར༻ ։ൃ৫έΠύϏϦςΟ • Amebaݻ༗ͷ։ൃͷॏ͞ʹରͯ͠ͷΞϓϩʔν • όϦϡʔετϦʔϜϚοϐϯάͰ։ൃͷॏ͞ΛੳɾՄࢹԽ • ৽Ͱղܾ͍ͨ͠Amebaݻ༗ͷೝෛՙʹΑΔ • ӡ༻ɾ։ൃൺͷܧଓͨ͠ܭଌͱՄࢹԽ • [WIP] asana Ͱܧଓͯ͠ϘτϧωοΫܭଌ
·ͱΊ ࣄۀ͕ఏڙ͍ͨ͠ՁͱγεςϜͷαΠζΛఆΊ γεςϜΛγϯϓϧʹ͍ͯ͘͠ ͦͷޙɺٕज़ͷඪ४Խͱڞ௨ԽΛਐΊ ։ൃ͍͢͠γεςϜͷҠߦΛ࣮ࢪ ݁Ռɺ ܭଌՄೳࢦඪͰৼΓฦΔ CHAPTER 2
ACTION ৽ϓϩδΣΫτͷ ࣮ݱՄೳੑͷਫ਼্͛
࣮ߦ·Ͱͷน AWSͷશҠߦڊେͳࢿ ΤϯδχΞઢͰͷཧ͚ͩͰͳ͘ ܦӦ͔Βݟͨࢿε͖ཧ༝ͷཧ͕ඞཁ
࣮ߦ·Ͱͷน > ཧͷ؍ һ ࣄۀऀ ΤϯδχΞ ऀ PM ΦϯϓϨDC ऀ
ࣄۀܭը ίετ Ռ
࣮ߦ·Ͱͷน > ͑ͨϙΠϯτ ৽ܭըɺͱ࣮ݱίετ • 200+ ΞΧϯτશͯͷҠߦܭըͱίετͷࢼࢉ • ৽ΞϦφγɺAWSΞϦφγɺύλʔϯશͯͰࢉग़ •
ίετࢼࢉͷ؍ • Πϯϑϥݻఆඅ • AWS / GCP / private cloud • ৽్தͷ։ൃਓ݅අɾӡ༻ਓ݅අ • ҠߦܭըͰͷฒߦՔಈͷඅ༻ͷࢼࢉ • ৽ޙͷ։ൃਓ݅අɾӡ༻ਓ݅අ • ΦϯϓϨ&AWSಛ༗ͷӡ༻ίετΛࢼࢉ • ΤϯδχΞશһͷՔಇ࣮ΛνέοτϕʔεͰूܭ • AWSҠߦલޙͰͷίετࠩͷࢼࢉ
࣮ߦ·Ͱͷน > ͑ͨϙΠϯτ ৽Ռɺͱ࣮ݱίετ • AWS ϚωδυϝϦοτΛ͍·ͷ··࣮ݱ͢Δίετࢼࢉ • Ameba͕ٻΊΔϚωδυϝϦοτʹର͠DesignDocsΛهࡌ •
ΦϯϓϨΤϯδχΞͱڠۀ͠ɺ • ΦϯϓϨͰࣗ࡞ϚωδυΛ࡞Δ߹ͷ࣮ݱཁ݅ɺ࣮ݱख๏ɺ։ൃˍҡ࣋ίετΛࢼࢉ • ComputeɺDatabaseΛத৺ʹٞ ৽ϓϩδΣΫτɺͱࣄۀܭը • 100Ѫ͞ΕΔϝσΟΞΛΔ • ͦͷલఏʹཱͬͨ࣌ʹɺ։ൃ͍͢͠ΛಘΔ·Ͱͷ • େن৽ϓϩδΣΫτΛߦ͏ϦεΫ • ࢿޮՌΛճऩग़དྷΔ·Ͱࣄۀ͕ͯΔ͔ • ͦΕΒશͯΛࣄۀܭըʹҾ͖͠ɺ࠷ऴతʹϑϥοτʹஅ
࣮ߦ·Ͱͷน > ࣮ࢪͷաఔ
࣮ߦ·Ͱͷน > ͔ͬͨ͜ͱɾม͑ͨ͜ͱ ग़͖ͯͨࣄ࣮ • ৽ن։ൃΑΓӡ༻อकʹׂ͕࣌ؒ͘ଟ͍ͱ͍͏࣮ଶ • AWSҠߦʹΑΓอकൺΛม͑ΒΕͦ͏ͳݟ௨͠ • ࠷খߏͷࣗ࡞ϚωδυΛ࣮ݱ͢Δ͚ͩͳΒ
ɹɹ։ൃˍҡ࣋ίετؚΊͯΦϯϓϨͷํ͕͍҆ ม͑ͨ͜ͱ • ৽ޭͷ݁Ռࢦඪʹɺ։ൃͱӡ༻ൺ͕ٯస͍ͯ͠ΔɺΛՃ • ʹΔɺίετߏͷςίೖΕϓϩδΣΫτΛ࣮ࢪ • ݱߦγεςϜͷΠϯϑϥߏɺΞϓϦߏɺ։ൃମ੍ɺ͘ݟ͠मਖ਼ • ίετߏͷվֵʹΑΓɺ • ฒߦӡ༻࣌ظɺશҠߦޙɺڞʹϓϩδΣΫτ࣮ࢪલΑΓίετΛ͑͘ΒΕΔݟ௨͠ • Amazon EC2 Reserved InstancesɺMigration Acceleration Programซ༻͠ɺ ɹҠߦޙγεςϜͷ͞ΒͳΔίετΧοτ࣮ࢪ
·ͱΊ ࣄۀ͔Βམͱͨ͠৽ʹ͓͚Δ࣠Λ࡞Γɺ ΰʔϧઃఆదͳঢ়ଶඪͱܭଌՄೳࢦඪͰߦ͏ ࣄۀܭըͱฒͨ͠৽ܭըͰɺ ࣄۀͷܧଓՄೳੑͱൃలΛݟਾ͑ͨଧͪखʹɻ ৽ʹ͓͚Δૂ͏Ϛτͱ࣮ߦͷҙࢥܾఆ·Ͱɺ ࣄۀऀͱڞʹาΈɺҰؾʹܾΊΔ
AmebaPlatformͷ֓ཁ CHAPTER 3 Overview
ؠӬ ᠳ Engineer / Ameba ٕज़ऀ KAKERU IWANAGA ̎ͪΐͬͱલ͔ΒAmebaͷٕज़ऀͯ͠·͢ Webٕज़ͱSREք۾ͷ͕͖Ͱ͢
͖ͳ͍ͨম͖ͷຯ܀͖ΜͱΜͰ͢ Engineer KAZUYA NAMBA AmebaͰΤϯδχΞΛ͍ͯ͠·͢ 3ࣇͷͰ͢ɻࢠڙୡͱLEGOͰ༡ΜͰ·͢ɻ
AmebaPlatformͷ֓ཁ AmebaPlatform͕Ͱ͖Δ·Ͱ
2020 2021 2022 AmebaPF MVP Vision/Mission AmebaPF FB Ameba AWS
AWS k8s AuthZ DC x 3 x 10 x 4
AmebaPlatformͷ֓ཁ AmebaPlatformͰ ࣮ݱ͔ͨͬͨ͜͠ͱ
AmebaPlatformͰ࣮ݱ͔ͨͬͨ͜͠ͱ AmebaPlatformͷࣄྫͰհ͢Δར༻AWSαʔϏε • Amazon Elastic Kubernetes Service • Amazon Kinesis
Data Streams • Amazon Aurora • Amazon OpenSearch Service • Amazon ElastiCache • Amazon Simple Storage Service • Amazon Simple Queue Service • Amazon Simple Notification Service • AWS Lambda • AWS Secrets Manager
AmebaPlatformͰ࣮ݱ͔ͨͬͨ͜͠ͱ AmebaPlatformͰ࣮ݱ͔ͨͬͨ͜͠ͱ • ڥͷ • ෛՙࢼݧڥͷఏڙ • IaCͷ࣮ફ • ΦϯϓϨͱΫϥυؒͷଓ
• ϚΠΫϩαʔϏεؒͷೝՄ • ελʔλʔηοτͷఏڙ • CI/CDͷ౷߹ • ϩάج൫ͷఏڙ • ࢹͷҰݩԽ • ηΩϡϦςΟͷ୲อ
AmebaPlatformͰ࣮ݱ͔ͨͬͨ͜͠ͱ > ڥͷ ڥͷ • ։ൃޮΛॏࢹ͠ɺඞཁ࠷ݶͷʹ γϯάϧΞΧϯτ (= NOT ϚϧνΞΧϯτ)
• ։ൃମݧͱͯ͠ͷγϯϓϧ͞Λ༏ઌ • ServiceQuotaͷHardLimitࣄલʹཁݕ౼ Ϛϧνςφϯτ (=NOT γϯάϧςφϯτ) • ΫϥελཧίετΛ࠷খԽ • ো࣌ͷӨڹൣғ͕େ͖͘ͳΔࣄΛڐ༰Ͱ͖Δ͔ • ڞ༻ڥɺෛՙࢼݧڥΞΧϯτΛׂ
AmebaPlatformͰ࣮ݱ͔ͨͬͨ͜͠ͱ > ෛՙࢼݧڥͷఏڙ ෛՙࢼݧڥͷఏڙ ࣮ݱ͍ͨ͜͠ͱ • ಠཱͨ͠ڥʹɺຊ൪ಉͷڥΛ࠶ݱ • ݱ࣮తͳඅ༻Ͱͷӡ༻ ඞཁͳϦιʔεʹݶఆͯ͠ߏங
• ඞཁͳϦιʔεΛࢼݧຖʹߏங • terraformͱkubernetesΛར༻࣮ͯ͠ݱ ຊ൪ڥͷσʔλΛར༻͢ΔΈ • Amazon Aurora ͷ Cloningػೳ Λར༻ͨ͠ߴͳෳ • Resource Access Manager ʹΑΔ҆શͳϦιʔεڞ༗
AmebaPlatformͰ࣮ݱ͔ͨͬͨ͜͠ͱ > IaCͷ࣮ફ IaCͷ࣮ફ ϦιʔεͷҰݩཧɺྑϦιʔεͷࢭ • AWS্ͷϦιʔε΄΅શͯTerraformͰཧ • ୯ҰϦϙδτϦͰશͯͷϦιʔεΛఆٛ •
ڞ௨ج൫ͱMSຖʹtfstateΛׂ • ݸผʹCODE_OWNERSΛઃఆ • Moduleʹؔͯ͠ผϦϙδτϦͰཧ • Github Actions Ͱ࣮ߦ • self-hosted runner ͷmyshoesΛར༻ • ࢀߟ: CyberAgent ʹ͓͚Δ OSS ͷ CI/CD ج൫։ൃ
AmebaPlatformͰ࣮ݱ͔ͨͬͨ͜͠ͱ > ΦϯϓϨͱΫϥυؒͷଓ > ࢥ ΦϯϓϨͱΫϥυؒͷଓ > ํ γεςϜҠߦதʹ࣮ݱ͍ͨ͠՝ •
̍ʣΦϯϓϨͷηΩϡΞͳ௨৴ػߏ • ̎ʣAWSҠߦޙγεςϜͷηΩϡΞͳ௨৴ػߏ • ͲͪΒɺIP੍ݶͷӡ༻ͨ͘͠ͳ͍ • PF্ͰͷೝূೝՄͷΈΛར༻Ͱ͖ΕΑΓGood • DXҎԼͷ؍Ͱબࢶ͔Βআ֎ • SLA͕ͳ͍ • CAશࣾͰઐ༻ઢΛڞ༗͠ෛՙ͕՝ • ͨͩ͠ɺDBͷMigrationʹར༻
AmebaPlatformͰ࣮ݱ͔ͨͬͨ͜͠ͱ > ΦϯϓϨͱΫϥυؒͷଓ > ࣮ ΦϯϓϨͱΫϥυؒͷଓ > ࣮ AWS to
ΦϯϓϨͷ௨৴ / Internal Gateway • mTLS + ClientID/Secret ϕʔεͷೝূ • ClientIDϕʔεͷΞΫηε੍ޚ • nginx (mTLS) + go ࣗલ proxy ( ೝূ, AC ) ΦϯϓϨ to AWSͷ௨৴ / External Gateway • ClientID/Secret ϕʔεͷೝূ • ClientIDϕʔεͷΞΫηε੍ޚ • HTTP/gRPCͷม • .protoར༻ͤͣreflectionͰಈతʹม
AmebaPlatformͰ࣮ݱ͔ͨͬͨ͜͠ͱ > ϚΠΫϩαʔϏεؒͷೝՄ ϚΠΫϩαʔϏεؒͷೝՄ Ϛϧνςφϯτͳߏʹ͓͚Δ՝ • ҙਤ͠ͳ͍ܦ࿏ʹΑΔ௨৴ͷࢭ • ޓ͍ͷཧղෆ͔Βൃੜ͢Δ૬ޓґଘ •
ແҙຯͳܦ࿏Λᷖճͨ͠ࢀরɺͳͲ… ClientIDΛར༻ͨ͠ೝՄͷΈ • CBAC(Context Based Access Control)ͷఏڙ • ڐՄ͞ΕͨClientIDʹͷΈΞΫηεΛڐՄ • ཧπʔϧ͔ΒڐՄઃఆΛొ • ڞ௨ϥΠϒϥϦͰInterceptorΛఏڙ
AmebaPlatformͰ࣮ݱ͔ͨͬͨ͜͠ͱ > ελʔλʔηοτͷఏڙ ελʔλʔηοτͷఏڙ ڞ௨ϥΠϒϥϦͷఏڙ • Go(libgo)ͱNodejs(libjs)Λఏڙ • ڞ௨Խ͢Δ͜ͱͰϥΠϒϥϦͷVersionͷैΛ౷߹తʹཧ •
Dependabotͷӡ༻ • HTTP/gRPC server, client, logger, metrics, tracing, etc… Project Template ͷఏڙ • GithubͷTemplate Repository Λར༻ͯ͠৽نʹMSΛ࡞͢ΔࡍͷܗΛఏڙ • Local Development, CI, HTTP/gRPC Server, Configuration, etc…
AmebaPlatformͰ࣮ݱ͔ͨͬͨ͜͠ͱ > CI/CDͷ౷߹ CI/CDͷ౷߹ ౷Ұ͞ΕͨσϦόϦʔύΠϓϥΠϯͷఏڙ • CI: Github Actions •
Project TemplateͰϕʔεΛఏڙ • TestɺLintɺContainer Image Build & Pushɺetc… • CD: ArgoCD • manifestҰݩཧ • manifestͱclusterͷঢ়ଶΛҰகͤ͞Δ(gitops) • fluxcdΛར༻ͨ͠image tagͷࣗಈߋ৽ • kubevelaΛར༻ͯ͠ޮԽ • ࢀߟ: γϯάϧΫϥελʔϚϧνςφϯγʔΛࢦ͍ͯ͠ΔEKS্Ͱkubevelaͷӡ༻Λͯ͠Έͨ
AmebaPlatformͰ࣮ݱ͔ͨͬͨ͜͠ͱ > ϩάج൫ͷఏڙ ϩάج൫ͷఏڙ Amazon EKS ͷϩάΛू • ෳͷ৴ઌͷରԠ •
Amazon KDS Λհͯ͠ෳͷܦ࿏ʹׂ • ڞ௨ϥΠϒϥϦͰLoggerΛఏڙ • ڞ௨ͷLogFormatΛఆٛ • ඪ४ग़ྗʹు͔ΕͨϩάΛऩू • ίετͷ࠷దԽ • Sampling, Amazon S3 LifeCycle, etc…
AmebaPlatformͰ࣮ݱ͔ͨͬͨ͜͠ͱ > ౷߹͞Εͨࢹ ࢹͷҰݩԽ Datadog ͰࢹΛҰݩԽ • AWS Resources ͱ
Application Metrics • Dashboard, Monitoring, APM ͳͲ • ڞ௨ϥΠϒϥϦͰmetricsͷग़ྗػߏΛఏڙ • kubevelaͰannotationΛఆٛ͠metricsΛௐ • Monitorͷ໋໊نଇɺ௨༰ͷݟ͠ͳͲɺܧଓతͳվળ • Datadog Incidentͱ Postmortem Λར༻ͨ͠োͷܭଌɺՄࢹԽ
AmebaPlatformͰ࣮ݱ͔ͨͬͨ͜͠ͱ > ηΩϡϦςΟͷ୲อ ηΩϡϦςΟͷ୲อ ։ൃޮͱηΩϡϦςΟͷཱ྆ • ࣾԣஅͰಋೖ͞Ε͍ͯΔ༧/ൃݟతΨʔυϨʔϧ • ࢀߟ: 600ΞΧϯτͷηΩϡϦςΟΛݟΔ
• ݖݶཧʹࣾIDج൫ͱ࿈ܞͯ͠RoleΛཧ • ࢀߟ: ೝূ/ೝՄج൫PERMANͷհ • kubevelaͰSecurityContextΛҰઃఆ • SecretsManager + external-secretsͰCredentialΛཧ • MITREΛࢀߟʹજࡏతͳϦεΫɺڴҖΛཧ͍ͯ͠Δ
৽શମͷาΈ ҠߦΛਐΊͯΈͯ
ҠߦΛਐΊͯΈͯ ࣦഊͨ͜͠ͱɺۤ࿑͍ͯ͠Δ͜ͱ ߟྀ࿙ΕʹΑΔτϥϒϧ • େྔͷϩάϑΝΠϧ͕֨ೲ͞ΕͨS3 BucketʹLifeCycleΛઃఆͨ͠ॠؒίετ͕ٸ૿ • ҠߦγεςϜ͕ఆΑΓ૿͑ͨ͜ͱͰIPރׇͷݒ೦͕ൃੜ͠VPCΛ࠶࡞ ϚϧνςφϯτͷཁૉʹΑΔқ •
ϒϥϯνઓུɺϚϧνϥΠϯ։ൃͳͲɺཧΛٻΊΔͱͲΕඇৗʹ͍͠
ҠߦΛਐΊͯΈͯ ྑ͔ͬͨ͜ͱ ఆྔతͳՌ • ࣮ࡍʹ27αʔϏε͕AmebaPFʹҠߦɺ23͕ຊ൪Քಇ։࢝ • Four keysࢦඪϦʔυλΠϜͰ̓ഒͷվળ ఆੑతͳՌ •
৽نҊ݅ΛAmebaPF্Ͱ࣮ɺޮΑ͘։ൃͰ͖ͨͱͷFB • ͷෛ࠴ண࣮ʹղফ͍ͯ͠Δ
·ͱΊ CHAPTER 4 Summary
·ͱΊ • Amebaͷ৽ʹ͍ͨΔഎܠ • ࣄۀͱγεςϜαΠζͷဃ • αʔϏεݻ༗ͷٕज़ཁૉʹΑΔೝෛՙͱ։ൃྗͷԼ • ৽PJTͷཱ͚ͯͱਐΊํ •
ࣄۀܭըͱฒͨ͠৽ܭը • దͳঢ়ଶඪͱܭଌՄೳࢦඪΛ͏ΰʔϧઃܭ • AmebaPlatformͷ֓ཁ • ࢦͨ͠ͷɺͲ͏࣮ݱ͔ͨ͠
৽ͰFour keysࢦඪʹվળݟΒΕͨͷͷɺ HighPerformerͳͷͰվળͷ༨͋Γɻ ܭଌΧόϨοδ70/800repoͳͷͰ͜Ε͔Β📈👩💻 ͜Ε͔Β (1/2) ͏ҰͭͷࢦඪͰ͋Δӡ༻ͷൺΛԼ͛Δɺ γεςϜฒߦՔಈ͕ଟ͘·ͩ·ͩ͜Ε͔Β💪
͜Ε͔Β (2/2) ϒϩάຊମͷ৽࢝·͔ͬͨΓɻ ͜Ε͔Β͔͚̍ͯҠߦ͍ͯ͘͠ ΓͷAmebaͷαϒγεςϜ܊ɺ ౷ഇ߹Λ܁Γฦ͠AmebaPF্ʹ࡞Γ͍ͯ͘͠ɻ AmebaPF·ͩ·ͩ࠷ݶͷػೳ ৽PJͱฒ͠Productivityʹ͖߹͍ଓ͚Δ🦮
͍͞͝ʹ 100Ѫ͞ΕΔϝσΟΞΛΔɺΛ γεςϜ͔Βޙԡ͢͠Δ We Are Hiring!!
Thank you! © 2022, Amazon Web Services, Inc. or its
affiliates. All rights reserved. ؠӬ ᠳ גࣜձࣾαΠόʔΤʔδΣϯτ ϝσΟΞ Amebaࣄۀຊ෦ CTO גࣜձࣾαΠόʔΤʔδΣϯτ ϝσΟΞ Amebaࣄۀຊ෦ Engineer ຊηογϣϯࢿྉهࡌ༰ʹ͍ͭͯҰͷస༻Λېࢭ͓ͯ͠Γ·͢