Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
AWS Summit Tokyo 2023_PayPay
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
PayPay Corporation.
PRO
Private link
Technology
3.9k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
AWS Summit Tokyo 2023_PayPay
PayPay Corporation.
PRO
More Decks by PayPay Corporation.
See All by PayPay Corporation.
【Engineering for New Bank Project】Recruiting Factbook
paypaycorporation
PRO
0
450
Recruiting FACTBOOK_内部統制部
paypaycorporation
PRO
0
230
Recruiting FACTBOOK_業務推進本部
paypaycorporation
PRO
0
1.6k
Recruiting FACT BOOK_JP
paypaycorporation
PRO
4
180k
Recruiting FACT BOOK_EN
paypaycorporation
PRO
2
34k
PayPay Step Merge Journey
paypaycorporation
PRO
0
3.7k
Improve Processing Performance for PayPay Cashback
paypaycorporation
PRO
2
2.4k
Near Real-Time Data Lake at PayPay
paypaycorporation
PRO
0
3k
Reconcile as a Service
paypaycorporation
PRO
0
1.5k
Other Decks in Technology
See All in Technology
オンラインゲームのシステム全体像 - コロプラ 2026年度 新卒研修
colopl
0
1.1k
不可逆な意思決定を避けながら10億超の顧客データを AI Ready にするデータ基盤設計
baseballyama
1
250
メルペイ 会計システム概要と歴史
mewuto
0
200
12 個 Tool と、 4,096 Token
hlum
0
110
購入ドメインでの課題と取り組み
ykagano
0
230
SREでアラート疲れを 解決しよう!
kairim0
1
220
分析AIエージェントを育てる、動く環境を育てる
codatum
1
730
Cognition AI Japan - ウェビナー2_テストQA_運用監視
cogakira
0
120
Datadog の学び方 - あるいは、オブザーバビリティを学ぶとは何か
mananyuki
1
530
Kiro Crewをはじめよう
kizawa2020
1
120
The seven pitfalls of AI (revised version)
ufried
0
310
OR学会2026年秋期大会_機械学習と数理最適化の融合による、配合レシピ最適化システム開発事例
brainpadpr
0
120
Featured
See All Featured
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
430
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8.1k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.6k
RailsConf 2023
tenderlove
30
1.6k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
790
Building the Perfect Custom Keyboard
takai
2
900
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Ethics towards AI in product and experience design
skipperchong
2
420
Transcript
©PayPay Corporation PayPay における マルチリージョン構成への取り組み ⻄中 智樹 PayPay株式会社 Product統括本部 Payment
Product本部 Infrastructure Technology部 Cloud Infrastructure
©PayPay Corporation 2 ©PayPay Corporation ⾃⼰紹介 ⻄中 智樹 - Tomoki
Nishinaka - 名前 所属 役割 PayPay株式会社 Infrastructure Technology部 Cloud Infrastructure Tech Lead AWS IAM Identity Center (AWS SSO) 好きなAWS* サービス *アマゾン ウェブ サービス(AWS)
©PayPay Corporation PayPayについて
©PayPay Corporation 4 ©PayPay Corporation PayPayについて PayPay登録者数5,500万⼈ (2023年2⽉時点) ⼀般社団法⼈キャッシュレス推進協議会の開⽰資料(2021年度の国内QRコード決済利⽤動向調査結果)から「PayPay」の⽐率を集計、PayPay調べ 利⽤シェア率
/ 決済回数 国内No.1 QR 決済プラットフォーム
©PayPay Corporation 5 ©PayPay Corporation PayPayについて 利⽤シェア率 / 決済回数 国内No.1
QR 決済プラットフォーム PayPay登録者数5,500万⼈ (2023年2⽉時点) ⼀般社団法⼈キャッシュレス推進協議会の開⽰資料(2021年度の国内QRコード決済利⽤動向調査結果)から「PayPay」の⽐率を集計、PayPay調べ
©PayPay Corporation 6 ©PayPay Corporation PayPayについて 1. App Annie「モバイル市場年鑑2022」 アプリダウンロード数
(⽇本)1 1. PayPay デジタルウォレット/ 決済 2. LINE コミュニケーション 3. ZOOM Cloud Meetings 会議/ ビジネス 4. Instagram ソーシャルメディア 5. Myna Point デジタルウォレット/ 決済 6. YouTube 動画共有/ エンターテインメント 7. Google Maps ナビゲーション 8. TikTok ソーシャルメディア 9. Amazon Prime Video OTT/エンターテインメント 10. Gmail メール 国内 No.1 2021年度 アプリダウンロード数
©PayPay Corporation 7 ©PayPay Corporation PayPayについて 2018年10⽉ サービス開始当初 2019年4⽉ 2020年4⽉
2021年6⽉ 2022年3⽉ アプリアップデート 毎週1回以上、年50回以上
©PayPay Corporation 8 ©PayPay Corporation PayPayについて ⾦融 O2O 決済 公共料⾦・⾏政サービス
便利なサービス 飲⾷ スーパー/ コンビニ ドラッグ ストア 本屋 オンライン サービス 美容院 ⼩売店 取引履歴 わりかん きせかえ 利⽤レポート 送る・受け取る Tポイントカード 請求書払い 本⼈確認 ふるさと納税 PCR検査キット 新型コロナ通知 マイナポイント フリー マーケット 売上⾦チャージ 銀⾏⼝座登録 PayPay銀⾏ キャリア決済 クレジットカード ATMチャージ あと払い ローン ボーナス運⽤ 実投資 保険 フード デリバリー クーポン テイクアウト タクシー配⾞ テーブル注⽂ スマホ充電 スタンプカード 経費精算 チラシ 暮らしのすべてをスマホ1つで可能にするスーパーアプリ PayPayを起点として⽣活を便利にする
©PayPay Corporation 9 ©PayPay Corporation PayPayについて – Product – PayPayサービス
すべてのインフラを 扱うチーム PdM / PMO Designer FE / BE Mobile QA Data ML / AI Product Infra
©PayPay Corporation 10 Diverse & Multinational Professionals From around 50
countries -World class Engineering Organization-
©PayPay Corporation 11 ©PayPay Corporation このセッションの流れ PayPay概要 01 マルチリージョン構成の課題 02
マルチリージョン構成でのTips 03 マルチリージョン構成の管理について 04 05 まとめ
©PayPay Corporation 12 ©PayPay Corporation このセッションの流れ PayPay概要 01 マルチリージョン構成の課題 02
マルチリージョン構成でのTips 03 マルチリージョン構成の管理について 04 05 まとめ
©PayPay Corporation 13 ©PayPay Corporation PayPayのアーキテクチャ AWS Key Management Service
(AWS KMS) Amazon Managed Streaming for Apache Kafka
©PayPay Corporation 14 ©PayPay Corporation PayPayのアーキテクチャ Self Managed Kubernetesを運⽤ Amazon
Managed Streaming for Apache Kafka AWS Key Management Service (AWS KMS)
©PayPay Corporation 15 ©PayPay Corporation PayPayのアーキテクチャ Amazon Managed Streaming for
Apache Kafka Self Managed Kafkaを運⽤ AWS Key Management Service (AWS KMS)
©PayPay Corporation 16 ©PayPay Corporation PayPayのアーキテクチャ マネージドデータベースサービスやTiDBを運⽤ Amazon Managed Streaming
for Apache Kafka AWS Key Management Service (AWS KMS)
©PayPay Corporation 17 ©PayPay Corporation PayPayのアーキテクチャ AWS GlueベースのNear-RealTime データ基盤を構築 Amazon
Managed Streaming for Apache Kafka AWS Key Management Service (AWS KMS)
©PayPay Corporation 18 ©PayPay Corporation PayPayのアーキテクチャ Amazon OpenSearch ServiceにてLog Platform
を構築 Amazon Managed Streaming for Apache Kafka AWS Key Management Service (AWS KMS)
©PayPay Corporation 19 ©PayPay Corporation PayPayのマルチリージョンアーキテクチャ Application Load Balancer AWS
アジアパシフィック (東京) リージョン AWS アジアパシフィック (⼤阪) リージョン レプリケーション Application Load Balancer AWS Key Management Service (AWS KMS) Amazon Elastic Container Registry (Amazon ECR) AWS Key Management Service (AWS KMS) Amazon Elastic Container Registry (Amazon ECR)
©PayPay Corporation 20 ©PayPay Corporation このセッションの流れ PayPay概要 01 マルチリージョン構成の課題 02
マルチリージョン構成でのTips 03 マルチリージョン構成の管理について 04 05 まとめ
©PayPay Corporation 21 ©PayPay Corporation マルチリージョン構成での課題 - リージョン間は、AZ間ほど⾼速に同期はされず、古いデータにアクセスする可能性がある - リージョン間は、強⼀貫性が担保されたAPIが使えない。(結果整合性となる)
- リージョン間は、書き込みでのデータ競合に配慮が必要(最終書き込み時間優先) リージョン間のデータ整合性・⼀貫性の確保 - リージョン毎にリソースが作成されるため、⼈的・⾦銭的コストのコントロールが必要 - リージョン毎に意図しない設定があると、正しく動作しない場合がある リソース管理を容易に⾏うこと AZ: アベイラビリティーゾーン
©PayPay Corporation 22 ©PayPay Corporation このセッションの流れ PayPay概要 01 マルチリージョン構成の課題 02
マルチリージョン構成でのTips 03 マルチリージョン構成の管理について 04 05 まとめ
©PayPay Corporation 23 ©PayPay Corporation マルチリージョン構成でのTips Amazon Aurora Amazon DynamoDB
Amazon S3 AWS Key Management Service (AWS KMS) AWS Secrets Manager AWSのマネージド型サービスを中⼼に紹介します︕ 特にAmazon S3は、特に詳しく︕
©PayPay Corporation 24 ©PayPay Corporation Amazon Aurora ⼤阪リージョンを利⽤したGlobal Databases Global
DatabasesによるreplicationがStorage layerで⾏われるためbinlogよりも⾼速 東京リージョン Writer Reader Storage ⼤阪リージョン Reader Reader Storage レプリケーション Primary Cluster Secondary Cluster
©PayPay Corporation 25 ©PayPay Corporation Amazon Aurora Primary Clusterに問題があれば、Secondary Clusterを昇格させて、書き込みに対応できる
東京リージョン Writer Reader Storage ⼤阪リージョン Reader Reader Storage レプリケーション Primary Cluster Secondary Cluster
©PayPay Corporation 26 ©PayPay Corporation Amazon Aurora Primary Clusterに問題があれば、Secondary Clusterを昇格させて、書き込みに対応できる
東京リージョン Writer Reader Storage ⼤阪リージョン Reader Storage Writer Primary Cluster Secondary Cluster
©PayPay Corporation 27 ©PayPay Corporation Amazon Aurora remove-from-global-cluster APIを利⽤し、昇格を⼤阪リージョンで完結できる 東京リージョン
Writer Reader Storage ⼤阪リージョン Reader Storage Primary Cluster Secondary Cluster Writer ⼤阪側から切り離し処理を実⾏
©PayPay Corporation 28 ©PayPay Corporation Amazon DynamoDB Global Tablesを活⽤し、⾮常に簡易にセットアップが可能 paypay-global-table
東京リージョン ⼤阪リージョン paypay-global-table 双⽅向レプリケーション
©PayPay Corporation 29 ©PayPay Corporation Amazon DynamoDB 書き込み先をシステム毎に分けて、システム構築を⾏っている。 強⼀貫性構成 結果整合性構成
双⽅向レプリケーション 双⽅向レプリケーション
©PayPay Corporation 30 ©PayPay Corporation Amazon DynamoDB 書き込み先をシステム毎に分けて、システム構築を⾏っている。 強⼀貫性構成 結果整合性構成
双⽅向レプリケーション 双⽅向レプリケーション リージョン間の結果整合性が担保されない (Consistent Readを使っても)
©PayPay Corporation 31 ©PayPay Corporation Amazon DynamoDB 書き込み先をシステム毎に分けて、システム構築を⾏っている。 強⼀貫性構成 結果整合性構成
双⽅向レプリケーション 双⽅向レプリケーション 巨⼤ Table / index を レプリケーションする場合は コストも要確認
©PayPay Corporation 32 ©PayPay Corporation AWS Key Management Service (AWS
KMS) マルチリージョンキーを利⽤して、システムの暗号化を安全にサポート Multi Region Primary Key レプリケーション Multi Region Replica Key 東京リージョン ⼤阪リージョン
©PayPay Corporation 33 ©PayPay Corporation AWS KMS シングルリージョンキーをマルチリージョンキーに変更はできない Single Region
Key レプリケーション 東京リージョン ⼤阪リージョン
©PayPay Corporation 34 ©PayPay Corporation AWS Secrets Manager ⼤阪リージョンにレプリケーションし、シークレットを複製して運⽤ paypay-sec-key
レプリケーション paypay-sec-key 東京リージョン ⼤阪リージョン
©PayPay Corporation 35 ©PayPay Corporation AWS Secrets Manager ⼤阪リージョンにレプリケーションし、シークレットを複製して運⽤ paypay-sec-key
昇格 paypay-sec-key レプリカから昇格することで、シークレット値の変更などにも対応できる 東京リージョン ⼤阪リージョン
©PayPay Corporation 36 ©PayPay Corporation Amazon S3 東京リージョン<->⼤阪リージョンで双⽅向でレプリケーションを作成 Paypay-bucket-apne1 Paypay-bucket-apne3
⼤阪→東京レプリケーション 東京→⼤阪レプリケーション 東京リージョン ⼤阪リージョン
©PayPay Corporation 37 ©PayPay Corporation Amazon S3 Amazon DynamoDB同様書き込み先をシステム毎に分けて、システム構築を⾏っている。 強⼀貫性構成
結果整合性構成 ⼤阪→東京レプリケーション 東京→⼤阪レプリケーション ⼤阪→東京レプリケーション 東京→⼤阪レプリケーション
©PayPay Corporation 38 ©PayPay Corporation Amazon S3 + Amazon CloudFront
Origin Groupを構成し、システムの可⽤性を⾼めている ⼤阪→東京レプリケーション 東京→⼤阪レプリケーション
©PayPay Corporation 39 ©PayPay Corporation Amazon S3 マルチリージョン構成の作り⽅ 送信元Bucketと送信先Bucketを作成 paypay-source-bucket
paypay-destination-bucket 東京リージョン ⼤阪リージョン
©PayPay Corporation 40 ©PayPay Corporation paypay-source-bucket paypay-destination-bucket 送信元Bucket、送信先Bucketへのレプリケーション権限を持ったReplication⽤IAM Roleを作成 東京リージョン
⼤阪リージョン Amazon S3 マルチリージョン構成の作り⽅
©PayPay Corporation 41 ©PayPay Corporation 東京<->⼤阪間の双⽅向でレプリケーションを作成 paypay-source-bucket paypay-destination-bucket 東京リージョン ⼤阪リージョン
⼤阪→東京レプリケーション 東京→⼤阪レプリケーション Amazon S3 マルチリージョン構成の作り⽅
©PayPay Corporation 42 ©PayPay Corporation レプリケーション作成だけでは、既存Objectはレプリケーションされない paypay-source-bucket 東京リージョン ⼤阪リージョン paypay-destination-bucket
⼤阪→東京レプリケーション 東京→⼤阪レプリケーション 1 2 Amazon S3 マルチリージョン構成の作り⽅
©PayPay Corporation 43 ©PayPay Corporation 新規のObjectは、レプリケーションされる paypay-source-bucket 東京リージョン ⼤阪リージョン paypay-destination-bucket
⼤阪→東京レプリケーション 東京→⼤阪レプリケーション 1 2 3 3 Amazon S3 マルチリージョン構成の作り⽅
©PayPay Corporation 44 ©PayPay Corporation 理想は、既存のObjectもレプリケーションされること paypay-source-bucket 東京リージョン ⼤阪リージョン paypay-destination-bucket
⼤阪→東京レプリケーション 東京→⼤阪レプリケーション 1 2 3 3 1 2 Amazon S3 マルチリージョン構成の作り⽅
©PayPay Corporation 45 ©PayPay Corporation 東京<->⼤阪間のレプリケーションを作成 paypay-source-bucket paypay-destination-bucket 東京リージョン ⼤阪リージョン
⼤阪→東京レプリケーション 東京→⼤阪レプリケーション Amazon S3 マルチリージョン構成の作り⽅
©PayPay Corporation 46 ©PayPay Corporation 既存ObjectをレプリケーションさせるBatch Operationsがある paypay-source-bucket paypay-destination-bucket 東京リージョン
⼤阪リージョン ⼤阪→東京レプリケーション 東京→⼤阪レプリケーション Batch Operations Amazon S3 マルチリージョン構成の作り⽅
©PayPay Corporation 47 ©PayPay Corporation このセッションの流れ PayPay概要 01 マルチリージョン構成の課題 02
マルチリージョン構成でのTips 03 マルチリージョン構成の管理について 04 05 まとめ
©PayPay Corporation 48 ©PayPay Corporation マルチリージョン構成の管理について - 権限やPolicyなど⼀貫性をもたせるべきものがある - チーム全体でだれでも同じクオリティで作成できる
- 初回時に忘れちゃいけない設定を漏らさない(レビューしやすい状況を作る) - ⼀⽅で、名前やTag、特殊な設定(ライフサイクル、タイムアウト時間など)ができるように⾃由度を残す リージョン毎のリソース管理を容易におこなうためには︖ PayPayでは、Terraform Moduleで実現
©PayPay Corporation 49 ©PayPay Corporation マルチリージョン構成の管理について - 個別にリソースを定義せず、 設定や作成したいリソースをテンプレート化して、利⽤できる機能 Terraform
Module とは︖ 例 : 外部公開したいエンドポイントを作りたい︕ Amazon Route53 + Application Load Balancer + Amazon EC2 構成をエンドポイント名やインスタンス サイズなどを指定するだけでできる
©PayPay Corporation 50 ©PayPay Corporation マルチリージョン構成の管理について リージョンコードをアプリケーションソースにハードコードするのをやめた - 環境変数からリージョンコードやリソース名を呼び出す -
環境変数を変えるだけでリージョン毎のアプリのリリースを容易に リソース毎に利⽤⽅法を確認し、アプリケーション側と共通認識を持った - 強⼀貫性が必要、結果整合性で問題ないなど、利⽤⽅法がマルチリージョン対応できるか確認した - IAM Roleで利⽤⽅法毎に制御を⾏いたいので、確認した インフラ以外でアプリケーション側と対応してきたこと
©PayPay Corporation 51 ©PayPay Corporation マルチリージョン構成の改善したいポイント 同⼀リージョンの場合はセキュリティグループを送信元/送信先として指定できる。 マルチリージョンでのセキュリティグループ 別リージョンの場合はCIDRブロックで指定する必要がある。 AWS
IAM Identity Center(AWS SSO) 東京リージョンのみでリリースされているサービスの対応 - 東京リージョンなど単⼀リージョンでのみ利⽤可能でレプリケーションなどの機能がない - 別途、独⽴したIAM User管理の基盤を構築し、AWS IAM Identity Centerの利⽤不可に備えている AWS Transfer Family - ⼤阪リージョンでも利⽤できるが、Userはリージョン毎に独⽴のため、それぞれで作成が必須
©PayPay Corporation 52 ©PayPay Corporation マルチリージョン構成の改善したいポイント シングルリージョンと⽐べ、どうしてもコストは⾼くなる マルチリージョンでのコスト 単純にコストを下げるだけではなく、ビジネスニーズや費⽤対効果で判断 さらなる可⽤性・拡張性に向けて
©PayPay Corporation 53 ©PayPay Corporation このセッションの流れ PayPay概要 01 マルチリージョン構成の課題 02
マルチリージョン構成でのTips 03 マルチリージョン構成の管理について 04 05 まとめ
©PayPay Corporation 54 ©PayPay Corporation まとめ AWSのマネージド型サービスを活⽤し、効率よく管理しました ⼈的・⾦銭的コストがかかるため、必要に応じて実施しました リージョン間のデータ整合性・⼀貫性の確保をしました 各リソースごと抑えるべき設定、ポイントを確実にできるようにしました
PayPayのマルチリージョン構成は、 - AWS KMS: マルチリージョンキー - 別途その他リソースもテンプレート化・必須化して、忘れずに設定できるようにしました
©PayPay Corporation 55 Diverse & Multinational Professionals From around 50
countries -World class Engineering Organization-
©PayPay Corporation 56 ©PayPay Corporation 50カ国以上から集まった⼈材でつくる多様性のある組織カルチャー 誕⽣して4年余りの会社であるからこそのモダンな開発環境 爆速で成⻑中の企業ならではの技術的課題とスケール感 組織の成⻑とともに増える成⻑の機会 ユーザーへの⼤きな価値と社会的なインパクト
PayPay Developersとしての楽しさ・やりがい
©PayPay Corporation 57 ©PayPay Corporation Letʼs Join us! 採⽤ページはこちら https://about.paypay.ne.jp/career/
©PayPay Corporation ご静聴ありがとうございました