Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
AWS Summit Tokyo 2023_PayPay
Search
PayPay Corporation.
PRO
Technology
3.7k
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.
Recruiting FACTBOOK_業務推進本部
paypaycorporation
PRO
0
1.1k
Recruiting FACT BOOK_JP
paypaycorporation
PRO
3
160k
Recruiting FACT BOOK_EN
paypaycorporation
PRO
2
31k
PayPay Step Merge Journey
paypaycorporation
PRO
0
3.6k
Improve Processing Performance for PayPay Cashback
paypaycorporation
PRO
2
2.3k
Near Real-Time Data Lake at PayPay
paypaycorporation
PRO
0
2.9k
Reconcile as a Service
paypaycorporation
PRO
0
1.5k
Deployment flow of PayPay Apps
paypaycorporation
PRO
2
3.4k
Securing and managing dependencies at scale
paypaycorporation
PRO
0
1.7k
Other Decks in Technology
See All in Technology
Kubernetesにおける学習基盤とLLMOpsの概要
ry
1
200
新しいVibe Codingと”自走”について
watany
5
270
AIっぽい文章を採点して人間らしく直すアプリを作ってみた
yama3133
2
110
個人最適 から 全体最適 へ AI情報共有会・AIギルド・AI-DLC で進める カンリーの組織展開
rfdnxbro
0
2.1k
LLMと共に進化するプロセスを目指して
ymatsuwitter
12
3.8k
「気づいたら仕事が終わっている」バクラクAIエージェント本番運用の裏側 / layerx-bakuraku-aie2026
yuya4
19
11k
「速く作る」から「正しく作る」へ ─ 生成AI時代の開発フロー改革の ロードマップと実行 ─
starfish719
0
9.5k
Databricks における 生成AIガバナンスの実践
taka_aki
1
370
"何を作るか"を任される エンジニアは、どう育つのか
yutaokafuji
1
500
就職⽀援サービスにおけるキャリアアドバイザーのシフトスケジューリング
recruitengineers
PRO
1
110
自律型AIエージェントは何を破壊するのか
kojira
0
130
LLMにもCAP定理があるという話
harukasakihara
0
280
Featured
See All Featured
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
440
Rebuilding a faster, lazier Slack
samanthasiow
85
9.5k
How to Think Like a Performance Engineer
csswizardry
28
2.6k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
220
Deep Space Network (abreviated)
tonyrice
0
170
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
118
120k
sira's awesome portfolio website redesign presentation
elsirapls
0
270
Paper Plane
katiecoart
PRO
1
51k
Into the Great Unknown - MozCon
thekraken
41
2.6k
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 ご静聴ありがとうございました