More Related Content
PPTX
Selenium×PostgreSQL15×Grafanaで思い出を保存&分析するプロジェクト(第35回PostgreSQLアンカンファレンス@オンライン... PDF
新人Git/Github研修公開用スライド(その1) PDF
At least onceってぶっちゃけ問題の先送りだったよね #kafkajp PDF
フロー効率性とリソース効率性について #xpjug PPTX
GitLab から GitLab に移行したときの思い出 PPTX
PDF
PDF
Best Practices for Running PostgreSQL on AWS What's hot
PPTX
Spring CloudとZipkinを利用した分散トレーシング PDF
Amazon S3を中心とするデータ分析のベストプラクティス PPTX
PostgreSQLのロール管理とその注意点(Open Source Conference 2022 Online/Osaka 発表資料) PDF
PPTX
PostgreSQLモニタリングの基本とNTTデータが追加したモニタリング新機能(Open Source Conference 2021 Online F... PDF
Spring Boot × Vue.jsでSPAを作る PDF
20190213 AWS Black Belt Online Seminar Amazon SageMaker Advanced Session PDF
アプリ開発で知っておきたい認証技術 - OAuth 1.0 + OAuth 2.0 + OpenID Connect - PDF
PDF
なぜOpenID Connectが必要となったのか、その歴史的背景 PPTX
機械学習用のデータを準備する Amazon SageMaker Data Wrangler - ノーコードで前処理から学習まで PDF
Amazon S3による静的Webサイトホスティング PDF
PDF
PDF
こんなに使える!今どきのAPIドキュメンテーションツール PPTX
pg_bigmで全文検索するときに気を付けたい5つのポイント(第23回PostgreSQLアンカンファレンス@オンライン 発表資料) PDF
Cognitive Complexity でコードの複雑さを定量的に計測しよう PDF
PDF
20200826 AWS Black Belt Online Seminar AWS CloudFormation PDF
Similar to AWSの様々なアーキテクチャ
PPTX
Microservice and agile development PPTX
Game Architecture Trends in Tokyo Kansai Social Game Study#5 PDF
AWS初心者向けWebinar AWSでBig Data活用 PDF
PDF
20180703 AWS Black Belt Online Seminar Amazon Neptune PDF
Amazon Game Tech Night #22 AWSで実現するデータレイクとアナリティクス PPTX
Amazon RDS for PostgreSQL ( JPUG 2014夏セミナー) #jpug PPTX
NoSQL on AWSで作る最新ソーシャルゲームアーキテクチャ PDF
Serverless services on_aws_dmm_meetup_20170801 PDF
PPTX
PPTX
PDF
[CTO Night & Day 2019] AWS Database Overview -データベースの選択指針- #ctonight PPTX
Security Operations and Automation on AWS PDF
ソリューションセッション#3 ビッグデータの3つのVと4つのプロセスを支えるAWS活用法 PDF
[CTC Forum 2019/10/25] 事例から学ぶ!AWS 移行でデータベースの管理・コストを削減する方法 PDF
PDF
20201118 AWS Black Belt Online Seminar 形で考えるサーバーレス設計 サーバーレスユースケースパターン解説 PDF
AWS Black Belt Tech シリーズ 2015 - AWS IoT PDF
More from Kameda Harunobu
PPTX
PPTX
PDF
AWS Transfer Family SFTP and FTPS PDF
PDF
PDF
PPTX
It in the future and cloud PDF
PDF
PPTX
PDF
Sapporo devfesta 2019/11/13 PPTX
PPTX
PPTX
Japan Wrap Up re:Invent2018 PDF
PPTX
PPTX
20180123 20分でlive配信aws media services(media live mediapackage)_pub PPTX
Word press preinstall-iam対応版-aws体験ハンズオン-セキュア&スケーラブルウェブサービス構築編 PPTX
Migration to aws as of 20170920 PPTX
AWSの様々なアーキテクチャ
- 1.
Who am I?
亀田 治伸 (Harunobu Kameda)
Facebook : facebook.com/harunobu.kameda/
Github : github.com/harunobukameda/
Sr. Evangelist
Amazon Web Services
- 2.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
アーキテクチャよもやま話
- 3.
- 4.
- 5.
- 6.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
Frontend
Backend
マイクロサービス
API
API
マイクロサービス
マイクロサービス
イベント
API
マイクロサービス
イベント
API
マイクロサービス
モバイル
クライアント
クライアント
IoT
マイクロサービスとイベントドリブン
- 7.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
API
マイクロサービス
イベント
API
マイクロサービス
モバイル
クライアント
クライアント
IoT
マイクロサービスとイベントドリブン Serverless Computing
- 8.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
AWS のサービスを活用した疎結合の例 3階層構造
ウェブサーバーはアプリサーバーと密結合
Web Server
App Server
ELB を挟んで疎結合に
Web Server
App Server
ELB
ELB は、 Auto Scaling を
組み合わせ、増減する
App Server を自動で
登録/解除可能
Web Server は単一の
ELB の DNS 名だけを
見てれば良い
(App Server は Web
Server にとってブ
ラックボックス)
スケールアウト/インする
たびに、Web Server の
設定ファイルの書き換え
が必要
- 9.
- 10.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
AWS のサービスを活用した非同期処理の例
Amazon SQS を挟んで Frontend と Backend を非同期かつ疎結合に
BackendもQueueの滞留に合わせてオートスケール
Frontend
Servers
ELB
Client
重たい処理は Backend
Servers に任せる
Sticky
Session
Backend
Servers
SQS キューから取得した
メッセージを元にバッチ
的に処理を実行していく
重たい処理は Backend で
非同期に行われるので、
Client へのレスポンスは
迅速に
Amazon SQS
Queue
- 11.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
単純なECサイトのシーケンス
クライアント WEB DB
- 12.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
非同期処理なECサイトのシーケンス
クライアント WEB DB
App
SQS
- 13.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
リアルタイムのレスポンスを要求しないシステム
IoT
センサーデバイス
Amazon
Kinesis
- 14.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
お客様事例:あきんどスシロー様
捨てていたデータをクラウドに送り、他のデータと合わせて分析することで、
今まで見えなかったことがデータとして可視化に成功。
- 15.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
Data Lake アーキテクチャ
- 16.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
データは企業の重要な資産に
常時インターネット
に接続
大量の構造化・
非構造化データ
機械学習
ディープラーニング
- 17.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
センサー
データ
非構造化ファイル
テキストファイル
RDBMS
データレイクの基本コンセプト
Amazon S3
• 99.9999999%のデータ堅牢性
• 容量は自動拡張
• 約2.3円/GB/月(オンライン)
• 約0.7円/GB(オフライン)
API
SQLクエリ実行
必要データの
取り出し
Amazon Athena AWS Glue
データのETL作業
整形(構造化)
より高価な
解析や
機械学習へ
Amazon
Redshift
Amazon
SageMaker
- 18.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
Amazon Greengrass
エッジコンピューティングモジュール
- 19.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
AWSの処理機能をデバイスの上に拡張
処理を
クラウドで実行
処理を
ローカルで実行
Moving to the edge
AWS Greengrass
開発、アップデート
最新モジュール
オフロード
- 20.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
エッジ推論
AWS Greengrass ML Inference
エッジ上での機械学習の
実行を簡単にする各種機能
を提供
• クラウドで学習したモデルを
簡単にデプロイ可能
• MXNet/TensorFlow/
Chainer をデバイスに簡単に
組み込める
• ローカルで機械学習の推論を
行うための実装例を提供
• GPU/FPGA活用が可能
モデルをGreengrassに出力
データ収集
モデル強化
推論を実行
AWS Cloud
for training
- 21.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
画像認識を多用途に活用する Vieureka プロジェクト
Amazon IoT Greengrass を活用して“進化するプラットフォーム”を実現
• まったく新しい AI/IoT
サービスの実現
• 小規模な組織で迅速かつ
低コストな開発を実施
• さまざまなプレイヤーが
参画できるプラット
フォームの構築
• 進化する AI/IoT プラット
フォームの実現
• さらなるイノベーションの
推進によるサービスの高度化
• ディープラーニングなどのよ
り高度な機械学習/分析基盤
の実装
「Vieureka プラットフォームを迅速かつ低価格で立ち上げたかった当社
にとって、AWS は最適な選択肢でした。今後も、お客様のニーズに合わ
せ Vieureka は日々アップデートしていきます。AWS の日々進化
する新サービスや機能に期待しています。」
宮崎 秋弘 氏
パナソニック株式会社 ビジネスイノベーション本部
ビジョンセンシングプラットフォームプロジェクト CEO
<ご利用サービス>
AWS IoT
AWS IoT Greengrass
Amazon SageMaker Neo
Amazon DynamoDB
Amazon EC2/Amazon S3
導入前の課題 導入効果と今後の展開
IoT + ML の導入事例
- 22.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
Database Freedom
- 23.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
A m a z o n
D y n a m o D B
キ ー
バ リ ュ ー イ ン メ モ リ グ ラ フリ レ ー シ ョ ナ ル
A m a z o n
R D S
A m a z o n
Q L D B
元 帳時 系 列
A m a z o n
T i m e s t r e a m
A m a z o n
A u r o r a
A m a z o n
D o c u m e n t D B
ド キ ュ メ ン ト
A m a z o n
N e p t u n e
A m a z o n
E l a s t i C a c h e
A m a z o n
R D S f o r
V M W a r e E l a s t i C a c h e
f o r R e d i s
E l a s t i C a c h e
f o r M e m c a c h e d
A m a z o n
R e d s h i f t
デ ー タ
ウ ェ ア ハ ウ ス 移 行
AWS Database Migration
Service
ワークロードに適した最適なデータベース選択
- 24.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
データの種類に応じて適切なデータストアを選択
サーバー
ローカル
ストレージ
サーバー
ローカル
ストレージ
共有
ストレージ
データベース
(RDBMS)
データベース
(NoSQL)
・ショッピングカート
・セッション情報
・ユーザ情報
・商品情報
・在庫情報
・商品画像データ
複数データストアの使い分けで効率を向上
“A one size fits all database
doesn't fit anyone”
- 25.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
A m a z o n
D y n a m o D B
キ ー
バ リ ュ ー イ ン メ モ リ グ ラ フリ レ ー シ ョ ナ ル
A m a z o n
R D S
A m a z o n
Q L D B
元 帳時 系 列
A m a z o n
T i m e s t r e a m
A m a z o n
A u r o r a
A m a z o n
D o c u m e n t D B
ド キ ュ メ ン ト
A m a z o n
N e p t u n e
A m a z o n
E l a s t i C a c h e
A m a z o n
R D S f o r
V M W a r e E l a s t i C a c h e
f o r R e d i s
E l a s t i C a c h e
f o r M e m c a c h e d
A m a z o n
R e d s h i f t
デ ー タ
ウ ェ ア ハ ウ ス 移 行
AWS Database Migration
Service
ワークロードに適した最適なデータベース選択
- 26.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
グラフ
Amazon
QLDB
元帳時系列
Amazon
Timestream
Amazon
Neptune
高密度
結合
I n P r e v i e wN e w
時系列データ
の格納と操作
N e w
検証可能な
トランザクション
ログの提供
- 27.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
グラフデータベース
Graph
- 28.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
グラフ指向データベース
• データ間を相互に結びつけて
データ同士の関係をグラフという形で表す
• 複雑な関係性を表すのを得意とする
• SNSのフレンドの関連性等
多 対 多
- 29.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
ユースケース
SNSニュースフィード リコメンデーション 不正検出
Friends
Use
Play
Like
Check in
Like
Connect
Read
Credit
card
Product
Email
address
Credit
card
Known
fraud
Uses
Paid
with
Uses
Paid
with
Paid with
Purchased
Approve
purchase?
Sport
Product
Purchased
Purchased
People
who also
follow sports
purchased…
Purchased
Knows
Knows
Do you
know…
Follows
Follows
Follows
- 30.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
サンプルデータ
ID Node Name Next Ptr
1 A NULL
2 B C
3 C A
- 31.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
サンプルデータ その2
ID Node Name Next Ptr
1 A B
2 B C
3 C A
4 B A
- 32.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
ID Node Name Next Ptr Attr Num
1 A NULL NULL NULL
2 B C Like 1
3 C A Dislike 1
4 B A Like 2
5 B A Dislike 1
サンプルデータ その3
- 33.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
ID Node Name Next Ptr Attr Num
1 A NULL NULL NULL
2 B C Like 1
3 C A Dislike 1
4 B A Like 2
5 B A Dislike 1
サンプルデータ その3
- 34.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
選択指針
• 関連を探索するクエリ (トラバーサル)
• 短いクエリが大量に来る要件がある
• Amazon Neptune
• 数十億のリレーションシップを扱える
• ミリ秒台のレイテンシー
• グラフに最適化された、専用のグラフデータベースエンジン
• SPARQLとGremlinに対応
- 35.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
時系列データベース
Time-series
- 36.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
時系列データ
• 時間が唯一の主軸
• 特定の間隔で記録され続ける
• 時間の経過に伴う変化を測定
• リアルタイムの意思決定、警告 等
- 37.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
選択指針
• 時系列データを扱うか
• 大量、粒度が小さい、すぐに分析したい
• 多数のソース (IoTデバイスなど) からの頻繁に送信されるか
• 一定の時間間隔で分析を実行したいか
• Amazon Timestream (Public Preview)
• RDB の 1/10 のコストで 1,000 倍のパフォーマンス
• 一日あたり数兆規模のイベントに対応
• 挿入とクエリを異なる処理階層で実行し、競合を解消
- 38.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
台帳データベース
Ledger
- 39.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
Basics of Block Chain
ビザンチン耐性
イミュータブルトランザクション
- 40.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
通常のオンラインバンキング
1:N取引であり銀行が
TrustAnchor
TrustAnchorへの攻撃が
成功すれば
ハッキング可能
高いセキュリティが必要
メンテナンス、障害による
ダウンタイムが発生
- 41.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
BlockChain の P2Pネットワーク
攻撃者は複数のノードを一度に攻撃しデータを
書き換える必要がある
→不可能。高セキュリティ
DNSやCDN(のEdge)と同じように、すべての
ノードが一度に停止することはない
→ゼロダウンタイムの実現
ビザンチン耐性
- 42.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
Block [Chain]
x x
x x
x x
- 43.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
台帳データベース
• データの変更履歴はイミュータブル
(変更や削除が不可能)
• 意図しない変更が発生していないことを
暗号技術で検証
C | H
J
- 44.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
選択指針
• 履歴の追跡と変更管理
• 完全で検証可能な変更履歴を長期間維持したい
• 管理者でも変更履歴を改ざんできないことを保証したい
• Amazon Quantum Ledger Database
• スケーラブルで完全
• 検証可能なトランザクション
• データの変更全てを追跡可能
- 45.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
データ構造
ID Manufacturer Model Year VIN Owner
1 Tesla Model S 2012 123456789 Robert Dennison
History
Current
INSERT… UPDATE… DELETE… UPDATE… UPDATE… UPDATE…
SEQUENCE
NUMBER: 789
SEQUENCE
NUMBER: 790
SEQUENCE
NUMBER: 791
SEQUENCE
NUMBER: 793
SEQUENCE
NUMBER: 792
SEQUENCE
NUMBER: --
Journal
元帳
データ Amazon
Quantum
Ledger Database
ID Version Start Manufacturer Model Year VIN Owner
1 0 7/16/2012 Tesla Model S 2012 123456789 Traci Russell
1 1 8/03/2013 Tesla Model S 2012 123456789 Ronnie Nash
1 2 9/02/2016 Tesla Model S 2012 123456789 Robert Dennison
- 46.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
1
Tracy buys a car on Aug 3, 2013
Journal CurrentDMV Scenario
History
Immutability
ID Version Manufacturer Model Year VIN Owner Date of
Purchase
1 0 Tesla Model S 2012 123456789 Traci
Russell
8/3/2013
ID Version Manufacturer Model Year VIN Owner Date of
Purchase
1 0 Tesla Model S 2012 123456789 Traci
Russell
9/10/2014
- 47.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
1
Tracy buys a car on Aug 3, 2013
2
Tracy sells car to
Ronnie on Sept 10, 2014
Journal CurrentDMV Scenario
Immutability
ID Version Manufacturer Model Year VIN Owner Date of
Purchase
1 0 Tesla Model S 2012 123456789 Traci
Russell
8/3/2013
1 1 Tesla Model S 2012 123456789 Ronnie
Nash
9/10/2014
ID Version Manufacturer Model Year VIN Owner Date of
Purchase
1 1 Tesla Model S 2012 123456789 Ronnie
Nash
9/10/2014
History
- 48.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
1
Tracy buys a car on Aug 3, 2013
2
Tracy sells car to
Ronnie on Sept 10, 2014
Journal CurrentDMV Scenario
3
Ronnie’s car gets in an
accident and gets totaled
ID Version Manufacturer Model Year VIN Owner Date of
Purchase
ID Version Manufacturer Model Year VIN Owner Date of
Purchase
1 0 Tesla Model S 2012 123456789 Traci
Russell
8/3/2013
1 1 Tesla Model S 2012 123456789 Ronnie
Nash
9/10/2014
1 2 Deleted
Immutability
History
DELETE
DATE: 09/02/2016
- 49.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
数学的なデータ結合性
Journal
INSERT cars
ID:1
Manufacturer: Tesla
Model: Model S
Year: 2012
VIN: 123456789
Owner: Traci Russell
Metadata: {
Date:08/03/2013
}
H (T1) UPDATE cars
ID:1
Owner: Ronnie Nash
Metadata: {
Date:09/10/2014
}
H(T2) DELETE cars
ID:1
Metadata: {
Date: 09/02/2016
}
H(T3)
H(T1)
H(T1) +
Update
= H(T2)
H(T2) +
Update
= H(T3)
- 50.
- 51.
- 52.
- 53.
- 54.
- 55.
- 56.
- 57.
- 58.
- 59.
- 60.
- 61.
- 62.
- 63.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
リレーショナルデータ
• テーブル間でデータを分割
• 高度に構造化されたデータ
• キーを介して確立された
リレーションシップ(関係
性)
• データの完全性と一貫性
Patient
* Patient ID
First Name
Last Name
Gender
DOB
* Doctor ID
Visit
* Visit ID
* Patient ID
* Hospital ID
Date
* Treatment ID
Medical Treatment
* Treatment ID
Procedure
How Performed
Adverse Outcome
Contraindication
Doctor
* Doctor ID
First Name
Last Name
Medical Specialty
* Hospital Affiliation
Hospital
* Hospital ID
Name
Address
Rating
リレーション
多 対 1
- 64.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
Amazon Relational Database Service (Amazon RDS)
6つのデータベースエンジンから選択できるマネージリレーショナルデータベース
容易な管理 高可用性と永続性 高スケール 高速でセキュア
マネージドによる
運用自動化
データレプリケーション、
自動バックアップ、
スナップショット、
自動フェイルオーバー
コンピュートと
ストレージをスケール可能
SSDストレージのI/O保証、
保存時と通信時の暗号化
- 65.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
インターネット
リージョン
AZ AZ
インターネットゲートウェイ
Public
サブネット
AWS Lambda
基本サービス Amazon VPC
- 66.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
インターネット
リージョン
AZ AZ
インターネットゲートウェイ
Public
サブネット
AWS Lambda
Elastic network
interface
2019年9月
パフォーマンス改善
基本サービス Amazon VPC
- 67.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
インターネット
リージョン
AZ AZ
インターネットゲートウェイ
Public
サブネット
AWS Lambda
Elastic network
interface
基本サービス Amazon VPC
2019年12月
Proxy
Connection
- 68.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
Amazon DynamoDB
Key Value Store
Key-value
- 69.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
キーバリューストア (KVS)
• キーとバリュー(値)という単純な構造
• 超高速なパフォーマンス
• RDBMSに比べ読み書きが高速
Key1 Value1
Key2 Value2
Key3 Value3
1 対 1
- 70.
© 2019, AmazonWeb Services, Inc. or its affiliates. All rights reserved.
選択指針
• スケーラビリティが求められる
• レスポンスタイム 数ミリ秒 が求められる
• シンプルなクエリ
• Amazon DynamoDB
• マルチリージョンマルチマスター構成
• 規模に関係なく、数ミリ秒のレスポンス
• 1 日に 10 兆件以上のリクエスト処理可能
• 毎秒 2,000 万件を超えるリクエストをサポート