3. Solution for Database
Build your own
For example - MySQL on EC2, Postgres , …
Acquire instances
Install the database according to your architecture
Self manage your database
Database-as-a-Service
For example - Amazon RDS,
Xeround, Azure SQL…. ,
3
4. Amazon RDS
RDS = Relational Data Storage
A Service make it easy to
+ Set up
+ Operate
+ Scale
Relational Database on Cloud
4
12. Shared Everything vs. Shared Nothing
Shared Everything
Scale throughput but limited due to shared resources
Storage and networking limitations in the cloud
ScaleDB
Shared Nothing
Horizontal data partition / sharding
Unlimited scalability
Many design and implementation
challenges
12
13. Stategies for scaling
Read Replicas
Read replicas, also known as master-slave
deployments.
A good option for applications with a high read to write ratio.
A single master database is responsible for handling all writes.
The writes are then replicated to the slaves which are designated
to handle just reads.
Partioning/Sharding
Breaking a larger database up into smaller databases
+ Splitting tables that are not joined in the same query onto different
hosts
+ Duplicating a table across multiple hosts and then splitting where
a row goes.
13
16. Multi-AZ Deployement
Availability Zones: are distinct locations within
a Region that are engineered to be isolated from
failures in other Availability Zones.
Run a DB Instance as a Multi-AZ
deployment, the “primary” serves database
writes and reads. Amazon RDS provisions and
maintains a “standby” behind the scenes, which
is an up-to-date replica of the primary. The
standby is “promoted” in failover scenarios. After
failover, the standby becomes the primary and
accepts your database operations.
16
20. Compare to SQL Azure
Amazon RDS
Less Cloudy
Built on MySQL/Oracle
Amazon RDS wins Scale Up
SQL Azure
More Cloudy
Built on SQL Server
SQL Azure wins Scale Out
20