More Related Content
Similar to [AWSマイスターシリーズ]Amazon Relational Database Service (RDS)
Similar to [AWSマイスターシリーズ]Amazon Relational Database Service (RDS) (20)
More from Amazon Web Services Japan
More from Amazon Web Services Japan (20)
[AWSマイスターシリーズ]Amazon Relational Database Service (RDS)
- 1. AWSマイスターシリーズ
Amazon Relational Database Service
(Amazon RDS)
2013.04.10
アマゾンデータサービスジャパン株式会社
ソリューションアーキテクト 松尾 康博
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 2. 今日のAgenda
Amazon RDSの概要
Amazon RDSの主要機能について
Amazon RDSの新機能紹介
料金モデル
まとめ
2
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 3. お客様のアプリケーション
デプロイと自動化
ライブラリ & SDKs IDEプラグイン Web管理画面 モニタリング Development &
認証 AWS Elastic
Java, PHP, .NET, Eclipse Management Amazon
AWS IAM Beanstalk Administration
Python, Ruby Visual Studio Console CloudWatch
AWS CloudFromation
メッセージ
Amazon SNS 検索エンジン ワークフロー管理
Amazon SQS Amazon Cloud Search Amazon SWF
Amazon SES
Application
Service
コンテンツ配信 分散処理 キャッシング
Amazon CloudFront Elastic MapReduce Amazon Elasticache
ストレージ
コンピュータ処理 データベース
Amazon S3
Amazon RDS
Amazon EC2 Amazon EBS Amazon DynamoDB
Auto Scale Amazon Glacier Amazon Redshift
AWS StorageGateway Infrastructure
Service
ネットワーク & ルーティング
Amazon VPC / Amazon Elastic Load Balancer / Amazon Route 53 /AWS Direct Connect
AWS グローバルインフラ
Region AZ
Geographical Regions, Availability Zones, Points of Presence
3
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 4. AWS が提供するデータベースサービス
完全マネージド型で、セットアップ、運用、拡張が
容易なリレーショナル・データベースサービス
Amazon RDS
完全マネージド型で、高速なパフォーマンス、シー
ムレスな拡張性と信頼性をNoSQLサービス
Amazon DynamoDB
高速で管理も万全なペタバイト規模のデータウェア
ハウスサービス
Amazon Redshift
4
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 5. AWS が提供するデータベースサービス
完全マネージド型で、セットアップ、運用、拡張が
容易なリレーショナル・データベースサービス
Amazon RDS
完全マネージド型で、高速なパフォーマンス、シー
ムレスな拡張性と信頼性をNoSQLサービス
Amazon DynamoDB
高速で管理も万全なペタバイト規模のデータウェア
ハウスサービス
Amazon Redshift
5
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 6. 典型的Webアーキテクチャ(他のサービスとの組み合わせ)
Amazon Route 53
CloudFront
(ドメイン名割り当て)
(コンテンツ
配信)
東京リージョン
ELB
(ロードバランサ)
AZ-1a AZ-1c
EC2 EC2
S3
静的コンテンツ
自動同期
RDSマスタ RDSスレーブ
6
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 7. Amazon RDSとは?
3種類のエンジンをサポート
煩わしいDB構築・パッチ管理が容易
自動バックアップとDR機能
手動スナップショットとクローン機能
数クリックで起動・スケール可能
モニタリング機能と自動ホスト修復機能
7
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 8. Amazon RDSとは?(続き)
EC2同様、数分でDBインスタンスを起動可能
EC2同様、時間単位の従量課金
自動・手動バックアップ、自動パッチ更新、レプリケー
ション構成、DR構成が数クリックで可能
既存のアプリケーションやツールがそのまま利用可能
VPC対応
8
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 9. オンプレミス vs RDS
OS
ラックへ設 電源とNW
HWの購入 インストー
置 を設定
ル
RDBMS RDBMS
RDBMS
基本設定 インストー レプリケー
稼働確認
ル ション設定
9
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 10. オンプレミス vs RDS
RDSの各種オプショ アプリケーションか
ンを選んで起動 ら接続
10
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 12. 今日のAgenda
Amazon RDSの概要
Amazon RDSの主要機能について
Amazon RDSの新機能紹介
料金モデル
まとめ
12
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 13. 起動時の主な指定項目
DBエンジン
• MySQL, Oracle, SQLServer
インスタンス
• t1.micro (1CPU, 630MB) ~ m2.4xlarge (8CPU, 68GB)
• P-IOPS最適化
• 確保するストレージ容量 ( 5GB ~1TB)
オプション
• 自動パッチ
• 高可用性( Multi-AZ)
• 自動バックアップ
DB設定
• DB名、パラメータ、ユーザ、ポート、セキュリティ
13
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 14. 簡単に高性能・可用性の構成を実現
Multi-AZ
スルー
可用性 レイテンシ
プット増
スケールアップ
Multi AZ
Availability Availability
リードレプリカ zone zone
プロビジョンドIOPS Region
スケールアップ リードレプリカ プロビジョンド IOPS
14
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 15. RDS(MySQL) アーキテクチャ
アベイラビリティゾーンA アベイラビリティゾーンB
自動バック
スナップショ データ同期
アップ
ット(自動/手
自動フェイルオーバー
動)
非同期レプリケーション
Binlog
Binlog
Binlog
(トランザクション
(トランザクション
ログ)
ログ)
(5分間隔)
(5分間隔)
S3 Availability Zone A Availability Zone B
15
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 16. RDS(MySQL) アーキテクチャ
アベイラビリティゾーンA アベイラビリティゾーンB
自動バック
自動バック データ同期
アップ
アップ 自動フェイルオーバー
非同期レプリケーション
マルチAZデプロイメント
スナップ
スナップ
ショット
ショット
(Multi-AZ)
16
16
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 17. マルチAZデプロイメントとは(Multi-AZ)
ワンクリックで耐障害性を向上可能なソリューション
• 高い技術力を持つDBAが行っていた設計をそのまま
サービス化
同期レプリケーション+自動フェイルオーバ
• アプリ側での対処は必要なし(エンドポイントは変わらない)
フェイルオーバのタイミング
• パッチ適用などのメンテナンス計画停止
• インスタンスやハードウェア障害
• 手動reboot時に強制フェイルオーバー指定
17
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 18. RDS(MySQL) アーキテクチャ
アベイラビリティゾーンA アベイラビリティゾーンB
自動バック
自動バック データ同期
アップ
アップ 自動フェイルオーバー
非同期レプリケーション
リードレプリカ
Binlog
Binlog
(トランザクション
(トランザクション
ログ)
ログ)
(5分間隔)
(5分間隔)
18
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 19. リードレプリカ(RR)とは?
特定DBインスタンスの読み込み用のコピー
• MySQL固有のレプリケーション機能で実現
• 非同期ログシッピング
• 各RRは個別のエンドポイントを持つ
想定ユースケース
• Read(select)のスケーリングや、BI等の解析処理
• Multi-AZの耐障害性の代替の機能ではない
デフォルトで最大5台まで設定可能
マルチAZとリードレプリカの併用はもちろん可能
19
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 20. RDS(MySQL) アーキテクチャ
アベイラビリティゾーンA アベイラビリティゾーンB
自動バックアップ機能
自動バック
自動バック データ同期
アップ
アップ 自動フェイルオーバー
非同期レプリケーション
スナップ
スナップ
ショット
ショット
20
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 21. 自動バックアップとリストア
RDS標準機能
• 自動スナップショット+トランザクションログをS3に保存
自動スナップショット
• 1日1回自動取得 (バックアップウインドウで指定した時間帯)
• 保存期間は最大35日分 (0~35の間で設定可能)
• (任意のタイミングで、手動取得も可能)
2種類のリストア方法
• リストア:任意のスナップショット
• Point-In-Time-Recovery: 指定した時刻(直近5分~最古のス
ナップショットの時点)の状態にリカバリ
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_CommonTasks.BackupRestore.html
21
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 22. スナップショット利用シーン
本番インスタンス障害後に、スナップショットか
ら新たにインスタンス起動。
アプリケーションは新しいエンドポイントに接続
するように修正
Production.xxx.amazonaws.com Prodduction2.xxx.amazonaws.com
本番インスタンス 自動Snapshot
リストア or Point-in-time-recovery
22
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 23. スナップショット利用シーン
テーブル変更などを伴う大きなアプリケーショ
ンアップデートを実施する前に手動でスナップ
ショットを取得しておく。
スナップショットから旧バージョンのインスタン
ス起動・接続することで切り戻しを実現
Production.xxx.amazonaws.com Prodduction2.xxx.amazonaws.com
Update Ver. Issue?
Old Ver.
手動Snapshot
本番インスタンス
リストア or Point-in-time-recovery
23
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 24. ソフトウェアメンテナンス
RDS標準機能
• メンテナンスウインドウで指定した曜日・時間帯に自動実施
メンテナンス内容
• 安全性・堅牢性に関わるソフトウェアパッチを自動適用
• Rebootを伴う場合も
TIPS
• メンテナンスは数ヶ月に一度の頻度で発生
• 指定した時間帯の数分間で実施(メンテナンス内容に依存)
• アプリケーション側で、DBアクセス出来ない場合にSorryペー
ジを返す仕組みを入れておく
• トラフィックが少ない曜日・時間帯を指定しておく
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_TerminologyandKeyConcepts.h
tml#Concepts.DBMaintenance
24
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 25. スケールアップ機能
マネージメントコンソールからスケールアップ可能
• インスタンス停止が発生
コマンドラインからも勿論可能
• 例:rds-modify-db-instance hogedb -c db.m1.large --
apply-immediately
CPUは1ECUから26ECUまで
メモリは1.7GBから68GBまで
25
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 26. DBインスタンスクラス
Hi-Mem 2XL 34.2 GB
128 13 EC2 Compute Units
4 virtual cores
64 Hi-Mem XL 17.1 GB Hi-Mem 4XL 68.4 GB
6.5 EC2 Compute Units 26 EC2 Compute Units
2 virtual cores 8 virtual cores
32
Memory (GB)
16 Medium 3.75 GB Extra Large 15 GB
2 EC2 Compute Unit 8 EC2 Compute Units
1 virtual core 4 virtual cores
8
Large 7.5 GB
4 EC2 Compute Units
4 2 virtual cores
2 Micro 630 MB
Up to 2 ECUs
(for short bursts)
1
Small 1.7 GB 1 2 4 8 16 32 64 128
1 EC2 Compute Unit
1 virtual core EC2 Compute Units (ECU)
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.DBInstanceClass.html
26
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 27. VPCサポート
全てのエンジン・インスタンスタイプがVPC内で利用可能
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.RDSVPC.html
27
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 28. RDSのアクセス制御
アクセス元インスタンスのSecurity Groupを指定
それ以外のインスタンスからのアクセスは拒否
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.RDSSecurityGroups.html
28
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 29. RDSのアクセス制御
アクセス制御の方法は起動場所によって異なる
• DB Security Group
• VPC Security Group
注意
• VPCではDB Security GroupからVPC Security Groupに移行
• VPC by Default環境では DB Security Groupが無効
RDS起動場所 ログ種別
EC2-Classic DB Security Group
EC2-VPC VPC Security Group
VPC by Default VPC Security Group
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.RDSSecurityGroups.html
29
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 30. DBエンジン
現在3種類をサポート
MySQL
• 5.1.x、5.5.xを選択可能
Oracle
• 11g R2 (11.2.x )
• BYOL:SE1, SE, EEをサポート
• ライセンス込み:SE1
SQL Server
• 2008 R2, 2012を選択可能
• BYOL: Standard Edition, Enterprise Edition
• ライセンス込み:Express, Web Edition, Standard Edition
30
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 31. DBエンジン – Oracle -
標準機能
• Character Set ( JA16SJISTILDE, AL32UTF8, etc. )選択
• Timezone設定
RDSオプション
• Oracle Enterprise Manager Database Control
• Oracle XML DB
• Oracle Application Express (APEX, APEX-DEV)
Enterprise Option ( BYOLでサポート)
• Partitioning
• Management Packs (Diagnostic, Tuning)
• Advanced Compression
• Total Recall
詳細情報
• 機能情報
• http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Oracle.Concepts.html
• FAQ
• http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/RDSFAQ.Oracle.html
31
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 32. DBエンジン – SQL Server -
標準機能
• SQL Server Migration Assistant
• Database Engine Tuning Advisor (SE, EE, Web)
• SQL Server Agent
• SSL接続
バージョンアップ
• 2008 R2から 2012へのメジャーバージョンアップ機能
詳細情報
• 機能情報
• http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/SQ
LServer.Concepts.General.html
• FAQ
• http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/RD
SFAQ.SQLServer.html
32
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 33. DBエンジンごとの主要機能まとめ
MySQL Oracle SQL Server
Multi-AZ
リードレプリカ
Point-In-Time-Recovery
VPC
33
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 34. 標準ストレージ
EBSボリュームベースのDBストレージ
• データベースとログの格納に利用
• ストライピングした複数のEBSボリュームで構成
• サイズを増量するとボリューム数が増え、IOPS性能が向上
• オンラインでストレージサイズ拡張可能(MySQL, Oracle)
DBエンジン サイズ 動的増量
MySQL 5GB-3TB
Oracle 10GB-3TB
SQL Server( Web , Ex) 20GB-1TB
SQL Server (SE, EE) 200GB-1TB
34
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 35. プロビジョンドIOPS ストレージ
高性能なストレージオプション
• ストレージパフォーマンスの性能(IOPS)を指定
• 低レイテンシと高スループットを安定して実現可能
• 標準ストレージからオンラインで変更可能(MySQL, Oracle)
• フェイルオーバー、クラッシュリカバリの時間短縮にも有効
DBエンジン IOPS サイズ 動的変更
MySQL 1000-30,000 100GB-3TB
Oracle 1000-30,000 100GB-3TB
SQL Server( Web , Ex) 1000-7,000 100GB-1TB
SQL Server (SE, EE) 2000-7,000 200GB-1TB
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/RDSFAQ.PIOPS.html
35
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 36. プロビジョンドIOPS ストレージ(続き)
IOPSについての注意点
• 各DBエンジンの仕様、Page SizeやOS、仮想化技術の違いで実
際のIOPSは以下の表のような目安になる
• より大きいPIOPSでより低レイテンシ・高スループットに
• 小さなインスタンスタイプではストレージとのN/W帯域不足で
設定したIOPSに達しない場合がある(m1.large以上を推奨)
DBエンジン Page Size Max IOPS for
(最大サイズ、IOPS) m2.4xlarge
MySQL(3TB, 30,000) 16KB 12,500
Oracle(3TB, 30,000) 8KB 25,000
SQL Server(1TB, 10,000) 8KB 7,000
※ Read 50%, Write 50%の場合
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Overview.ProvisionedIOPS.html#US
ER_PIOPS.Realized
36
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 37. 今日のAgenda
Amazon RDSの概要
Amazon RDSの主要機能について
Amazon RDSの新機能紹介
料金モデル
まとめ
37
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 38. RDSアップデート
2012.05.02 Multi-AZ 強制フェイルオーバー機能 ( MySQL, Oracle)
2012.05.08 SQL Server がDBエンジンに追加
2012.05.17 MySQL RR がVPCで利用可能に
2012.05.29 option group機能、 Oracle Enterprise Manager機能 (Oracle)
2012.06.11 MySQL t1.microで利用可能に
2012.07.11 SQL Server でTuning Advisorが利用可能に
2012.08.16 Oracle でAPEX, XML DB repository, timezoneが利用可能に。VPC対応。
2012.08.21 tagging対応
2012.08.22 SQL Server Agent機能が利用可能に
2013.09.13 SQL Serverが VPC対応
2013.09.13 Oracle Data Pumpが利用可能に
2012.09.25 PIOPS ( 10000) が利用可能に
2012.09.26 SQL Server 2012が追加
2012.09.27 Oracleで t1.microが利用可能に
2012.10.10 MySQLでSSL接続が可能に
2012.10.11 MySQLでRRを昇格させる機能
2012.11.06 インスタンスタイプ追加 m1.medium (MySQL, Oracle, SQL Server), m1.xlarge( Oracle, SQL Server)
2012.11.06 料金値下げ ( MySQL, Oracle)
2012.12.04 t1.micro がVPCで利用可能に
2012.12.17 新デザインのマネジメントコンソールが選択可能に
2012.12.20 Data Pipeline がRDSをサポート
2013.01.14 インスタンスのリネームが可能に。VPCでDB Security Groupから VPC Security Groupに変更
2013.02.04 イベント通知機能が利用可能に
2013.02.13 Multi-AZの料金値下げ
2013.03.04 ログアクセス機能が利用可能に
2013.03.11 VPC by default 対応。VPC内のインスタンスを外部から接続可能に。
2013.03.13 PIOPS が最大30,000に増強( MySQL, Oracle) ストレージ容量が最大3TBに
2013.03.13 SQL Serverのメジャーアップグレード機能が利用可能に(2008から2012へ)
38
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 39. ログアクセス機能
各種ログを直接参照する機能
• API経由 でダウンロード or マネジメントコンソールで表示
DBエンジン ログ種別 保持期間
MySQL Error, Slow Query※1, General※1 24時間
Oracle Alert, Trace 7日間※2
SQL Server Error, Agent, Trace 7日間※2
※1 Parameter Groupで有効化するとアクセス可能
※2 Parameter Groupで調整可能
http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_LogAccess.html
39
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 40. イベント通知 (DB Event Subscriptions)
RDSで発生した40以上のイベントをSNS経由でPush通知
• シャットダウン、再起動、バックアップ開始終了、フェイルオーバー、
設定変更、メンテナンス開始終了、etc
アプリケーションと組み合わせた自動化やログ保存が容易に
DB event
Queue
Message
Email
Amazon SNS Notification
Alarm HTTP
Notification
40
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 41. RR Promotion
アベイラビリティゾーンA アベイラビリティゾーンB
自動バック
スナップショ
アップ
ット(自動/手
動)
既存Masterから独立
(切り離し)
Binlog
Binlog
Binlog
(トランザクション
(トランザクション
ログ)
ログ)
(5分間隔)
(5分間隔)
41
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 42. Rename
EC2からRDSに接続する際に使用するエンドポイント(FQDN)を切り替える
・切り替え時に、インスタンスの再起動などは発生しない(DNS切り替えのみ)
・切り替え(DNSの変更)は、Apply Immediately で数分必要
・切り替え後、古いエンドポイントでのアクセスは出来ない
Production.xxx.amazonaws.com
Old.xxx.amazonaws.com
42
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 43. Renameの使い所
復旧時の利用
• リストアしたインスタンス、PITRしたインスタ
ンスを本番運用に切り替える場合
• (かつ、アプリ側の変更が困難な場合)
大幅なDB変更を伴うアプリケーションアッ
プデートがある場合
• (かつ、アプリ側の変更が困難な場合)
43
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 44. Rename ケース1
障害後の復旧として
・
Production.xxx.amazonaws.com prod2.xxx.amazonaws.com
Old.xxx.amazonaws.com Prodduction.xxx.amazonaws.com
Snapshot
本番インスタンス
44
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 45. Rename ケース2
大型リリース時の切り戻し対策として
・
Production.xxx.amazonaws.com rr1.xxx.amazonaws.com
Old.xxx.amazonaws.com Prodduction.xxx.amazonaws.com
Update Ver. Issue
Old Ver.
本番インスタンス
45
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 46. Renameの注意点
DNS 切り替え
• すぐに切り替わるわけではない。目安は数分(3分程度)
• 当然だが、ある時点で、同一リージョン内にて名前の重複はできない
Renameすると引き継がないもの(APIで取得している場合は注意)
• CloudWatchの MetricName(古いMetricは別レコードとして残る)
• DB Eventsの Identifier
Renameしてもそのまま引き継ぐもの
• MasterとRRの関係
• Tag、Snapshot
その他
• http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_Rena
meInstance.html
46
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 47. データ保護・複製の選択肢
Multi-AZ
• 最もデータロストが少ない
• 切り替えによる、アプリ側の変更は不要
• 障害時に自動復旧(内部的に切り替え)
Point in Time Recovery
• 直近5分前状態の複製を作成
• 手動
• 要エンドポイント変更対応(アクセス先変更 or rename)
RR Promotion
• RRのデータ状態のまま独立( Replica Lag)
• 手動
• 要エンドポイント変更対応(アクセス先変更 or rename)
47
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 48. 今日のAgenda
Amazon RDSの概要
Amazon RDSの主要機能について
Amazon RDSの新機能紹介
料金モデル
まとめ
48
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 49. RDSの料金体系
DBインスタンス起動時間 ($/時間)
• DBインスタンスクラス( t1.micro ~ m2.4xlarge)
• 標準配備 or Multi-AZ
• BYOL or ライセンス込 ( Oracle, SQL Server )
ストレージ
• ストレージ容量($/GB/月) とI/O料金
• 標準ストレージ or PIOPS
• 標準配備 or Multi-AZ
• バックアップストレージ容量($/GB/月)
• I/Oリクエスト数(標準ストレージ) or IOPS (PIOPS)
ネットワーク
• RDSからインターネット経由で送信したバイト数 ($/GB)
http://aws.amazon.com/jp/rds/pricing/
49
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 50. 2つの価格モデル
オンデマンド DB インスタンス
• 通常の時間単位の課金
Amazon RDS リザーブドインスタンス
• 予約金を支払うことで時間当たり価格を割引(最大70%節減)
• MySQL, Oracle, SQL Server全て対応
• 購入時に以下を指定
• リージョン、DBエンジン、インスタンスクラス、マルチAZ or シ
ングルAZ、期間
• Oracle, SQL Serverは、ライセンス込みかBYOLを指定
http://aws.amazon.com/jp/rds/reserved-instances/
50
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 51. Multi-AZ 値下げ!
Single-AZの2倍 -> 約1.7倍に
http://aws.typepad.com/aws_japan/2013/0
2/aws-price-reduction-rds-multi-az.html
51
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 52. Simple Monthly Calculator
Webフォームで概算費用を試算できます
http://calculator.s3.amazonaws.com/calc5.html?lng=ja_JP
52
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 53. AWS無料試用枠
AWSでは、無料試用枠を用意しています
• http://aws.amazon.com/jp/free/
RDSでは
• t1.micro 750時間/月、ストレージ20GB、バックアップ20GB
53
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 54. 参考文献
Amazon RDS
• http://aws.amazon.com/jp/rds/
Amazon RDS ドキュメント
• http://aws.amazon.com/jp/documentation/rds/
Amazon RDS チュートリアル
• http://aws.amazon.com/articles/Amazon-RDS
Amazon RDS Technical FAQ
• http://docs.aws.amazon.com/AmazonRDS/latest/UserGui
de/RDSFAQ.html
Amazon Web Services Japan blog
• http://aws.typepad.com/aws_japan/
54
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.
- 55. ご参加ありがとう
ございました。
55
© 2012 Amazon.com, Inc. and its affiliates. All rights reserved. May not be copied, modified or distributed in whole or in part without the express consent of Amazon.com, Inc.