Design High Performing Architectures · Topic 3 of 7

High Performing Database Solutions

Select an AWS database for performance and scale: RDS, Aurora, DynamoDB, ElastiCache, Redshift and purpose built engines, plus caching and read scaling.

  • 5 min
In a nutshell
  • Choose RDS for managed relational databases and Aurora when you want better performance, scale and failover.
  • DynamoDB is serverless NoSQL with single digit millisecond latency, and DAX adds microsecond reads.
  • Use read replicas or Aurora replicas to scale reads, and a cache to reduce database load.

What it is

AWS offers many database services because no single design fits every workload. The exam tests whether you can choose between relational and NoSQL, transactional and analytical, and then scale reads and writes.

Start with the access pattern. Ask whether the data is structured with joins, whether you need millisecond key lookups at huge scale, whether the work is transactional (OLTP) or analytical (OLAP), and how much the load changes.

Data needaccess patternchooseEnginerelational, key value, cache, warehousescale withReplicas and cachingread performance

How it works

Choosing the engine

NeedServiceWhy
Familiar relational engine, managedAmazon RDS (MySQL, PostgreSQL, MariaDB, Oracle, SQL Server, Db2)Automated backups, patching and Multi AZ
Relational with higher performance and scaleAmazon Aurora (MySQL and PostgreSQL compatible)Shared distributed storage, fast failover, up to 15 read replicas
Key value or document at any scale, single digit millisecond latencyAmazon DynamoDBServerless, scales automatically, global tables
In memory cachingAmazon ElastiCache (Redis OSS, Memcached, Valkey)Microsecond reads, offloads the database
Durable in memory databaseAmazon MemoryDBRedis compatible with durable storage
Data warehouse and analyticsAmazon RedshiftColumnar storage, massively parallel queries
Graph relationshipsAmazon NeptuneSocial graphs, fraud and recommendation
MongoDB compatible documentsAmazon DocumentDBDocument workloads with MongoDB APIs
Time series dataAmazon TimestreamIoT and monitoring metrics

Scaling reads and writes in relational databases

Reads scale out with read replicas. RDS supports them for most engines, and Aurora supports many replicas that share the same storage and sit behind a reader endpoint. Writes scale mostly by scaling up, or by using Aurora features, since a single writer handles writes.

Amazon RDS Proxy pools and shares database connections, which helps Lambda functions and spiky applications that would otherwise open too many connections. Aurora Serverless v2 adjusts capacity in small steps for variable workloads.

DynamoDB performance

DynamoDB distributes data by the partition key, so a key with many distinct values spreads the load, and a hot key causes throttling. Capacity can be on demand (pay per request, good for unknown or spiky traffic) or provisioned (set read and write capacity, often with auto scaling, good for steady traffic).

Global secondary indexes allow queries on other attributes. DynamoDB Accelerator (DAX) is an in memory cache for DynamoDB that cuts read latency to microseconds without changing the data model much. DynamoDB global tables give multi Region, multi active replication.

Caching

A cache keeps hot data in memory so the database does less work.

  • Lazy loading (cache aside): the app checks the cache, and on a miss reads the database and fills the cache. Only requested data is cached, but stale data is possible.
  • Write through: the app writes to the cache and database together, so data stays fresh but the cache holds data that may never be read.

Redis supports data structures, persistence, replication, and Multi AZ failover. Memcached is simpler, multi threaded and has no persistence. Choose Redis unless the question names a simple, multi threaded cache.

AppreadshitElastiCachein memoryAppreadsmissDatabaseRDS or Aurora

Analytics

Redshift fits complex queries across large datasets using columnar storage, and Redshift Spectrum can query data in S3. For ad hoc queries on files in S3 without loading anything, Amazon Athena is the serverless option, covered on the data transformation and analytics page.

Migration help

AWS Database Migration Service (DMS) moves data between databases with little downtime, and the AWS Schema Conversion Tool helps convert schemas between engines. They are common answers for moving to a managed engine.

Exam tip

"Millisecond latency at massive scale with unpredictable traffic" is DynamoDB on demand. "Read heavy relational database" is read replicas or Aurora replicas, often with ElastiCache in front.

What to remember for the exam

  • Choose RDS for managed relational databases and Aurora when you want better performance, scale and failover.
  • DynamoDB is serverless NoSQL with single digit millisecond latency, and DAX adds microsecond reads.
  • Use read replicas or Aurora replicas to scale reads, and a cache to reduce database load.
  • RDS Proxy pools connections and suits Lambda and spiky clients.
  • Redis offers richer features than Memcached, including replication and persistence.
  • Redshift is the data warehouse for analytics, while Aurora and RDS handle transactions.
  • Neptune is for graphs, DocumentDB for MongoDB compatibility, and Timestream for time series.
  • DynamoDB performance depends on a well spread partition key.

Common mistakes

Using a relational database for a huge key value workload. DynamoDB scales further with less administration for simple access patterns.

Picking Redshift for transactions. Redshift is for analytics. Row level OLTP belongs in RDS, Aurora or DynamoDB.

Choosing a hot partition key. A key such as a status flag sends traffic to one partition and causes throttling.

Expecting read replicas to improve writes. Replicas serve reads only. Write capacity grows by scaling up the writer, or by choosing a different design.

Watch out

Data in a cache can be stale. If the question demands strongly consistent, always current data, do not rely on a lazy loading cache for it.

Check yourself

  • Which service gives microsecond read latency for DynamoDB?

    DynamoDB Accelerator (DAX), an in memory cache for DynamoDB.

  • What is the best way to scale reads for an RDS or Aurora database?

    Add read replicas, and often put a cache such as ElastiCache in front.

  • Which service is built for complex analytical queries over large datasets?

    Amazon Redshift, the columnar data warehouse.

Topic 3 of 7 in Design High Performing Architectures

Test yourself on Design High Performing Architectures

The full AWS SAA-C03 question bank has 823 questions, with timed practice exams and an explanation for every answer.

This study guide is independent and is not affiliated with, endorsed by, or sponsored by AWS. Vendor names, certification names and exam codes are trademarks of their respective owners and are used for identification only.