1.3.9 Specialized Data Stores

Specialized Data Stores Based on Access Patterns

Chọn Data Store theo Access Pattern

Access PatternServiceLý do
Key-value lookupsDynamoDBSingle-digit ms latency, auto-scaling
Relational queries (JOIN, complex)RDS / AuroraSQL, ACID transactions
Full-text searchOpenSearchInverted index, fuzzy search
In-memory cachingElastiCache (Redis/Memcached)Sub-ms latency
DynamoDB read accelerationDAXMicrosecond latency
File/object storageS3Unlimited, durable
Graph relationshipsNeptuneTraversal queries
Time-series dataTimestreamTime-based queries, auto-tiering
Ledger/immutable recordsQLDBCryptographically verifiable

Common Patterns

Amazon OpenSearch Service

Managed Elasticsearch/OpenSearch cho full-text search, log analytics, và real-time monitoring.

FeatureMô tả
EngineOpenSearch (fork of Elasticsearch)
Use casesFull-text search, log analytics, SIEM
DeploymentManaged cluster (domain)
AccessVPC hoặc Public endpoint
DashboardsOpenSearch Dashboards (built-in visualization)
Serverless✅ OpenSearch Serverless (auto-scaling)

Ingestion Patterns:

SourceMethod
CloudWatch LogsSubscription filter → OpenSearch
Kinesis Data FirehoseDirect delivery
DynamoDBStreams → Lambda → OpenSearch
ApplicationOpenSearch SDK / REST API
DynamoDB → DynamoDB Streams → Lambda → OpenSearch
                              App queries here
  • DynamoDB cho CRUD operations
  • OpenSearch cho search/analytics
  • Lambda sync data via Streams
  • OpenSearch Dashboards cho visualization

DynamoDB + S3 (Large Objects)

App → S3 (store large file, get URL)
    → DynamoDB (store metadata + S3 URL)
  • DynamoDB item max 400KB
  • Large objects (images, documents) → S3
  • DynamoDB chỉ lưu metadata + S3 key/URL

RDS + ElastiCache (Read-heavy)

App → ElastiCache (cache hit) → return
    → RDS (cache miss) → ElastiCache (populate) → return
  • Giảm load lên RDS cho read-heavy workloads
  • Lazy Loading strategy

Aurora vs RDS

FeatureAuroraRDS
StorageAuto-scaling (10GB → 128TB)Manual provisioning
ReplicasUp to 15 (ms replication)Up to 5 (async)
FailoverFaster (~30s)Slower (~60-120s)
Serverless✅ Aurora Serverless v2
Cost~20% more than RDSStandard

Exam Tip: Key-value = DynamoDB. SQL/JOIN = RDS/Aurora. Search = OpenSearch. DynamoDB Streams → Lambda → OpenSearch là pattern phổ biến. Item > 400KB → lưu S3, metadata ở DynamoDB.