PERF03-BP02 Evaluate available configuration options for data store
A data store's default configuration rarely matches a specific workload. Every store exposes options that trade cost, capacity, consistency, and speed against one another. Evaluate and test the configuration before you rely on it.
Desired outcome:
-
You have evaluated the configuration options of each data store against your workload's access patterns.
-
You run a configuration tuned to your requirements rather than the default settings.
-
You have tested scaling, backup, and restore behavior before relying on a configuration in production.
-
You refine configuration continuously from real usage metrics.
Common anti-patterns:
-
Teams use one storage type for every workload regardless of its access pattern.
-
Teams provision maximum IOPS everywhere without testing against lower-cost tiers.
-
Teams remain unaware of the configuration options their chosen store exposes.
-
Teams scale only by increasing instance size and ignore other options.
-
Teams never test how the store behaves as load grows.
-
Teams overlook backup and restore time, and the time to reach full performance after a restore.
Benefits of establishing this best practice:
-
Performance improves because configuration matches the workload's read, write, and consistency needs.
-
Infrastructure costs fall when you size to real demand instead of worst-case defaults.
-
Recovery stays predictable because you have measured backup and restore behavior.
-
Maintenance effort drops as auto-tuning and managed features take over routine work.
Level of risk exposed if this best practice is not established: Medium
Implementation guidance
Effective tuning depends on your workload's read-to-write ratio, consistency tolerance, and how demand changes over time.
Reads and writes scale by different mechanisms, and conflating them leads to over-provisioning. You can offload reads with read replicas, a cache, or geo-distributed copies. Replicas introduce replication lag, so route reads that require read-after-write consistency to the primary. For writes, you can increase instance size, raise provisioned throughput, or batch requests. You can also place a queue in front of the store to decouple ingestion from persistence. A queue smooths spikes but adds latency and another component to operate. For key-value stores, write throughput often collapses on a hot partition, where one partition key receives a disproportionate share of traffic. A more evenly distributed key, write-sharding, or adaptive capacity addresses this, but only if you design for it before the traffic arrives.
Lifecycle and tiering options change the cost and performance of data as it ages. Frequently accessed data belongs in fast, higher-cost storage, while cold data can move to lower-cost tiers automatically. When access patterns are unknown or shifting, automatic tiering handles the placement decisions, though it adds monitoring cost and, for retrieval from cold tiers, latency. Connection handling is a separate failure mode. Relational databases have finite connection slots, and a workload that opens connections without pooling can exhaust them under load, which looks like a performance problem but is a configuration problem. Serverless stores remove connection limits but shift the tuning to capacity modes and scaling policies.
Measure recovery behavior: backup time, restore time, and the time a store needs to reach full performance after a restore. A store that restores quickly but serves cold, slow reads for an hour afterward might not meet your recovery objective. Test candidate configurations in a non-production environment against representative load, then promote the configuration that meets your targets.
Amazon CloudWatch
Implementation steps
-
Baseline the current configuration: Record the current settings of each data store, including instance type, storage size and type, engine version, capacity mode, and consistency settings. This baseline is the reference point for every change you test.
-
Evaluate read-offloading options: For read-heavy workloads, assess read replicas, an in-memory cache, or geo-distributed copies such as Amazon Aurora global databases or Amazon DynamoDB global tables
. Confirm that your consistency requirements tolerate replication lag before you route reads away from the primary. -
Evaluate write-scaling options: For write-heavy workloads, weigh instance sizing, provisioned throughput, request batching, and queue-based decoupling. For key-value stores, design the partition key to avoid hot partitions and enable adaptive capacity where available.
-
Apply lifecycle and tiering policies: Configure automatic data tiering to match cost and performance to how data ages, using Amazon S3 Lifecycle, Amazon S3 Intelligent-Tiering, Amazon EFS lifecycle management, Amazon ElastiCache data tiering, or Amazon MSK tiered storage.
-
Manage connections and pooling: For connection-limited databases, add connection pooling with a service such as Amazon RDS Proxy. For serverless stores, tune capacity and scaling policies instead of connection counts.
-
Benchmark in a non-production environment and plan migration: Load representative data and run candidate configurations against realistic load. Measure performance, scaling, and backup and restore time, including time to full performance after a restore, then plan the migration and validate metrics against your targets.
-
Monitor and auto-tune continuously: Use Amazon CloudWatch
, Amazon S3 Storage Lens , and Amazon RDS Database Insights to refine configuration against real usage, and enable auto-tuning features where they fit the workload.
Resources
Related best practices:
Related documents:
Related examples:
Related workshops:
Related services: