The database CPU is high due to read traffic. How do you scale reads?
IntermediateScenarioS3, RDS and DynamoDB
Answer
Situation read → Offload reads to replicas and cache.
What I'd do →
- Create read replicas:
aws rds create-db-instance-read-replica --db-instance-identifier mydb-r1 --source-db-instance-identifier mydb - Route read queries with a reader endpoint (Aurora) or app-level routing
- Add ElastiCache for hot keys
- Check slow queries with Performance Insights
- Watch
ReplicaLag
Why → Replicas are asynchronous, so reads can be stale; choose consistency needs deliberately.
Interview tip → Fix bad queries before adding hardware.
More on S3, RDS and DynamoDB
You need to host a static website with HTTPS and low latency worldwide. Which services do you use?BeginnerUploaded files in your bucket must be deleted after 90 days and old versions after 30. How do you do that?BeginnerSomeone deleted objects from a versioned bucket. How do you recover and prevent repeats?IntermediateMillions of small objects are being uploaded and S3 returns 503 Slow Down. What do you do?IntermediateLarge 50 GB files upload slowly from remote offices to S3. How do you speed it up?IntermediateDesign a cross-region DR strategy for a critical S3 bucket with a 15-minute RPO.Advanced