SQL oder NoSQLdie Auswahl der richtigen Datenbankplattform für die
Cloud
Steffen KrauseTechnical Evangelist
Das richtige Werkzeug
Wenn man nur einen Hammer hat sieht jedes Problem wie ein Nagel aus
Fokus auf Ihre Anwendung
Das universelle Systemdiagramm
Application Tier
Load Balancer
Database tier
Ihr Stack
Application tier
Load balancer
Database tier
Sicherheit, Innovation, Skalierung, Transaktionen, Performance, Persistenz,Verfügbarkeit, Kenntnisse..
Sicherheit, Innovation, Skalierung, Performance, Verfügbarkeit…
Sicherheit, Skalierung, Verfügbarkeit…
Ihr Stack der Sorgen
Auf AWS nicht verfügbar
Spektrum der Optionen
SQL NoSQL
Geringe Kosten Hohe Kosten
Do-it yourself Vollständig verwaltet
OL(T?)P
Anwendungsfall: Relational
ACID
•AtomicityA•ConsistencyC• IsolationI•DurabilityD
Vertikale Skalierung – RAM, CPU usw.
Skalierung
Komplexes Schema
Optionen - Relational
Do-it YourselfVollständig
verwaltet
Relational Database Service (RDS)Jede relationale x64/x86 Datenbank die Sie wollen
OracleSQL ServerMySQLPostgresMariaDBDB2Sybase…
Kernkomponenten
• Amazon Virtual Private Cloud (Amazon VPC)• Elastic Block Store (EBS) provisioned IOPS Volumes– Bis zu 4000 IOPS pro Volume (bis 30000 mit RDS)– Striping über mehrere Volumes möglich
• EBS-optimized Instanzen• Oracle Automatic Storage Management (ASM)• Oracle Data Guard und Active Data Guard• Oracle Secure Backup Cloud Module• Oracle Transparent Data Encryption (TDE)
Primary Region
Primary Availability Zone
AMI(Ready to launch)
Oracle DB Server
Public Subnet
AppServers
Private Subnet
Mirrored Redo Log Volumes
Root Volume
Backup Volume
Data Volume
RMANEBS Snapshot
S3 Bucket
DR Region
EBS Snapshot Copy
PIOPS
Standard Oracle Architektur auf EC2
Primary Region
Primary Availability Zone
CloudFormationTemplate
(Ready to launch)
Oracle DB Server
Public Subnet Private Subnet
Root Volume
Mirrored Redo log Volumes
Root Volume
DR Region
PIOPS
Secondary Availability Zone
Oracle DB Server
Private Subnet
Root Volume
ASM Striped Data Volumes
PIOPS PIOPS
RMAN Backup inS3 Bucket
AMI Used by CFN Template
OSB + RMAN
OSB + RMAN
Public Subnet
Root Volume
AppWeb
Servers
AppWeb
Servers
ASM Striped Data Volumes
Oracle Data Guard
Enterprise Architektur auf EC2
Primary Region
Primary Availability Zone
Oracle DB Server
Public Subnet Private Subnet
Secondary Availability Zone
Oracle DB Server
Private Subnet
RDS Synchronous Replication
Public SubnetApp
Web Servers
AppWeb
Servers
Automated Backups
Vereinfachung: Amazon RDS for Oracle
SQL Server 2012 AlwaysOn Availability Groups in AWSRemote
Admin & MgmtUsers
AWS Region
Availability Zone 1 Availability Zone 2
PrimaryDC/DNS
RerplicaDC/DNS
Windows Server Failover Clustering (WSFC) Cluster
NodeWSFC Configuration
Storage
SQL Server Instance
Instance Network Name
NodeWSFC Configuration
Storage
SQL Server Instance
Instance Network Name
AlwaysOn Availability GroupPrimary Replica Secondary Replica
Availability Group Listener Virtual Network Name
NATInstance
RDGWInstance
NATInstance
RDGWInstance
Elastic IP’s (Public Route) Elastic IP’s (Public Route)
Private IP’s (Private Route)
Private IP’s (Private Route)
Compute Storage
AWS Global Infrastructure
Database
App Services
Deployment & Administration
Networking
Relational Database ServiceDatabase-as-a-Service
Datenbank-Instanzen ohne Installation und Administration
Skalierbare und fehlertolerante Konfigurationen
Feature Details
Multi-Plattform MySQL, Microsoft SQL Server und Oracle RDBMS
Vorkonfiguriert Sofort nutzbare Instanzen mit sinnvollen Standardeinstellungen
Automatisches Patching
Datenbankplattform wird optional automatisch aktuell gehalten
Backups Automatische Backups, Point in Time Recovery möglich
Provisioned IOPS Definierter IO-Durchsatz entsprechend der Anforderungen (bis 30000)
Failover Automatischer Failover auf zweiten Host bei Ausfall des primären
Replikation Einfache Erstellung von Lese-Replikas, einfache Replikation in andere Availability Zone
Relationale Datenbank
Fallst
udie
Amazon Relational Database Service (Amazon RDS) databases stores forum threads, site content, and project configuration data.
High availability Multi-AZ database deployment to handle live game metadata and user-generated content.
Enterprise-grade fault tolerance for protecting customer data.
By managing time-consuming database administration tasks, Amazon RDS allows SEGA to focus on business critical applications.
Relationale Datenbank
Compute Storage
AWS Global Infrastructure
Database
App Services
Deployment & Administration
Networking
Demo: RDShttp://bit.ly/RDSDemoDE
• Verwenden Sie mehrere Availability Zones– RDS bietet MultiAZ für Oracle und MySQL
• Verwenden Sie Provisioned IOPs– Bis zu 30000 für RDS– Bis zu 4000 für EBS Volumes
• Striping (RAID 0) möglich für mehr
• Backup nach S3– Verwendung von DB Snapshots oder EBS Snapshots oder direktes S3 Backup wenn
unterstützt (z.B. Oracle RMAN)• Verwenden Sie geeignete Instanztypen• Skalierung hoch/runter innerhalb von 5-20 Minuten durch Änderung des
Instanztyps
Best Practices: RDBMS auf AWS
Anwendungsfall: NoSQL
Massives Scale Out
Flexibles Schema
2 Wochen später
Niedrige Latenz
•Basically AvailableB A
•Soft stateS
•Eventually consistentE
NoSQL
* Aber einige NoSQL Datenbanken bieten voll transaktionale Schreiboperationen
Horizontales Scaling – RAM, CPU usw.
Scaling
Optionen - NoSQL
Do-it YourselfVollständig
verwaltet
DynamoDBJede x64/x86 NoSQL Datenbank die Sie wollen
MongoDBCassandraRiakRedisCouchDBMemcache…
SimpleDB
(ElastiCache: Memcache, Redis))
• Whitepaper dokumentieren NoSQL Datenbanken auf AWS– http://aws.amazon.com/whitepapers– Couchbase on AWS– Riak on AWS– MongoDB on AWS
NoSQL Datenbanken auf AWS
Compute Storage
AWS Global Infrastructure
Database
App Services
Deployment & Administration
Networking
DynamoDBNoSQL Datenbank mit provisioniertem Durchsatz
Hohe, vorhersagbare Performance
Vollständig verteilte, fehlertolerante Architektur
Feature Details
Provisionierter Durchsatz
Lese/Schreibdurchsatz einfach nach Bedarf erhöhen und vermindern
Vorhersagbare Performance
Durchschnittliche Latenz im einstelligen Millisekunden-Bereich durch SSDs
Starke Konsistenz Sicheres Lesen der aktuellsten Werte
Fehlertolerant Daten repliziert über mehrere Availability Zones
Monitoring Integration mit CloudWatch
Sicher Integration mit AWS Identity and Access Management (IAM)
Elastic MapReduce
Integration mit Elastic MapReduce (Hadoop) für komplexe Analysen oder große Datenmengen
NoSQL Datenbank
Fallst
udie
"When IMDb launches features to our over 110MM monthly unique users worldwide, we want to be prepared for rapid growth (1000x
scale), and for customers to use our software in exciting and different ways…
…To ensure we could scale quickly, we migrated IMDb’s popular 10 star rating system to
DynamoDB. We evaluated several technologies and chose DynamoDB because it is a high-performance database system that scales
seamlessly and is fully managed. This saves us a ton of development time and allows us to focus
our resources on building better products for our customers, while still feeling confident in our
ability to handle growth.”
H.B. Siegel, CTO, IMDb.
NoSQL Datenbank
Compute Storage
AWS Global Infrastructure
Database
App Services
Deployment & Administration
Networking
Demo: DynamoDBhttp://bit.ly/SQLNoSQLDE ab 23:57
Data WarehousingReporting & Analytics
Komplexes Schema
Komplexes Schema
OK, hatten wir schon: Relational (RDS oder EC2)Wenn die Datenmenge nicht zu groß ist
Aber was ist mit:• Richtig großen
Datenmengen• Niedrigen Kosten?
Data Warehousing
€
Compute Storage
AWS Global Infrastructure
Database
App Services
Deployment & Administration
Networking
Data Warehouse
RedshiftSchnelle und performante Analyse großer Datenmengen
1/10 der Kosten eines traditionellen Data Warehouse
Automatisches Deployment & Administration
Feature Details
Skalierung Skaliert von Terabytes bis Petabytes
Niedrige Kosten Preise ab US$999/TB/Jahr
Columnstore Spaltenweise Speicherung optimiert für DWH Workloads
Fehlertolerant Automatische Ersetzung von Nodes & Disks, Automatisches Backup nach S3
Vollständig verwaltet
Automatisches OS & Software Patching
Sicher Redshift Daten können verschlüsselt werden
Kompatibel Kompatibel mit populären BI Tools über ODBC und JDBC Treiber
Demo: Redshifthttp://bit.ly/RedshiftDE
cr1.8xlarge hat 244 GB RAM!
Image Copyright by StuSeeger http://www.flickr.com/photos/stuseeger/
Direkt aus dem AWS Marketplace
SAP HANA on AWS
Premium Business DeveloperOverview SAP HANA One, plus SAP Cloud Integration (HCI)
and approval to load SAP source dataFully featured SAP HANA virtual appliance on AWS Fully featured SAP HANA virtual appliance
on AWS for individual developers
Use Cases Production and non-production All SAP HANA use cases supported including SAP
Business Suite and SAP NetWeaver Business Warehouse on HANA
Production and non-production Analytics acceleration Data merging Temporary event-based analytics Self-service BI Prototypes and proofs-of-concept
Non-production only Develop, test and demo applications on
top of the HANA platform Learning environment
Key Benefits Instant provisioning Enterprise Support included Annual subscription pricing – economical for
24x7 customers Data Services included
Instant, self-serve access – up and running in 10 minutes
Start and stop when needed – reduce license and infrastructure cost
Community support
Free developer license Easily accessible and rapidly deployable Pay-per-use infrastructure
License Annual subscription On-demand - $0.99 per hour Free Developer License
Available fromSAP HANA Marketplace AWS Marketplace SAP SCN
SAP HANA One
Demo: http://aws.typepad.com/aws/2013/05/demo-sap-hana-one-on-aws.html
Demo: SAP HANAhttp://bit.ly/HanaDemoDE
Halt, was ist mit Hadoop?• Vollständig verwalteter Hadoop Service: EMR (Elastic MapReduce)– Einfaches Erstellen von Clustern in Minuten– Verwendung von S3 als skalierbarer Speicher ohne Kopieren von Daten
• Viele Kunden verwendne Hadoop für DWH-artige Workloads– Weil das lange zeit die einzige skalierbare, kostengünstige Möglichkeit war– In vielen Fällen ist Redshift für DWH Workloads schneller und preiswerter
• Hadoop/EMR ist erste Wahl für komplexe Berechnungen auf großen Datenmengen– Auch für explorative oder ETL-artige Jobs
Elastic MapReduce
DWH Workflow Beispiel
S3 S3
EMRRedshift
Logs / Dateien
DataPipeline
Reporting und BI
explorativeAnalytik
• Wählen Sie das richtige Werkzeug für die Aufgabe• Ihre Wahl: Relational oder NoSQL– Verwenden Sie RDS für Prototyping und hochwertige Daten– Verwenden Sie Amazon DynamoDB für hochperformante,
persistente, kostengünstige Speicherung– Verwenden Sie Redshift für skalierbares, kostengünstiges Data
Warehousing• Ihre Wahl: Do-it-yourself oder voll verwaltet– Verwaltete Dienste ermöglichen Ihnen den Fokus auf die eigentliche
Aufgabe
Zusammenfassung
• http://aws.amazon.com/de • Getting started with Free Tier:
http://aws.amazon.com/de/free/• 25 US$ credits für neue Kunden:
http://aws.amazon.com/de/campaigns/account/• Twitter: @AWS_Aktuell• Facebook:
http://www.facebook.com/awsaktuell • Webinare: http://aws.amazon.com/de/about-aws/events/• Slides: http://de.slideshare.net/AWSAktuell
Ressourcen