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
490
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
AIチャットボット開発への生成AI活用
ryomrt
0
170
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
120
ドメイン名の終活について - JPAAWG 7th -
mikit
33
20k
開発生産性を上げながらビジネスも30倍成長させてきたチームの姿
kamina_zzz
2
1.7k
フルカイテン株式会社 採用資料
fullkaiten
0
40k
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
860
The Rise of LLMOps
asei
5
1.2k
AGIについてChatGPTに聞いてみた
blueb
0
130
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
28
12k
元旅行会社の情シス部員が教えるおすすめなre:Inventへの行き方 / What is the most efficient way to re:Invent
naospon
2
330
オープンソースAIとは何か? --「オープンソースAIの定義 v1.0」詳細解説
shujisado
4
530
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
Featured
See All Featured
Unsuck your backbone
ammeep
668
57k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
Designing Experiences People Love
moore
138
23k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
Why Our Code Smells
bkeepers
PRO
334
57k
Speed Design
sergeychernyshev
24
610
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Embracing the Ebb and Flow
colly
84
4.5k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
109
49k
Documentation Writing (for coders)
carmenintech
65
4.4k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
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 ຊηογϣϯࢿྉهࡌ༰ʹ͍ͭͯҰͷస༻Λېࢭ͓ͯ͠Γ·͢