概念
Cost-effective database types
Match the data shape and access pattern to the engine that costs least, and move cold data out of the database.
このレッスンはまだ翻訳されていないため、英語で表示しています。
Key-value lookups
- Engine
DynamoDB
- Why cheaper
- Pay per request, no servers
Joins and transactions
- Engine
RDS
- Why cheaper
- Fits SQL apps
Large analytics
- Engine
Redshift
- Why cheaper
- Columns compress, scan less
Time series
- Engine
- Time series database
- Why cheaper
- Storage tiered by age
Repeated reads
- Engine
ElastiCache
- Why cheaper
- Fewer database reads
| Data shape | Engine | Why cheaper |
|---|---|---|
| Key-value lookups | Pay per request, no servers | |
| Joins and transactions | Fits SQL apps | |
| Large analytics | Columns compress, scan less | |
| Time series | Time series database | Storage tiered by age |
| Repeated reads | Fewer database reads |
1 / 2
2 / 2
Time series
- Engine
- Time series database
- Why cheaper
- Storage tiered by age
Repeated reads
- Engine
ElastiCache
- Why cheaper
- Fewer database reads
| Data shape | Engine | Why cheaper |
|---|---|---|
| Time series | Time series database | Storage tiered by age |
| Repeated reads | Fewer database reads |
概要
A database is cheapest when its type fits the work. Key-value lookups at scale: Amazon DynamoDB. Joins and transactions: Amazon RDS or Aurora. Analytics over huge tables: Amazon Redshift, which stores data in columns, so a query reads only the columns it needs and the data compresses well. Time series data, such as metrics and sensor readings, is cheaper in a purpose-built time series database than in a general table. Choose DynamoDB when access is by key and traffic varies. Choose RDS when queries are varied and joined.
概要
Ask the database to do less. A cache such as Amazon ElastiCache answers repeated reads for less than extra replicas cost. Read replicas move reporting off the primary. RDS Proxy pools connections, so a smaller instance can serve many short connections from Lambda or from scaled-out apps.
Move cold data out. Old rows in an RDS or DynamoDB table cost more than the same data in S3. Export or stream them to S3 in Parquet format, and query them with Amazon Athena, which charges per query. Then remove them from the hot table with TTL in DynamoDB or a delete job in RDS.
覚えること
- Key-value with varying traffic: DynamoDB. Joins and transactions: RDS or Aurora.
- Large analytics: Redshift, which stores columns and compresses them.
- Time series data: a purpose-built time series database.
- Cache repeated reads before adding replicas.
- Archive old data to S3 in Parquet and query it with Athena.
覚えること
- RDS Proxy pools connections, so a smaller instance can do.
試験では
- “Analytical queries over billions of rows that scan a few columns” points to Redshift, a columnar store.
- “Sensor readings ordered by time, lowest cost” points to a time series database.
- “Keep five years of old orders, rarely queried, lowest cost” points to exporting to S3 and querying with Athena.
- “Lookups by key, unpredictable traffic, no server management” points to DynamoDB on-demand.
混同しやすいもの
- Choosing a database by access patternPick the database from how the data is used: its shape, the read and write mix, the scale and the latency.
Amazon RedshiftA columnar data warehouse for repeated, complex SQL and BI. Choose nodes, Serverless, Spectrum and keys.
Amazon ElastiCacheIn-memory cache. Choose Valkey or Redis OSS for rich features, Memcached for a simple multithreaded cache.
このタスクの内容 · 4.3
- DynamoDB cost design
- RDS and Aurora cost design
- Reserved capacity for databases
- Backup and retention policies
- Cost-effective database types
Organizations
Backup
- Caching strategies
- Choosing a database by access pattern
RDS
- Read replicas
RDS Proxy
Aurora
Aurora Serverless
DynamoDB
ElastiCache
DMS
- SCT
Redshift
- Cost allocation tags
Cost Explorer
Budgets
Cost and Usage Reports
- Multi-account billing