More Related Content Similar to AWS Black Belt Online Seminar 2018 re:Invent 2017 Recap Machine Learning / Database
Similar to AWS Black Belt Online Seminar 2018 re:Invent 2017 Recap Machine Learning / Database (20) More from Amazon Web Services Japan
More from Amazon Web Services Japan (20) AWS Black Belt Online Seminar 2018 re:Invent 2017 Recap Machine Learning / Database1. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
アマゾン ウェブサービス ジャパン 株式会社
2018.01.16
【AWS Black Belt Online Seminar】.
AWS re:Invent 2017 Recap
Machine Learning / Database
2. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
所属:
アマゾンウェブサービスジャパン株式会社
業務:
ソリューションアーキテクト
(データサイエンス領域)
経歴:
Hadoopログ解析基盤の開発
データ分析
データマネジメントや組織のデータ活用
志村 誠 (Makoto Shimura)
3. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Black Belt Online Seminar とは
AWSJのTechメンバがAWSに関する様々な事を紹介するオンラインセミナーです
【火曜 12:00~13:00】
主にAWSのソリューションや
業界カットでの使いどころなどを紹介
(例:IoT、金融業界向け etc.)
【水曜 18:00~19:00】
主にAWSサービスの紹介や
アップデートの解説
(例:EC2、RDS、Lambda etc.)
※開催曜日と時間帯は変更となる場合がございます。
最新の情報は下記をご確認下さい。
オンラインセミナーのスケジュール&申し込みサイト
• https://aws.amazon.com/jp/about-aws/events/webinars/
4. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
内容についての注意点
本資料では2018年1月16日時点のサービス内容および価格についてご説明しています。
最新の情報はAWS公式ウェブサイト (http://aws.amazon.com/) にてご確認ください。
• 資料作成には十分注意しておりますが、資料内の価格とAWS公式ウェブサイト
記載の価格に相違があった場合、AWS公式ウェブサイトの価格を優先と
させていただきます
• 価格は税抜表記となっています。日本居住者のお客様が東京リージョンを
使用する場合、別途消費税をご請求させていただきます
AWS does not offer binding price quotes. AWS pricing is publicly available and is subject to change in
accordance with the AWS Customer Agreement available at http://aws.amazon.com/agreement/.
Any pricing information included in this document is provided only as an estimate of usage charges
for AWS services based on certain information that you have provided. Monthly charges will be
based on your actual use of AWS services, and may vary from the estimates provided.
5. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Machine Learning
6. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Services Amazon
Rekognition
Amazon
Polly
Amazon
Lex
Platform
Amazon
Machine
Learning
Frameworks
TensorFlow Caffe Torch Theano CNTK Keras
CPU IoT MobileInfrastructure GPU
Apache Spark
&
Amazon EMR
Amazon
Kinesis
AWS
Batch
Amazon
ECS
MXNet
AWS Deep Learning AMI
AWS が提供する ML サービススタック
7. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Services
Amazon
Rekognition
Image
Platform
Frameworks
TensorFlow Caffe Torch Theano CNTK Keras
CPU IoT MobileInfrastructure GPU
MXNet
AWS Deep Learning AMI (Amazon Linux / Ubuntu / Windows)
AWS が提供する MLサービススタック
Amazon
Polly
Amazon
Lex
Amazon
Comprehend
Amazon
Translate
Amazon
Transcribe
Amazon
Rekognition
Video
Amazon
Machine
Learning
Apache Spark
Amazon EMR
Amazon
Kinesis
AWS Batch Amazon ECS
Amazon
SageMaker
8. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ML Services
9. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Services
Amazon
Rekognition
Image
Platform
Frameworks
TensorFlow Caffe Torch Theano CNTK Keras
CPU IoT MobileInfrastructure GPU
MXNet
AWS Deep Learning AMI (Amazon Linux / Ubuntu / Windows)
AWS が提供する MLサービススタック
Amazon
Polly
Amazon
Lex
Amazon
Comprehend
Amazon
Translate
Amazon
Transcribe
Amazon
Rekognition
Video
Amazon
Machine
Learning
Apache Spark
Amazon EMR
Amazon
Kinesis
AWS Batch Amazon ECS
Amazon
SageMaker
10. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS ML Services Portfolio
大カテゴリ 小カテゴリ サービス名
映像
画像認識 Amazon Rekognition
動画認識 Amazon Rekognition Video
音声
Speech-to-Text Amazon Transcribe
Text-to-Speech Amazon Polly
自然言語
自然言語理解 Amazon Comprehend
テキスト翻訳 Amazon Translate
チャットボット Amazon Lex
New !
New !
New !
New !
11. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Rekognition Video
12. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
動画解析サービス Amazon Rekognition Video の提供開始
• S3 に蓄積された動画や,ライブストリーミング動画に対してさまざ
まな分析機能を提供する
• ビデオのサイズは,最大 8GB までをサポート
• H264 コーデックで,拡張子が .mp4 / .mov の必要あり
• バージニア北部,オレゴン,アイルランドで提供
• 動画 1 分につき $0.10〜,ストリーム 1 分につき $0.12〜
また顔のメタデータ 1000 個につき $0.01/month
13. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
物体・動作・
ラベルの
検出
人物の
トラッキング
顔認識 リアルタイムの
ライブ
ストリーミング
不適切な
コンテンツの
認識
有名人の認識
Amazon Rekognition Video
14. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
分析の結果得られるレスポンス
• 結果は JSON で返される
• “Timesamp” がついてお
り,どの時点でその認識
処理が行われたかを記録
• さまざまな分析結果が
JSON 内に合わせて格納
されている
• ライブストリーミングの
場合は,1 フレーム 1 レ
コードで Kinesis Data
Stremas にデータを送る
15. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ユースケース: 動画データを検索しやすく
ユーザーがアップロードした動画に対して定期的にタグ付
けを行い,後から簡単に検索できるようにする
16. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Comprehend
17. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
自然言語理解サービス Amazon Comprehend の提供開始
• 入力されたテキストに対して,さまざまな分析を実施
• 英語とスペイン語に対応
18. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
入力した文章を分析
19. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
分析結果
エンティティの抽出 キーフレーズの抽出
20. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
分析結果
言語の認識 センチメント分析
21. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
バッチデータに対するトピックモデリング
22. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ユースケース: カスタマーの声を分析
Twitter 等のデータを読み込んで Comprehend でタグ付
けや分類を行い,Redshift で分析
23. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Translate
24. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
多言語間翻訳サービス Amazon Translate プレビュー開始
• 深層学習に基づいた,高品質な多言語間翻訳サービス Amazon
Translateのプレビューを開始
– Encoder-decoder + attention model
• Polly や Lex との連携による多言語対応サービスの構築が可能に
• バージニア北部,オハイオ,オレゴンでプレビューを提供
アラビア語
中国簡体字
フランス語
ドイツ語
ポルトガル語
スペイン語
英語英語
25. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Translate による翻訳
26. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Transcribe
27. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Speech-to-Text サービス Amazon Transcribe の
プレビュー開始
• テキストを文章に変換するマネー
ジドサービス
• リアルタイム処理のみならず,S3
に格納された音声データの処理も
サポート
• プレビューでの対応言語は英語と
スペイン語
28. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Transcribe の特徴
通常音声と電話音声の両方をサポート
カスタム語彙を登録することが可能
発話されたタイムスタンプと,書き起こしの信頼度を出力
複数話者の認識や句読点の自動補完
29. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
タイムスタンプと信頼度
1.0 2.0 3.0 4.0 5.0 6.0 7.0 8.0 9.0 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0
“Hi, I would like to reschedule my flight to Seattle to later tonight”
3.480 sec
Confidence : 1
6.402 sec
Confidence : 0.95
10.541 sec
Confidence : 1
30. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
句読点の補完
please extrapolate the projections based on market growth
and segment share can you email it to me once you are
done
Please extrapolate the projections based on market
growth and segment share. Can you email it to me once
you’re done?
31. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ユースケース: コールセンターの音声データの可視化
AWS Lambda
Amazon S3
Amazon
Athena
Audio Input
Amazon
QuickSight
Amazon
Comprehend
Amazon
Transcribe
32. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS ML Services Portfolio
大カテゴリ 小カテゴリ サービス名
映像
画像認識 Amazon Rekognition
動画認識 Amazon Rekognition Video
音声
Speech-to-Text Amazon Transcribe
Text-to-Speech Amazon Polly
自然言語
自然言語理解 Amazon Comprehend
テキスト翻訳 Amazon Translate
チャットボット Amazon Lex
New !
New !
New !
New !
33. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ML Platform
34. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Services
Amazon
Rekognition
Image
Platform
Frameworks
TensorFlow Caffe Torch Theano CNTK Keras
CPU IoT MobileInfrastructure GPU
MXNet
AWS が提供する ML サービススタック
Amazon
Polly
Amazon
Lex
Amazon
Comprehend
Amazon
Translate
Amazon
Transcribe
Amazon
Rekognition
Video
Amazon
Machine
Learning
Apache Spark
Amazon EMR
Amazon
Kinesis
AWS Batch Amazon ECS
Amazon
SageMaker
AWS Deep Learning AMI (Amazon Linux / Ubuntu / Windows)
35. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Kinesis Video Streams
36. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
数多くの動画ストリームのインジェストを実現する
Amazon Kinesis Video Streams の提供開始
• 大量のカメラ(的な)デバイスからアップロードされる,動画スト
リームや時系列データを容易に取り扱うことができるマネージド
サービス
• デバイス側は Producer SDK を利用して,Kinesis Video Streams
にデータを送信し,Consumer で取得して処理する
• バージニア北部,オレゴン,アイルランド,フランクフルト,東京
リージョンで利用可能
37. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Kinesis Video Streams の流れ
ストリームとして動画を取得し,S3 に保存.ダッシュボードで確認
したり,コンシューマで処理を行うことが可能
38. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ユースケース: スマートシティ
街中の監視カメラを取得し,Rekognition と連携すること
で,車のナンバープレートをインデックスとして集約
39. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon SageMaker
40. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
end-to-end のフルマネージド機械学習サービス
Amazon SageMaker の提供開始
• データサイエンティストや開発者が,容易に機械学習モデルを構築・学習・
活用するためのマネージドサービス
• バージニア北部,オハイオ,オレゴン,アイルランドで提供
41. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
機械学習の基本的な流れ
開発 学習 推論
大量の GPU
大規模データの処理
試行錯誤の繰り返し
可視化や集計
機械学習コードを記述
サンプルデータで動作
大量の GPU と CPU
継続的なデプロイ
IoT デバイスで動作
42. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon SageMaker の構成要素
開発
• コンソール上から簡単
に必要なライブラリを
含んだインスタンスを
起動して,ノートブッ
クによる開発が可能
• アルゴリズム開発を高
速に実施可能
• 足りないライブラリは
後から追加可能
学習
• 指定したインスタンス
タイプで Docker イ
メージを起動して学習
を実行
• 複数インスタンスで分
散学習を容易に実行
• ビルトインアルゴリズ
ムやサンプル実装も豊
富に用意
推論
• モデルをデプロイして,
エンドポイントから推
論が可能
• モデルを動作させる
Docker イメージとイ
ンスタンスタイプを指
定可能
• エンドポイントはオー
トスケーリング,AB
テスト機能を持つ
43. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon SageMaker の構成要素
43
開発
• コンソール上から簡単
に必要なライブラリを
含んだインスタンスを
起動して,ノートブッ
クによる開発が可能
• アルゴリズム開発を高
速に実施可能
• 足りないライブラリは
後から追加可能
学習
• 指定したインスタンス
タイプで Docker イ
メージを起動して学習
を実行
• 複数インスタンスで分
散学習を容易に実行
• ビルトインアルゴリズ
ムやサンプル実装も豊
富に用意
推論
• モデルをデプロイして,
エンドポイントから推
論が可能
• モデルを動作させる
Docker イメージとイ
ンスタンスタイプを指
定可能
• エンドポイントはオー
トスケーリング,AB
テスト機能を持つ
各要素をそれぞれ個別に利用することも可能
また,全て使って一気通貫で機械学習システムを
構築することも可能
44. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ノートブックインスタンスによる素早い開発
マネジメントコンソールからインスタンスを立ち上げて,インスタン
ス上の Jupyter Notebook にアクセス
(1)
(2)
45. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
開発
学習
推論
の流れ
46. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
開発
1. ノートブック上で開発を行う
2. 作成した学習用のコードを Docker イメージにパッケージする
3. 作成したイメージを ECR にパブリッシュする
47. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
学習
1. ノートブックインスタンスから,トレーニングジョブを実行
2. SageMaker が ECR からイメージを pull して,S3 上のデータ
を使って学習を実施(GPU インスタンスを使うことも,複数イ
ンスタンスで分散学習させることも可能)
3. 学習が終了したら,S3 にモデルを出力して終了
48. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
推論
1. 推論用の Docker イメージを作成して,ECR にパブリッシュ
2. ノートブックインスタンスから,作成済みデプロイのデプロイを実施
3. SageMaker が ECR からイメージを pull して,指定したインスタン
ス数だけ立ち上げ,エンドポイントを設定
4. エンドポイントに対して,推論のリクエストを投げることが可能
開発
学習
推論
の流れ
49. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ML Engine
50. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Services
Amazon
Rekognition
Image
Platform
Frameworks
TensorFlow Caffe Torch Theano CNTK Keras
CPU IoT MobileInfrastructure GPU
MXNet
AWS が提供する ML サービススタック
Amazon
Polly
Amazon
Lex
Amazon
Comprehend
Amazon
Translate
Amazon
Transcribe
Amazon
Rekognition
Video
Amazon
Machine
Learning
Apache Spark
Amazon EMR
Amazon
Kinesis
AWS Batch Amazon ECS
Amazon
SageMaker
AWS Deep Learning AMI (Amazon Linux / Ubuntu / Windows)
51. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Deep Learning AMI for Windows
52. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Deep Learning AMI for Windows の提供開始
• これまで Amazon Linux /
Ubuntu のみの提供だった Deep
Learning AMI が Windows でも
提供されるように
• サポート対象 OS は Microsoft
Windows Server 2012 R2 and
2016
• 主要なディープラーニングフ
レームワークをサポート
53. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ML Infrastructure
54. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Services
Amazon
Rekognition
Image
Platform
Frameworks
TensorFlow Caffe Torch Theano CNTK Keras
CPU IoT MobileInfrastructure GPU
MXNet
AWS が提供する ML サービススタック
Amazon
Polly
Amazon
Lex
Amazon
Comprehend
Amazon
Translate
Amazon
Transcribe
Amazon
Rekognition
Video
Amazon
Machine
Learning
Apache Spark
Amazon EMR
Amazon
Kinesis
AWS Batch Amazon ECS
Amazon
SageMaker
AWS Deep Learning AMI (Amazon Linux / Ubuntu / Windows)
55. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS DeepLens
56. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
ディープラーニングモデルで推論可能なビデオカメラデバイス
AWS DeepLens を提供開始
• ディープラーニングの開発を加速するための,
カメラデバイス
• 内蔵されたコンピューティングリソースで深
層学習モデルによる推論を実現
57. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS Greengrass ML Inference
58. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
エッジデバイスで機械学習モデルの活用を容易にする
AWS Greengrass ML Inference のプレビュー開始
AWS Greengrass が稼働するエッジデバイスで,MXNet による深層学
習モデルなどの,学習済み機械学習モデルをデプロイ・利用可能に
59. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Summary
60. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
まとめ
• AWS では 4 レイヤーからなる,さまざまな機械学習サービスを提供
• re:Invent で新たに 9 個の新サービスを提供開始
• これらを活用することで,AWS 上で機械学習システムを構築するの
がますます容易に
Services
Platform
Framework
s
Infrastructure
61. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Database Services Update
62. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
自己紹介
星野 豊 (ほしの ゆたか)
• Aurora/RDS(MySQL)Specialist SA
@con_mame conmame
• Amazon Aurora / OSSデータベースを主に担当
63. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
おすすめ新サービス・新機能!!
64. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Neptune
65. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
データベースサービスの拡充
A m a z o n
N e p t u n e
G R A P H
A m a z o n
D y n a m o D B
A m a z o n
E l a s t i C a c h e
K E Y V A L U E
D O C U M E N T
I N - M E M O R Y
S T O R E
A U R O R A
A m a z o n
R D S
C O M M E R C I A L C O M M U N I T Y
Relational databases Non-relational databases
66. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Neptune
• Apache TinkerPopとW3C RDF Graph modelを
サポート
• 億単位のリレーションを保管した状態で、ミリ秒
程度のレイテンシ
• 3AZで6つのレプリカを構成し、バックアップと
リストアもサポート
• GremlinとSPARQLで簡単に強力なクエリを構築
可能
• 対応リージョン: バージニア
67. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Neptune preview
Fully managed graph database for highly connected data
Fast & Scalable ReliableOpen
10億のリレーションを保持可
能で、クエリはmillisecondの
レイテンシ
6つのデータのレプリカ
を3AZに保存し、バッ
クアップとリストア
サポート
Gremlin と SPARQL
でクエリを作成可能
Apache
TinkerPopTM & W3C
RDF graph models
Gremlin
SPARQL
Easy
68. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
HIGHLY CONNECTED DATA
Retail Fraud DetectionRestaurant RecommendationsSocial Networks
69. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Aurora MySQL-
compatible edition
70. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Aurora Multi-Master preview
• 複数のデータセンターをまたぎ、Read/Write両
方でスケールアウト可能なリレーショナルデータ
ベース
• AZで障害や、いずれかのインスタンスが停止し
ても、アプリケーションでリトライを即時に行う
ことでダウンタイムを0に
• シングルリージョン・マルチマスターは、11/29
にプレビュー開始
• マルチリージョン・マルチマスタ対応は
2018年を予定
Availability
Zone 1
Scale out both reads and writes
Availability
Zone 2
Availability
Zone 3
Application
Read/Writ
e Master 1
Shared distributed storage volume
Read/Writ
e Master 2
Read/Writ
e Master 3
71. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Hierarchical conflict resolution
両方のマスターが2つのページP1と
P2に書き込みを行う
BLUE マスターが page P1の
クォーラムで勝ち; ORANGE マス
ターがP2のクォーラムで勝つ
どちらのマスターも競合を認識し、
た場合2つの選択肢がある
1. トランザクションをロールバッ
クするか
2. リージョナルリゾルバにエスカ
レートする
リージョナルアービトレータがタイ
ブレーカの勝者を決定する
2 3 4 5 61
BT1 [P1]
OT1 [P1]
2 3 4 5 61
OT1[P2]
BT1[P2]
PAGE1 PAGE2
MASTER
MASTER
BT1 OT1
Regional
resolver
Page 1Page 2 Page 1Page 2
Quorum
X X
72. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Multi-region Multi-Master
書き込みはローカルのみ受付
オプティミスティックコンカレンシコントロール - 分
散ロックマネージャなし、チャットロック管理プロト
コルなし
REGION 1 REGION 2
HEAD NODES HEAD NODES
MULTI-AZ STORAGE VOLUME MULTI-AZ STORAGE VOLUME
LOCAL PARTITION LOCAL PARTITIONREMOTE PARTITION REMOTE PARTITION
競合は、ヘッドノード、ストレージノード、AZおよ
び地域レベルのアービトレータ
競合が発生していないか、または低い場合、ほぼ直線
的なパフォーマンスのスケーリング
73. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Aurora Serverless preview
• 事前にインスタンスサイズを選ぶ代わりに、エンドポイ
ントを作成し最小・最大キャパシティを設定することで
負荷に応じて自動的にスケールアウト・インが行われる
• 5秒程度で完了
• エンドポイントはproxyとして動作
• コンピュートパワーとメモリに応じて決定される
Capacity Unitsに応じて課金
• 課金は1秒単位で行われ、新規に追加されるリ
ソースに対しては最小1分から開始
• 1日や1週間の間に数時間、もしくは数分の間にリクエ
ストがスパイクするようなワークロードの割り込みが
あったり予測が難しいケース向け。定常的にリクエスト
が予測できる場合は通常のAuroraの利用がおすすめ
• セールや不定期イベント、オンラインゲームや
日時・週次のレポーティング、dev/test、新規
アプリケーション
74. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Aurora Serverless
オンデマンドで起動し、使用して
いないときはシャットダウン
自動的にスケールアップ/ダウン
スケーリング時のアプリケーショ
ンへの影響なし
秒単位の課金、最低1分
WARM POOL
OF INSTANCES
APPLICATION
DATABASE STORAGE
SCALABLE DB CAPACITY
REQUEST ROUTER
DATABASE END-POINT
75. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Instance provisioning and scaling
最初のリクエストによってインスタンスの
プロビジョニングする. 約 1-3 seconds
ワークロードの変更に応じてインスタンス
が自動スケールアップおよびダウン. 約1-
3 seconds
ユーザが設定した非アクティブ期間の後に
インスタンスを休止する
スケーリング操作はアプリケーションに透
過的。ユーザーセッションは終了ない
データベースストレージは、ユーザーに
よって明示的に削除されるまで保持される
DATABASE STORAGE
WARM POOL
APPLICATION
REQUEST
ROUTER
CURRENT
INSTANCE
NEW
INSTANCE
76. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Batched scans Lab mode(from 1.16)
MySQLでは行をに1行ずつ評価するため
オーバヘッドが以下のような理由で大きく
なる:
• ファンクションコールの増加
• ロックとラッチ
• カーソルストアとリストア
• InnoDBとMySQL間でフォーマッ
トの変換
Amazon Auroraはテーブルスキャン、イ
ンデックスフルスキャン、インデックスレ
ンジスキャンを行う際にInnoDB buffer
pool からタプルをまとめて読み込む
Latency improvement factor vs. Batched Key Access
(BKA) join algorithm Decision support benchmark,
R3.8xlarge
1.78X
-
0.20
0.40
0.60
0.80
1.00
1.20
1.40
1.60
1.80
2.00
Query-1
Query-2
Query-3
Query-4
Query-5
Query-6
Query-7
Query-8
Query-9
Query-10
Query-11
Query-12
Query-13
Query-14
Query-15
Query-16
Query-17
Query-18
Query-19
Query-20
Query-21
Query-22
77. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Hash Joins Lab mode (from 1.16)
Latency improvement factor vs. Batched Key Access (BKA) join algorithm
Decision support benchmark, R3.8xlarge, cold buffer cache (lower improvement if all data cached)
8.22
-
1.00
2.00
3.00
4.00
5.00
6.00
7.00
8.00
9.00
Hash join used in queries 2, 3, 5, 7, 8, 9, 10, 11, 12, 15, 16, 17,18, 19, 21
78. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Parallel query coming soon
Auroraストレージは数千のCPUコアを持っている
ストレージ・フリートを使用して問合せ処理をプッシュダウ
ンおよび並列化す
データに近い箇所で処理を実行することで、ネットワークの
トラフィックとレイテンシが減少
大きなチャレンジとしては
• ストレージノードに格納されているデータはレンジ分割され
ていないため、フルスキャンが必要
• データは動的に変更されている
• Read viewsは最新のデータを見ることが出来ないこともある
• 全てのファンクションがプッシュダウン出来るわけではない
これらの問題を解決するための様々な仕組みを導入
DATABASE NODE
STORAGE NODES
PUSH DOWN
PREDICATES
AGGREGATE
RESULTS
79. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Parallel query coming soon
Latency (seconds)
Decision support benchmark, R3.8xlarge, cold buffer cache
Improvement factor
with Parallel Query
24.6x
18.3x
5.0x
0 200 400 600 800 1000 1200 1400 1600 1800 2000
Aggregate + 2-table join
Aggregate query
Point query on non-indexed column
With Parallel Query Without Parallel Query
80. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Relational Database
Service (RDS)
81. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon RDS MySQLをバックアップから起動可能に
• Percona Xtrabackupを利用して作成したバックアップデータを利用してオンプレ
ミス環境やAmazon EC2上のMySQL5.6からAmazon RDS MySQLへ移行する
• バックアップデータをS3にアップロードし、そのデータを利用
• アップロードにはManagement ConsoleやCLI tools、データサイズが大きい場合はAWS
Import/Export Snowballを利用してS3へ転送する
• MySQLからRDS for MySQLへレプリケーションを行う機能と合わせて利用する
ことで、アプリケーションのダウンタイムを短縮可能
82. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
RDS for Oracle/MySQL/MariaDB が
新しいR4、T2、M4インスタンスに対応
• R4インスタンスに対応
• r4.16xlargeが追加され、RDS for Oracle で使用できる
最大インスタンスサイズが64 vCPU + 488GB に拡大
• そのほか t2.xlarge, t2.2xlarge, m4.16xlarge が
対応インスタンスに追加
• m4インスタンスファミリーはElastic Network Adapter (ENA) を搭
載し、最大25Gbps/EBSには10Gbpsの帯域
• RDS for SQL ServerもR4/M4インスタンスファミリーに対応
83. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon RDS for MySQL, MariaDB, Oracle,
PostgreSQLのストレージサイズを16TBまでサポート
• 今まで6TBまでだったEBSが16TBまでサポート
• gp2のIOPSと容量の割合が10:1から50:1へ
• 40,000IOPSまで拡張
• Amazon Elastic Block Store (Amazon EBS) Elastic Volumesを使
うことでストレージの変更時間を今までよりも高速化
84. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon RDS for SQL Serverの
ストレージサイズを16TBまでサポートなど
• 今まで4TBまでだったEBSが16TBまでサポート
• gp2のIOPSと容量の割合が10:1から50:1へ
• スナップショットから復元時にボリュームタイプとプロビジョニンド
IOPSを再設定可能
• オンラインでの変更は未対応
• オンラインでのストレージサイズの変更も可能に
• 数分のダウンタイムが発生する点注意
85. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon DynamoDB
86. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DynamoDB Global Tables
• 複数リージョンに配置したDynamoDBのテーブル間でレプ
リケーションを行ったり、Multi Masterとして複数リー
ジョンで書き込みが可能に
• DynamoDB Streamsを裏側では利用しEventual
consistency・非同期で更新が行われ、最後に書
き込まれたの物が利用される
• ほぼ1秒程度でレプリケーションが完了する
• ディレイを確認するメトリクスを2つ提供
• テーブルが空の状態から設定する必要があり、hash keyや
テーブル名は同一に揃える
• TTLやGSI/LSIは揃えることが推薦
• Auto Scalingに関しては自動で設定される
• Write Capacity Unitはレプリケーションされて
くるデータの量も考慮して設定する
• バージニア、オハイオ、アイルランド、フランクフルト
リージョンで利用可能
87. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
DynamoDB backup&restore
• 長期間のarchiveやデータを長期間保持を支援する
• 長期的なデータアーカイブやコンプライアンス対応のため
のオンデマンドバックアップをサポート
• バックアップのためにキャパシティの消費は無く、性能に影響を与え
ない
• バックアップ対象は、テーブル中のデータ、provisioned capacityの
設定、LSI/GSI情報、Streams
• 暗号化されて保存される
• Auto ScalingやTTL、tag、IAMポリシー、CWメトリクス
やアラームは含まれない
• スナップショットを取得し更新ログを保存する
• リストア時間は30分から容量に応じて数時間
• PITRも対応予定
• バージニア、オレゴン、オハイオ、アイルランドリージョンで利用可
能
88. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon ElastiCache
89. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon ElastiCache for Redis
Online Resizing for Redis Clusters
• Elasticache for Redis cluster でOnline Resizeができるようになり、シャードの数を運用しながら増やし、
増やしたシャード数での負荷の平準化を行えるように
• 今までElasticache for Redis cluster では、Cold Resizeしかできず、もしデータが溜まってきたり、アク
セス数が増えてシャードを増やしたい、もしくは減ってきて減らしたい、となってもサービスの瞬断を伴う
ものとなっていた
• 最大6.1TiBまでのクラスタが作成可能
90. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon Redshift
91. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Short Query Acceleration (SQA)
• ETL処理の様な実行時間の長いクエリの後に短時間で終わるはずの、ショートクエリがキュー
イングされると、ショートクエリの実行完了までの時間が想定よりも書かてってしまうこと
があった
• 機械学習を使い、ショートクエリを判断することで、指定した時間以内で実行完了出来ると
判断すると、自動的にショートクエリ用のWLMキューに移動する
• インタラクティブクエリやダッシュボードクエリなどの実行時間の短縮が期待でき
る。ワークロード依存ではあるが、内部のテストで3倍高速になったケースもある
(CTASやSELECTクエリ)
• WLMの設定でSQAを有効にしmaximum run timeをキュー毎に設定(default 5秒, 1-20秒で
設定可能)
• Tips: ユーザが設定したキューの合計でコンカレンシーやslot countは15以下にする
ことが推薦、キュー数が少ないほどSQAに効果的
92. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Result Caching
• BIツールやダッシュボードなどから発行される定型的なクエリをキャッシュする事に
よってクエリのレスポンス速度を向上
• クエリキャッシュにヒットした場合は結果セットはキャッシュから返却されるため実際
にクエリの実行は行われない
• 実際に実行が必要なクエリにリソースを割くことが出来る
• キャッシュにヒットさせるためにはデータの変更が行われておらずクエリも一致する必
要がある。そうでない場合はクエリを実行し結果をキャッシュする
• enable_result_cache_for_sessionパラメーターで無効化可能
• SVL_QLOGテーブルにsource_queryカラムが追加され、キャッシュを実行し
たクエリIDを識別可能に
93. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.