Amazon Relational Database Service (RDS) provides a managed relational database in the cloud. It supports several database engines including Amazon Aurora, MariaDB, Microsoft SQL Server, MySQL, Oracle, and PostgreSQL. Key features of RDS include automated backups, manual snapshots, multi-AZ deployment for high availability, read replicas for scaling reads, and encryption options. DynamoDB is AWS's key-value and document database that delivers single-digit millisecond performance at any scale. It is a fully managed NoSQL database and supports both document and key-value data models. Redshift is a data warehouse service and is used for analytics workloads requiring fast queries against large datasets.
2. Mahesh TR
What is Relation Database
• Amazon Relational Database Service (Amazon RDS) is a web service that makes it easier to set up,
operate, and scale a relational database in the cloud. It provides cost-efficient, resizable capacity for
an industry-standard relational database and manages common database administration tasks.
• Think of traditional spreadsheet
Database
Tables
Row
Fields (Columns)
5. Mahesh TR
Automated Backups
There are two types of backup automated backup and manual snapshot.
• The automated backup feature of Amazon RDS enables point-in-time recovery for your DB Instance, allowing
you to restore your DB Instance to any second during your retention period, up to the last five minutes.
• maximum retention period for automated backups has been increased from eight days to thirty five days.
6. Mahesh TR
RDS Snapshots
Db Snapshots are done manually (User initiated) they are stored even after delete the original
RDS Instance, unlike automated backups
7. Mahesh TR
Backup restore
When you restore either an automated backup or manual snapshot, the restore version of the
database will be new RDS with an new end point.
9. Mahesh TR
Multi AZ
Amazon RDS Multi-AZ deployments provide enhanced
availability and durability for Database (DB) Instances,
making them a natural fit for production database
workloads. When you provision a Multi-AZ DB Instance,
Amazon RDS automatically creates a primary DB
Instance and synchronously replicates the data to a
standby instance in a different Availability Zone (AZ).
Each AZ runs on its own physically distinct, independent
infrastructure, and is engineered to be highly reliable. In
case of an infrastructure failure, Amazon RDS performs
an automatic failover to the standby
11. Mahesh TR
RDS Read Replicas
• Read replicas are designed for workload sharing / offloading
• Created from the snapshot of the master instance
• Asynchronous replication / read-only connections
• Each Read replica will have it’s own Endpoint
• Read-only disaster recovery.
✓Mysql Server
✓Mariadb
✓PostgreSQL
13. Mahesh TR
Multi-AZ with Read
Replicas
• For the MySQL, MariaDB and PostgreSQL engines, Amazon
RDS allows you to combine read replicas with Multi-AZ
deployments. In Multi-AZ deployments, the data in your
primary DB Instance is synchronously replicated to to a
standby instance in a different Availability Zone (AZ).
• You can use Multi-AZ deployments and read replicas in
conjunction to enjoy the complementary benefits of each.
You simply configure the source DB Instance for your read
replicas in a Multi-AZ deployment. That way you gain both
the data durability and availability benefits of Multi-AZ
deployments and the read scaling benefits of read
replicas. Note that you cannot configure a read replicas in
a Multi-AZ configuration.
14. Mahesh TR
Dynamo DB
Amazon DynamoDB is ideal for existing or new applications that need a flexible NoSQL database with low read
and write latencies, and the ability to scale storage and throughput up or down as needed without code changes
or downtime. Use cases require a highly available and scalable database because downtime or performance
degradation has an immediate negative impact on an organization’s business.
e.g. mobile apps, gaming, digital ad serving, live voting and audience interaction for live events, sensor networks, log
ingestion, access control for web-based content, metadata storage for Amazon S3 objects, e-commerce shopping
carts, and web
session management.
DynamoDB allows you to delete expired items from tables automatically to help you reduce storage usage and the
cost of storing data that is no longer relevant with “time to live”
Dynamo DB offers push button scaling, meaning that you can scale your database on fly, without any downtime
RDS is not easy, you need to use bigger instance or read replica.
15. Mahesh TR
Dynamo DB Pricing
Provisioned throughput capacity
✓ Write throughput $ 0.0065 per hour for every 10 units
✓ Read throughput $ 0.0065 per hour for every 50 units
Storage cost of $0.25GB per month.
16. Mahesh TR
Read Consistency
Every AWS region consists of multiple distinct locations called Availability Zones. Each Availability Zone is
isolated from failures in other Availability Zones, and to provide inexpensive, low-latency network connectivity
to other Availability Zones in the same region. This allows rapid replication of your data among multiple
Availability Zones in a region.
When your application writes data to a DynamoDB table and receives an HTTP 200 response (OK), all copies of
the data are updated. The data is eventually consistent across all storage locations, usually within one second
or less.
Spread across 3 geographically distinct datacenters.
17. Mahesh TR
DynamoDB supports eventually consistent and strongly
consistent reads.
Eventually Consistent Reads (Default)
When you read data from a DynamoDB table, the response might not reflect the results of a recently completed write
operation. The response might include some stale data. If you repeat your read request after a short time, the
response should return the latest data.
Strongly Consistent Reads
When you request a strongly consistent read, DynamoDB returns a response with the most up-to-date data, reflecting
the updates from all prior write operations that were successful. A strongly consistent read might not be available if
there is a network delay or outage.
Note
DynamoDB uses eventually consistent reads, unless you specify otherwise. Read operations (such as GetItem, Query,
and Scan) provide a ConsistentReadparameter. If you set this parameter to true, DynamoDB uses strongly consistent
reads during the operation.
18. Mahesh TR
What is DMS
AWS Database Migration Service is a web service you can use to migrate data from your database that is on-
premises, on an Amazon Relational Database Service (Amazon RDS) DB instance, or in a database on an Amazon
Elastic Compute Cloud (Amazon EC2) instance to a database on an AWS service. These services can include a
database on Amazon RDS or a database on an Amazon EC2 instance. You can also migrate a database from an
AWS service to an on-premises database. You can migrate data between heterogeneous or homogenous
database engines.
19. Mahesh TR
DMS
Source Database Target Database on Amazon RDS
Oracle Database
Amazon Aurora, MySQL, PostgreSQL, MariaDB
Oracle Data Warehouse Amazon Redshift
Microsoft SQL Server
Amazon Aurora, Amazon Redshift, MySQL,
PostgreSQL, MariaDB
Teradata Amazon Redshift
IBM Netezza Amazon Redshift
Greenplum Amazon Redshift
HPE Vertica Amazon Redshift
MySQL and MariaDB PostgreSQL
PostgreSQL Amazon Aurora, MySQL, MariaDB
Amazon Aurora PostgreSQL
22. Mahesh TR
What’s OLTP?
OLTP is what most people think of as databases. It stands for Online Transactional Processing and is designed to
serve as a persistent state store for front-end applications. They excel at quickly looking up specific information as
well as transactional procedures like INSERT, UPDATE, or DELETE. Some common tasks asked of OLTP systems
include:
• What is the name of the current user, when given an email address?
• What is the last stage that a player was on for my mobile game?
• Update the billing addresses for a set of clients
➢MySQL
➢PostgreSQL
➢Amazon Aurora
➢Oracle RDBMS
➢IBM DB2
23. Mahesh TR
What’s OLAP?
In contrast to an OLTP database, an OLAP database is designed to process large datasets quickly to answer
questions about data. The name reflects this purpose: Online Analytic Processing.
• Common use cases for an OLAP database are:
• What’s the customer lifetime value of my e-commerce application?
• What’s the median duration of play time for my mobile game?
• What’s the conversion rate for various landing pages based on the referrer?
✓Amazon Redshift
✓HP Vertica
✓Teradata
✓IBM Netezza
✓KDB+
26. Mahesh TR
ElastiCache
• Fully managed, in-memory data store
and cache in the cloud. Compatible
with Redis and Memcached.
• Provides sub-millisecond latency to
power real-time applications.
27. Mahesh TR
Memcache and Redis
Memcahe
✓ Widely adopded memory object cacheing system
Redis
✓ Popular opensource in-memory key value store
✓ Supports data structures such as stored sets and limts.
28. Mahesh TR
Aurora RDS vs MySQL RDS
Features Amazon RDS for Aurora Amazon RDS for MySQL
Performance
According to Amazon, Aurora offers
five times the performance of a
standard deployment of a MySQL
instance.
The performance of RDS is good.
Availability according to region
Amazon Aurora is currently available in
the US West (Oregon), US East (N.
Virginia), and EU (Ireland) AWS regions.
Available in all AWS regions
Simulation for crash testing
Simulation of node, disk, or read
replica failure for testing/HA using
queries
No support for simulating crashes for
testing purpose using queries
29. Mahesh TR
Aurora RDS vs MySQL RDS
Workload Supports highly concurrent workloads. Supports normal workloads.
Storage AutoScaling
Amazon Aurora automatically
maintains 6 copies of your data across
3 Availability Zones and will
automatically attempt to recover your
database in a healthy AZ with no data
loss.
There is no automatic growth of
storage.
Encryption
Amazon Aurora uses SSL (AES-256) to
secure data in transit. Encryption for
data at rest will be available in a future
release.
Amazon RDS encryption uses AWS Key
Management Service (KMS) to let you
create and manage the keys used to
encrypt your data.
Replica
1. Amazon Aurora Replicas share the
same underlying volume as the
primary instance. There can be
maximum of 15 Aurora replicas.
It support only read replica. There can
be maximum of 5 read replica
30. Mahesh TR
What’s OLAP?
In contrast to an OLTP database, an OLAP database is designed to process large datasets quickly to answer
questions about data. The name reflects this purpose: Online Analytic Processing.
• Common use cases for an OLAP database are:
• What’s the customer lifetime value of my e-commerce application?
• What’s the median duration of play time for my mobile game?
• What’s the conversion rate for various landing pages based on the referrer?
✓Amazon Redshift
✓HP Vertica
✓Teradata
✓IBM Netezza
✓KDB+
31. Mahesh TR
Database types Summary
• RDS – OLTP
Amazon Aurora
MariaDB
Microsoft SQL Server
MySQL
OraclePostgreSQL
• DynamoDB – NoSQL
• Redshift – OLAP
• Elasticache – In Memory Caching
Mem cached
Redis
• DMS
32. Mahesh TR
Upgrading the MySQL DB Engine
• Amazon RDS takes two DB snapshots during the upgrade process. The first DB snapshot is of the DB instance
before any upgrade changes have been made. If the upgrade doesn't work for your databases, you can
restore this snapshot to create a DB instance running the old version. The second DB snapshot is taken when
the upgrade completes.
• After the upgrade is complete, you can't revert to the previous version of the database engine. If you want
to return to the previous version, restore the first DB snapshot taken to create a new DB instance.
• You control when to upgrade your DB instance to a new version supported by Amazon RDS. This level of
control helps you maintain compatibility with specific database versions and test new versions with your
application before deploying in production. When you are ready, you can perform version upgrades at the
times that best fit your schedule.
• If your DB instance is using read replication, you must upgrade all of the Read Replicas before upgrading the
source instance.
• If your DB instance is in a Multi-AZ deployment, both the primary and standby replicas are upgraded. The
primary and standby DB instances are upgraded at the same time and you will experience an outage until
the upgrade is complete. The time for the outage varies based on the size of your DB instance.