SynfraCore
Synfracore
Start Learning
Navigation

Academies

Platform

RoadmapsLabsCertificationsInterviewPYQsAI AssistantCareer
Start Learning Free🗺️ Learning Roadmaps

Cloud DatabasesCheatsheets

Quick reference — commands, syntax, and patterns

✍️
Written by senior engineers. Reviewed for technical accuracy.· Updated 2025 · SynfraCore Cloud Databases Team
Expert Content

Cloud Databases — Quick Reference

Provider landscape

ProviderRelationalNoSQLKnown for

|---|---|---|---|

AWSRDS, AuroraDynamoDBBroadest ecosystem, Aurora storage-compute separation
AzureAzure SQL, Azure DB for PostgreSQLCosmos DBCosmos DB multi-model, multi-region writes
GCPCloud SQL, AlloyDBFirestore, BigtableSpanner — globally-consistent relational scale
Vendor-neutralSelf-managed Postgres/MySQLMongoDB Atlas, Redis CloudPortability across clouds

Multi-AZ vs. Read Replica

Multi-AZRead Replica

|---|---|---|

PurposeHigh availability / failoverRead scaling
ReplicationSynchronousUsually asynchronous
Queryable directly?NoYes
FailoverAutomaticManual promotion

Relational vs. NoSQL — decision shortcut

Need ACID + joins + well-understood schema     → managed relational
Need massive horizontal scale + ms latency     → managed NoSQL
Need global multi-region WRITES specifically   → Spanner / Cosmos DB
  (not just multi-region reads — a genuinely distinct, higher-cost category)

DynamoDB partition key design

Low cardinality (e.g. a status field, 3 values) → hot partition risk
High cardinality (e.g. user_id)                  → even distribution

Time-series pattern to avoid hot partitions:
  partition_key = f"{device_id}#{date.today().isoformat()}"

AWS RDS — quick commands

bash
# Provision with Multi-AZ and automated backups
aws rds create-db-instance --db-instance-identifier myapp-prod \
  --engine postgres --multi-az --backup-retention-period 7

# Check replication lag on a read replica
aws cloudwatch get-metric-statistics --namespace AWS/RDS \
  --metric-name ReplicaLag --dimensions Name=DBInstanceIdentifier,Value=myapp-replica

# Manually promote a read replica (for DR failover)
aws rds promote-read-replica --db-instance-identifier myapp-replica

Cost model — pricing dimensions

Compute       — instance size / capacity units
Storage       — per GB-month
I/O/requests  — per request (NoSQL) or per I/O operation
Data transfer — cross-AZ/region egress

DynamoDB specifically:
  On-demand   — pay per request, no capacity planning, no throttling risk
  Provisioned — cheaper at steady predictable load, throttles if under-sized

DR design — RTO/RPO reference

ArchitectureTypical RTOTypical RPORelative cost

|---|---|---|---|

Cross-region read replica + manual promotionMinutes–tens of minutesSeconds–minutesLower
Multi-region write (Cosmos DB / Spanner)Near-zeroNear-zeroSignificantly higher

Migration checklist

[ ] Schema/compatibility assessment run BEFORE committing to a timeline
    (AWS SCT or equivalent — proprietary features are the real risk,
    not the bulk data transfer)
[ ] Migration tool validation/comparison report run before cutover
[ ] Cutover strategy chosen deliberately: big-bang (simpler, has a
    downtime window) vs. dual-write (no downtime, more complex)
[ ] Rollback plan defined before cutover, not improvised during it
Share:
Join our Community
Daily tips, job alerts, interview help — join engineers learning together
Also Worth Exploring
← Back to all Cloud Databases modules
CertificationNotes