Logo

dev-resources.site

for different kinds of informations.

Amazon Aurora DSQL: The New Era of Distributed SQL

Published at
12/30/2024
Categories
aurora
distributedsystems
sqlserver
serverless
Author
kevin_k
Author
7 person written this
kevin_k
open
Amazon Aurora DSQL: The New Era of Distributed SQL

Amazon Aurora DSQL (dee-sequel) is a groundbreaking serverless, distributed SQL database that delivers active-active high availability. Announced at AWS re:Invent 2024, it is now available in preview across US East (N. Virginia), US East (Ohio), and US West (Oregon). With its distributed architecture, Aurora DSQL enables simultaneous read and write operations across multiple regions while maintaining strong consistency. Transactions are processed locally, with cross-region concurrency checks performed only at commit, ensuring performance and reliability.

What sets Aurora DSQL apart?

  • Effortless Scalability: Seamlessly scale reads, writes, and storage independently, providing virtually unlimited horizontal scaling for workloads of any size.
  • Availability: Ensures 99.99% uptime in single-region deployments and an impressive 99.999% for multi-region clusters.
  • Performance: Up to 4x faster read and write operations compared to popular distributed SQL databases, making it a top choice for performance-critical applications.
  • Compatibility: PostgreSQL-compatible, allowing developers to use well-known relational database concepts, accelerating adoption.
  • Management: Completely serverless, Aurora DSQL eliminates the complexities of patching, upgrades, and maintenance, freeing developers to focus on innovation.
  • Event-Driven and Microservice Ready: Optimized for serverless and microservices architectures.

Core Architecture Components

Distributed Design:

Amazon Aurora DSQL is built on a robust distributed architecture, at its core, the architecture is composed of four key components:

  • Relay/Connectivity: Manages client connections, routing requests to appropriate resources while ensuring seamless communication across the system.
  • Compute/Databases: Handles query execution and processing, leveraging PostgreSQL compatibility for familiar operations.
  • Transaction Log and Concurrency Control: Provides atomicity and isolation for transactions while ensuring consistency across nodes and regions.
  • User Storage: Ensures data durability and redundancy by replicating user data across multiple Availability Zones.

These components are orchestrated through a control plane that maintains coordination and redundancy across three Availability Zones. This design enables self-healing capabilities, automatic scaling, and high availability, ensuring that infrastructure failures do not impact database operations.

Multi-Region Clusters:

Aurora DSQL takes availability and resilience to the next level with multi-region linked clusters, enabling applications to achieve high performance and reliability on a global scale.

  • Linked Clusters: Multi-region clusters operate in active-active mode, allowing read and write operations in multiple regions simultaneously. Data is synchronously replicated across regions, ensuring strong consistency and eliminating replication lag.
  • Resilience: Each linked cluster provides independent endpoints for concurrent operations. In the event of a failure in one region, the other region continues operating seamlessly, ensuring uninterrupted service.
  • Cross-Region Consistency: Transactions are processed locally in their originating region, with cross-region concurrency checks performed during the commit phase. This approach minimizes latency while maintaining strong data consistency.

Exploring Aurora DSQL Multi-Region linked clusters

Curious about Amazon’s latest innovation in distributed SQL databases, I decided to put Multi-Region clusters (one of Aurora DSQL's Core Architecture Components) to the test by creating clusters in different regions to demonstrate cross-region replication and consistent reads from both endpoints.

Creating a cluster in Aurora DSQL:

Image description

Navigate to https://console.aws.amazon.com/dsql and simply create a cluster, add linked regions and choose a region for your linked cluster region.

Connecting to the cluster using an authentication token and running SQL commands in aurora DSQL:

Image description

Choose the cluster you want to connect to, copy the end point, then use the command below to use psql to start a connection to your cluster. You should see a prompt to provide a password. generate an authentication token and use it as the password.

PGSSLMODE=require \
psql --dbname postgres \
--username admin \
--host uiabtxahshv6at5pcfidcxfnbq.dsql.us-east-1.on.aws \
--password

Writing in one region and reading from the second region:

Image description

You can perform write operations in one region and immediately read the data from another region.

Some of the queries to try:

INSERT INTO example (id, name) VALUES (1, 'Aurora DSQL Test');
Enter fullscreen mode Exit fullscreen mode
SELECT * FROM example WHERE id = 1;
Enter fullscreen mode Exit fullscreen mode

Why this stands out:

  • Both regions(us-east-1 and us-east-2)operate as active endpoints, enabling concurrent read and write operations across regions.
  • Aurora DSQL guarantees that all reads and writes return the latest committed writes no matter the region.
  • If us-east-1 experiences downtime, all operations can seamlessly continue in us-east-2 ensuring high availability.
  • Applications in different regions access the same database, reducing complexity.
  • Ease of management.

This setup is ideal for globally distributed applications such as e-commerce platforms, financial systems, or multi-region SaaS services, where uptime, consistency, and performance are critical.

Follow me for more demos and networking. Kevin Kiruri LinkedIn

distributedsystems Article's
30 articles in total
Favicon
Rethinking distributed systems: Composability, scalability
Favicon
Mastering RabbitMQ: Reliable Messaging for Modern Applications
Favicon
CDNs in Distributed Systems: Beyond Caching for Better Performance
Favicon
RabbitMQ Architecture and Its Role in Modern Systems
Favicon
Kafka vs rabbitmq
Favicon
Asynchronous transaction in distributed system
Favicon
Advanced Perspectives on Multiprocessing and Task Queueing in Distributed Architectures
Favicon
Advanced Perspectives on Multiprocessing and Task Queueing in Distributed Architectures
Favicon
Edge Computing: Low-Latency paradigm for Distributed Systems
Favicon
HTTP Caching in Distributed Systems
Favicon
Idempotent database inserts: Getting it right
Favicon
Don’t Just Draw It, Design It: Making System Diagrams Useful
Favicon
Consistent Hashing in System Design
Favicon
Eventual Consistency Patterns in Distributed Systems
Favicon
Random is a great load balancing policy
Favicon
Ensuring Atomicity in Modern Databases
Favicon
Consensus in Distributed Systems
Favicon
From Lone Architects to Team Players: How System Design Has Evolved
Favicon
Amazon Aurora DSQL: The New Era of Distributed SQL
Favicon
Building Reliable Messaging Patterns in AWS with SQS and SNS
Favicon
Build a Distributed Task Scheduler Using RabbitMQ and Redis
Favicon
Treds - Fastest Prefix Seach Server
Favicon
Downstream Resiliency: The Timeout, Retry, and Circuit-Breaker Patterns
Favicon
Database Indexing Internals Part III
Favicon
A Comprehensive Guide to Understanding Kubernetes: The Power of Container Orchestration
Favicon
Implementing the Saga Pattern With MassTransit
Favicon
Understanding Application-Oriented Distributed Operating Systems: Architecture, Benefits, and Use Cases
Favicon
Handling Sharded Data in Distributed Systems: A Deep Dive into Joins, Broadcasts, and Query Optimization
Favicon
Building scalable ML workflows
Favicon
Database Indexing Internals Explained

Featured ones: