TECH_COMPARISON
PostgreSQL vs Aurora: A Detailed Comparison for System Design
PostgreSQL vs Amazon Aurora: compare open-source flexibility against AWS-managed performance, scaling, and high availability for cloud databases.
PostgreSQL vs Aurora
Amazon Aurora is AWS's re-engineered PostgreSQL (and MySQL) with a cloud-native distributed storage layer. It promises better performance and availability while maintaining PostgreSQL compatibility.
Architecture Differences
Standard PostgreSQL writes WAL (Write-Ahead Log) to local disk and streams it to replicas. Each replica replays the WAL to maintain a copy. This means write I/O happens at the primary, and replication lag depends on network and replay speed.
Aurora decouples compute from storage. The storage layer spans six copies across three AZs, and only WAL records are written over the network (no data pages). Replicas share the same distributed storage volume, so they read directly from the shared storage with typically sub-10ms lag.
Performance Characteristics
Aurora claims up to 3x PostgreSQL throughput by reducing write amplification. Instead of writing full data pages, Aurora writes only WAL records to its distributed storage layer. The storage nodes apply these records asynchronously.
For read-heavy system designs, Aurora's 15 read replicas sharing the same storage provide near-instant replica scaling. Standard PostgreSQL replicas each maintain their own copy of the data.
Trade-offs
Aurora's main drawback is vendor lock-in and cost. You are tied to AWS, and Aurora pricing is 20-50% higher than standard RDS PostgreSQL. For startups watching costs, self-managed PostgreSQL or cheaper managed options may be preferable.
Aurora's PostgreSQL compatibility is not 100%. Some extensions, system catalog changes, and low-level features may not work. For most applications this does not matter, but edge cases exist.
Aurora Serverless v2
Aurora Serverless v2 automatically scales compute capacity in fine-grained increments based on workload. This eliminates capacity planning for variable workloads and is ideal for development environments and bursty production workloads.
Real-World Usage
Aurora powers Samsung, Dow Jones, and the Pokémon Company. Standard PostgreSQL runs everywhere from startups to Apple and Instagram. The choice often comes down to AWS commitment versus flexibility.
Learn about database replication and cloud architecture patterns. See our system design guide and pricing.
GO DEEPER
Master this topic in our 12-week cohort
Our Advanced System Design cohort covers this and 11 other deep-dive topics with live sessions, assignments, and expert feedback.