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:
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:
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:
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');
SELECT * FROM example WHERE id = 1;
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
Top comments (0)