Databases on AWS
Purpose-built databases,
the right tool for the right job
Vincent Oh
29 Apr 2022
Table of contents
Modern application requirements
Moving to fully managed database services
Why consider purpose-built databases?
AWS Databases: The right tool for the right job
© 2022, Amazon Web Services, Inc. or its Affiliates.
Explosion of data Micro-services changes data and Rapid rate of change
analytics requirements
Dev Ops
Data grows 10x every 5 Purpose-built databases provide Transition from IT to
years optimized performance and cost DevOps increases rate
savings of change
© 2022, Amazon Web Services, Inc. or its Affiliates.
What’s a modern application?
© 2022, Amazon Web Services, Inc. or its Affiliates.
App architectures & patterns have evolved
© 2022, Amazon Web Services, Inc. or its Affiliates.
Modern application requirements
Requires more performance, scale, and availability
Users 1M+
Data volume Terabytes—petabytes
Locality Global
Performance Microsecond latency
Request rate Millions per second
Access Mobile, IoT, devices
Scale Virtually unlimited
Economics Pay as you go
E-commerce Media
streaming
Social
media
Online Shared economy
gaming
Developer access Instance API access
Development Apps and storage are
decoupled
© 2022, Amazon Web Services, Inc. or its Affiliates.
Instead of a monolithic application
build microservices with purpose-built tools
© 2022, Amazon Web Services, Inc. or its Affiliates.
Developers are doing what they do best
Break complex apps into smaller pieces and pick the
best tool to solve each problem
This ensures that the apps are well architected and
scale effectively
Developers are now building highly distributed apps
using a multitude of purpose-built databases
© 2022, Amazon Web Services, Inc. or its Affiliates.
Internet-scale e-commerce
The world’s largest e-commerce business,
Amazon.com, migrated entirely to
because of:
• Cost savings
• Performance improvements
• Administrative overhead reductions
© 2022, Amazon Web Services, Inc. or its Affiliates.
Moving to fully managed database services
© 2022, Amazon Web Services, Inc. or its Affiliates.
Old-guard commercial databases + tricks
Very Proprietary Lock-in Punitive You’ve
expensive licensing got mail
© 2022, Amazon Web Services, Inc. or its Affiliates.
Self managing databases and analytics services is
complex, time consuming, and expensive
Hardware & software installation, configuration, patching, backups
Performance and high availability issues
Capacity planning and scaling clusters for compute and storage
Security and compliance
© 2022, Amazon Web Services, Inc. or its Affiliates.
Automate undifferentiated heavy lifting
Self Managed Fully Managed
Schema design
Schema design
You Query construction
Query construction
Query optimization
Schema design
Automatic fail-over
Automatic fail-over
Backup & recovery
Backup & recovery
Isolation & security
You Isolation & security
Industry compliance
Industry compliance
Push-button scaling
Push-button scaling
Automated patching
Automated patching
Advanced monitoring
Advanced monitoring
Routine maintenance
Routine maintenance
Built-in best practices
Built-in best practices
© 2022, Amazon Web Services, Inc. or its Affiliates.
Migrate on-premises or self-managed databases to fully managed services
Amazon Amazon Amazon Amazon Amazon
Aurora RDS DocumentDB ElastiCache Keyspaces
Relational Non-relational
databases databases
© 2022, Amazon Web Services, Inc. or its Affiliates.
Why consider purpose-built databases?
© 2022, Amazon Web Services, Inc. or its Affiliates.
AWS purpose-built databases: the right
tool for the right job
© 2022, Amazon Web Services, Inc. or its Affiliates.
Purpose-built databases
© 2022, Amazon Web Services, Inc. or its Affiliates.
Amazon Aurora
© 2022 , Amazon Web Services, Inc. or its Affiliates.
Amazon Aurora
MySQL and PostgreSQL-compatible relational database built for the cloud
MySQL and PostgreSQL compatible relational database built for the cloud
Performance and availability of commercial-grade databases at 1/10th the cost
5x throughput of standard Fault-tolerant, self-healing Network isolation, Managed by RDS: no
MySQL and 3x of standard storage; six copies of encryption at server provisioning,
PostgreSQL; scale-out up data across three rest and in transit software patching, setup,
to 15 read replicas Availability Zones; configuration, or backups
continuous backup
to Amazon S3
© 2022, Amazon Web Services, Inc. or its Affiliates.
Scale-out, distributed, multi-tenant architecture
Primary Replica Replica
• Purpose-built log-structured
distributed storage system SQL
SQL SQL
designed for databases
Transactions Transactions Transactions
Caching Caching Caching
• Storage volume is striped across
hundreds of storage nodes
distributed over 3 different
Availability Zones Shared storage volume
• Six copies of data, two copies in
each Availability Zone to protect
against AZ+1 failures
Storage nodes with SSDs
• Primary and replicas all point to
the same storage Availability Availability Availability
Zone 1 Zone 2 Zone 3
© 2022, Amazon Web Services, Inc. or its Affiliates.
Everything you get from Amazon RDS…
App optimization App optimization App optimization
Scaling Scaling Scaling
High availability High availability High availability
Database backups Database backups Database backups
DB software patches DB software patches DB software patches
Managed DB software installs DB software installs DB software installs Managed
by you OS patches OS patches OS patches by AWS
OS installation OS installation OS installation
Server maintenance Server maintenance Server maintenance
Rack and stack Rack and stack Rack and stack
Power, HVAC, net Power, HVAC, net Power, HVAC, net
Database on-premises Database on EC2 Amazon RDS
© 2022, Amazon Web Services, Inc. or its Affiliates.
…and more
up to 128 TB
Up to 128TB of storage – auto-incremented in 10GB units
§ Automatic storage scaling up to 128 TB—no performance impact
§ Continuous, incremental backups to Amazon S3
§ Instantly create user snapshots—no performance impact
§ Automatic restriping, mirror repair, hot spot management, encryption
© 2022, Amazon Web Services, Inc. or its Affiliates.
Database backtrack
Invisible
t4
Invisible
t2 t3
Rewind to t3
t0 t1
Rewind to t1
t0 t1 t2 t3 t4
Backtrack brings the database to a point in time without requiring restore from backups
• Backtracking from an unintentional DML or DDL operation
• Backtrack is not destructive. You can backtrack multiple times to find the right point in time
© 2022, Amazon Web Services, Inc. or its Affiliates.
Zero downtime patching
Storage Service
Net App
Old DB
Before ZDP
state state
Engine
Net App
state state New DB
User sessions terminate Engine
during patching
Storage Service
With ZDP
Old DB
Engine
Application
Networking
state
state
New DB
User sessions remain Engine
active through patching
© 2022, Amazon Web Services, Inc. or its Affiliates.
Fast database cloning
BENCHMARKS
Clone database without copying data
DEV/TEST
§ Creation of a clone is nearly APPLICATIONS CLONE
instantaneous
§ Data copy happens only on write –
when original and cloned volume data
differ
CLONE CLONE
Example use cases PRODUCTION
APPLICATIONS
PRODUCTION
APPLICATIONS
§ Clone a production DB to run tests
§ Reorganize a database
§ Save a point in time snapshot for
PRODUCTION DATABASE
analysis without impacting production
system.
© 2022, Amazon Web Services, Inc. or its Affiliates.
Global database
Faster disaster recovery and enhanced data locality
Promote read-replica to primary
for faster recovery in the event
of disaster
Bring data close to your
customer’s applications in
different regions
Promote to primary for easy
migration
© 2022, Amazon Web Services, Inc. or its Affiliates.
Global database – physical replication
Region 1: Primary Aurora Cluster Region 2: Read Replica
AZ 1 AZ 2 AZ 3 AZ 1
Aurora
Primary Aurora Aurora
Replication Server
Replication Agent
Replica
Instance Replica Replica
(optional)
Async.
Consistently fast, low-lag, high-performance replication for global relational databases
• Global-scale replication in seconds or less
• Dedicated replication infrastructure ensures unconstrained performance
• Local reads, faster recovery, tighter DR objectives, and seamless cross-region migration
TYPE OF WRITE
© 2022, Amazon Web Services,
REDOInc. or its Affiliates.
LOG FRM FILES
Aurora Serverless
On-demand, auto-scaling database for applications with variable workloads
Application
Starts up on demand, shuts down when not in use
Database Endpoint
Automatically scales with no instances to manage
Scalable Database Capacity
(Compute + Memory) Warm Capacity
Pool
Pay per second for the database capacity you use
Shared Distributed Storage
© 2022, Amazon Web Services, Inc. or its Affiliates.
Amazon DynamoDB
© 2022 , Amazon Web Services, Inc. or its Affiliates.
DynamoDB
Fast and flexible key-value database service for any scale
© 2022, Amazon Web Services, Inc. or its Affiliates.
Highly available and durable
Designed to support
Built for high durability 99.99%
of availability
WRITES READS
3-way replication Strongly or eventually consistent
Persisted to disk No latency trade-off
(Custom SSD) Data is always replicated to
three Availability Zones
© 2022, Amazon Web Services, Inc. or its Affiliates.
Highly available and durable
3-way replication
OrderId: 1
CustomerId: 1 Data is always replicated to
ASIN: [B00X4WHP5E] three Availability Zones
Hash(1) = 7B
Availability Zone A Availability Zone B Availability Zone C
Partition A Partition B Partition C Partition A Partition B Partition C Partition
PartitionAA Partition B Partition C
Host 1 Host 2 Host 3 Host 4 Host 5 Host 6 Host 7 Host 8 Host 9
CustomerOrdersTable
© 2022, Amazon Web Services, Inc. or its Affiliates.
Global Tables
The first fully-managed, multi-master, multi-region datab
Globally dispersed users
Build high performance, globally distributed applications
Low latency reads & writes to locally available tables
Disaster proof with multi-region redundancy
Easy to setup and no application re-writes required
Global Table
© 2022, Amazon Web Services, Inc. or its Affiliates.
DynamoDB Accelerator (DAX)
High performance
Your applications Fully managed, highly
available cache for DynamoDB
Even faster—
DAX microsecond latency
Scales to millions of
requests per second
DynamoDB API compatible
© 2022, Amazon Web Services, Inc. or its Affiliates.
NoSQL vs. SQL for a new app: how to choose?
Want simplest possible DB Need joins, transactions, frequent
management? table scans?
Want app to manage DB integrity?
Want DB engine to manage DB
integrity?
Team has SQL skills?
Amazon Amazon
DynamoDB RDS
© 2022, Amazon Web Services, Inc. or its Affiliates.
Amazon DocumentDB
© 2022 , Amazon Web Services, Inc. or its Affiliates.
Amazon DocumentDB
Fast, scalable, highly available MongoDB-compatible database service
© 2022, Amazon Web Services, Inc. or its Affiliates.
Internet-scale apps need low latency and high
concurrency
Users 1M+
Data volume TB-PB-EB
Locality Global
Performance Milliseconds
to microseconds
Request Rate Millions
Access Mobile, IoT,
Devices
Gaming Financial Social Ride
leaderboards trading media hailing Scale Up-Out-In
Economics Pay as you go
Dating Media Session Developer access Instant API access
streaming stores
© 2022, Amazon Web Services, Inc. or its Affiliates.
Developers use various approaches to reduce
latency
In-memory databases Specialized hardware Data reduction
and data grids such approaches
as multi-core processors, such as sampling,
GPUs, accelerators aggregation
© 2022, Amazon Web Services, Inc. or its Affiliates.
Amazon ElastiCache
© 2022 , Amazon Web Services, Inc. or its Affiliates.
Amazon ElastiCache
Managed Redis or Memcached-compatible in-memory caching service
µs is the new ms
© 2022, Amazon Web Services, Inc. or its Affiliates.
Amazon MemoryDB
© 2022 , Amazon Web Services, Inc. or its Affiliates.
Amazon MemoryDB for Redis
Redis-compatible, durable, in-memory database service
© 2022, Amazon Web Services, Inc. or its Affiliates.
©
2022 , Amazon Web Services, Inc. or its Affiliates.
Amazon Neptune
© 2022, Amazon Web Services, Inc. or its Affiliates.
Highly Connected Data
• Social networking
• Recommendations
• Knowledge graphs
• Fraud detection
• Life sciences
• Network and IT operations
© 2022, Amazon Web Services, Inc. or its Affiliates.
Amazon Neptune
Fast, reliable graph database built for the cloud
Open Fast Reliable Easy
Supports Apache TinkerPop Query billions of Six replicas of data across Build powerful queries
and W3C RDF graph models relationships with three Availability Zones easily with Gremlin and
millisecond latency with full backup and restore SPARQL
© 2022, Amazon Web Services, Inc. or its Affiliates.
©
2022 , Amazon Web Services, Inc. or its Affiliates.
Amazon Timestream
© 2022, Amazon Web Services, Inc. or its Affiliates.
Building with time-series data is challenging
Relational databases Existing time-series databases
Unnatural for Inefficient Rigid schema Difficult to scale Difficult to Limited data
time-series data time-series data inflexible for fast maintain high lifecycle
processing moving time-series availability management
data
© 2022, Amazon Web Services, Inc. or its Affiliates.
Amazon Timestream
Fast, scalable, fully managed time-series database
1,000x faster and 1/10th the
Trillions of Time-series analytics
cost of relational databases
daily events Serverless
Collect data at the rate of Adaptive query processing Built-in functions for Automated setup, configuration,
millions of inserts per engine maintains steady, interpolation, smoothing, server provisioning, software
second (10M/second) predictable performance and approximation patching
© 2022, Amazon Web Services, Inc. or its Affiliates.
©
2022 , Amazon Web Services, Inc. or its Affiliates.
Amazon QLDB
© 2022, Amazon Web Services, Inc. or its Affiliates.
Amazon Quantum Ledger Database
Fully managed ledger database
Track and verify the history of all changes made to your application’s data
Immutable and Cryptographically
Highly scalable Easy to use
transparent verifiable
Append-only, immutable All changes are Executes 2–3X as many Flexible document model,
journal tracks history of all cryptographically transactions as ledgers in query with familiar
changes that cannot be chained and verifiable common blockchain SQL-like interface
deleted or modified; get frameworks
full visibility into entire
data lineage
© 2022, Amazon Web Services, Inc. or its Affiliates.
Common customer use cases
Banking & Finance E-Commerce Transport & Logistics
Keeping track of transactions, Where’s my stuff? Tracking transportation
trades and accounts of goods
HR & Payroll Manufacturing Government
Tracking changes to an Recording components used Tracking vehicle
individual’s profile in manufacturing title history
© 2022, Amazon Web Services, Inc. or its Affiliates.
©
2022 , Amazon Web Services, Inc. or its Affiliates.
Amazon Keyspaces
© 2022, Amazon Web Services, Inc. or its Affiliates.
© 2022, Amazon Web Services, Inc. or its Affiliates.
• Specialized expertise required
• Complexity of scaling down clusters
• Difficult version upgrades
• Restoring data
• No built-in encryption support
• Patching, updating, and maintaining
© 2022, Amazon Web Services, Inc. or its Affiliates.
Amazon Keyspaces (for Apache Cassandra)
Scalable, highly available, and managed Apache Cassandra–compatible database service
Single-digit-
millisecond
Apache Cassandra– No servers to performance at scale Highly available and
compatible manage secure
Use the same Cassandra No need to provision, Scale tables up and down 99.99% availability SLA
drivers and tools configure, and operate automatically within an AWS Region
large Cassandra clusters
Virtually unlimited throughput Data encrypted at rest;
and storage integrated with IAM
© 2022, Amazon Web Services, Inc. or its Affiliates.
AWS database services
Purpose-built databases, the right tool for the right job
Aurora RDS DynamoDB ElastiCache Neptune
Key value In-memory Graph
DocumentDB Timestream QLDB
Document Time series Ledger
Keyspaces
Wide column
AWS Database Migration Service
© 2022, Amazon Web Services, Inc. or its Affiliates.
AWS offers flexible ways to help you migrate
Self Managed AWS Professional Database Freedom
Services & Partners Program
DMS | SCT
© 2022, Amazon Web Services, Inc. or its Affiliates.
Thank you
© 2022, Amazon Web Services, Inc. or its Affiliates.