blog-banner

Aurora DSQL is in preview – A first comparison with CockroachDB

Last edited on December 27, 2024

0 minute read

    At AWS re:Invent 2024, AWS announced the latest edition to their database offerings: Aurora DSQL, which is now in Preview.

    The fact that AWS, a company with $100+ billion in ARR, is investing in distributed SQL, is further confirmation of what our founders and team have bet on for nearly a decade: distributed SQL solves a lot of business-critical problems, and it’s a solution that is here to stay. In short – competition is validation. While we’re thrilled that DSQL undoubtedly will drive more interest and choice in the area of distributed SQL databases, it is important to highlight some of the notable differences between DSQL and CockroachDB. 

    What is Aurora DSQL? Copy Icon

    In one of the presentations at re:Invent, Marc Brooker, VP and Distinguished Engineer at AWS, described Aurora DSQL as fundamentally “a relational SQL database optimized for transactional workloads.” He went on to highlight core features and challenges the team focused on when building out this distributed SQL offering:

    • Ability to scale up and down

    • Serverless

    • Active-active, multi-region

    • PostgreSQL compatible

    Brooker emphasized that these problem spaces were derived from the customer experience – Amazon, and its suite of subsidiary companies and services, are after all, incredibly customer-focused.

    aurora-dsql-cluster

    Why Cockroach Labs chose distributed SQL almost 10 years agoCopy Icon

    Cockroach Labs became the first commercially available, distributed SQL database, that could support ACID transactions.

    Before distributed SQL, there were SQL offerings and NoSQL offerings. SQL databases, with their structured query language were, and are still known for ensuring reliable transactions and data integrity. However, SQL databases faced challenges at scale leading to the evolution of NoSQL databases. NoSQL databases provided more flexibility, handling unstructured or semi-structured data, horizontal scalability, and survivability. Distributed SQL marries the benefits of traditional SQL databases – a structured query language, ACID consistency, scale-up performance – with the scalability and performance of NoSQL databases. When combined with simplicity of cloud, CockroachDB enables state of the art resilience and effortless scale, while adding data locality to support emerging compliance regimes for the world’s most important businesses.

    Since our founding almost a decade ago, the Cockroach Labs’ team has been dedicated to relentlessly solving customer challenges as they modernize their data infrastructure. These challenges provide a way to better understand how we differ with DSQL. 

    Scaling effortlessly with strong consistency Copy Icon

    Scaling databases to accommodate large and ephemeral data is costly and challenging. We know in traditional database environments, complex manual sharding is typically performed. And if strict ACID requirements are required in a highly distributed environment, consistency and isolation guarantees can be very difficult if you add many more nodes to handle the increased demand.

    With CockroachDB, we can achieve high scalability and avoid manual sharding by automatically distributing data across many nodes with each node handling both reads and writes while maintaining strong consistency with full ACID semantics in the database layer which means all nodes in the cluster have the same data at any time resulting in “no stale reads”. This means keeping indexes up to date automatically and enforcing foreign key constraints without adding additional application logic, even in highly scalable environments. And by default CockroachDB executes all transactions as SERIALIZABLE, which permits zero concurrency anomalies and ensures the safety of your data and the consistency that you expect from a relational database. At Cockroach Labs we’ve taken many steps over the years to bridge the gap between an opportunistic concurrency control system and a more pessimistic system to prevent conflicts between concurrent database transactions. To reduce “time to commit” latency issues associated with globally distributed transactions, we make use of Parallel Commit, an optimized atomic commit protocol that cuts the commit latency of transactions in half by changing the condition under which we consider a transaction committed and avoiding entire classes of transaction restarts which exists in workloads with frequent concurrent writes. For PostgreSQL applications that use the default isolation setting, CockroachDB also includes support for READ COMMITTED transactions. 

    Check out the video below to learn more from Technical Evangelist, Rob Reid:

    What does all this mean? It means you can use CockroachDB when scaling all your SQL applications across their lifecycle, whether they are mission critical, for example deploying a secure and reliable database for a banking payment processing system, or when running dev/test applications for a broader set of operational data. CockroachDB can be used for new cloud native applications or existing SQL applications that rely on PostgreSQL compatibility including isolation level.

    In contrast, while Aurora DSQL scales by automatically distributing data using their scale out architecture, their use of Optimistic Concurrency Control (OCC) and snapshot isolation level might result in performance issues for certain workloads that contain hotspots and concurrent writes. This requires additional schema planning and design to ensure isolation and mitigation of snapshot related rollbacks. In addition, applications would need to be reworked to add application retries. OCC aborts will occur when two or more concurrent transactions attempt to write the same keys, so for mission critical workloads where strong consistency and isolation is required, these issues may lead to adverse impact to overall database performance and latency.

    Global expansion across locations Copy Icon

    Running databases across multiple locations or regions to support global applications can be difficult. Issues include increased network latency for geographically dispersed users, using complex replication tools to minimize RTO and using many read replicas in different regions. 

    CockroachDB can span multiple regions by using our active-active replication to ensure data is available even if an entire region goes offline. Data is stored on multiple nodes in each region, providing redundancy and fault tolerance. But what about enabling data locality when supporting global applications to reduce latency or to enable compliance? CockroachDB enables declarative and granular data placement and survival goals when using database table locality settings to optimize access to data whether you are running within a single region or across multiple regions. By allowing users to specify where their data is stored geographically within specific regions to comply with data residency regulations in many countries, organizations can adhere to data sovereignty laws. 

    By contrast, currently Aurora DSQL does not provide granular data placement capabilities. 


    RELATED: Watch our webinar on-demand, “CockroachDB vs. Amazon Aurora: Comparing Distributed Relational Databases.”


    Streamlining application development and PostgreSQL compatibilityCopy Icon

    Databases today often require extensive resources and specialized teams for configuration and optimization. Often, modernizing database infrastructure requires re-writing application code, re-writing queries, updating schemas, using multiple databases and wasted resources, and additional training.

    CockroachDB supports the PostgreSQL wire protocol and the majority of PostgreSQL syntax, meaning that existing applications built on PostgreSQL can be migrated to CockroachDB with minimal, if any change to the application. We support critical features such as UDFs and stored procedures via PL/pgSQL, foreign keys, triggers, views, sequences and more.  As mentioned in our recent blog, our approach to PostgreSQL compatibility requires less technical debt than other vendors by evolving our implementation without forward porting any changes we’ve made to earlier PostgreSQL versions. This means we maximize compatibility and performance of code when the underlying database is distributed SQL. For PostgreSQL users, CockroachDB represents a natural extension into the benefit of a highly distributed database environment without sacrificing feature parity or compatibility.

    As of the time of writing, Aurora DSQL, on the other hand, is not a one-to-one replacement for PostgreSQL and falls short in several key areas of PostgreSQL compatibility. They currently do not support certain objects (databases, views, temporary tables, triggers, types, tablespaces, user-defined functions, and sequences), constraints (foreign keys, exclusion constraints), operations, extensions such as PL/pgSQL and pgvector, and expressions.

    aurora-dsql-vs-cockroachdb-comparison table

    Regional resilience and seamless migrationsCopy Icon

    According to our 2025 State of the Resilience Report, which surveyed over 1,000 senior technology leaders, on average organizations are experiencing a staging 86 outages each year, adversely impacting revenue and reputation. And 79% of companies say they’re not ready to comply with operational resilience regulations such as DORA.  

    With CockroachDB, we help you enable state-of-art resilience by eliminating downtime across your entire data infrastructure with our multi-active availability and custom survival goals across any zone, region - even across cloud providers. We also help you mitigate planned downtime with on-line schema changes and rolling upgrades.. We also have flexible options to automate recovery and enable cross-cluster replication across two or more data centers or regions. For customers who want a managed service offering, CockroachDB Cloud supports over 80 regions worldwide from all three cloud providers (AWS, Azure, and GCP) and provides up to 99.999% availability. 

    With Aurora DSL, currently only 3 AWS regions are supported (US only).

    aurora-dsql-vs-cockroachdb-cloud-regions

    Avoiding vendor lock-in with multi-cloud, hybrid and on-prem deploymentsCopy Icon

    Customers want flexible ways to deploy their data infrastructure to support modern applications whether fully in the cloud, fully on-premise, or in a hybrid deployment. Reasons range from meeting air-gapped and security requirements, to avoiding vendor lock-in or even cloud portability. 

    Cockroach Labs offers significant advantages over Aurora DSQL whether companies are looking to adopt a multi-cloud strategy, hybrid deployment, or self-host their infrastructure. One of the primary benefits of CockroachDB is the ability to deploy databases across multiple cloud providers such as AWS, Google Cloud, and Microsoft Azure or alongside a self-hosted environment. This multi-cloud, hybrid deployment or self-hosted environment flexibility ensures that businesses can leverage the best features and pricing from different providers, maintaining control over their infrastructure and avoiding the substantial costs and efforts associated with switching providers. 

    For example, a major managed payment processing platform chose CockroachDB for its multi-cloud architecture, which provided a competitive edge by meeting the specific failure requirements of large global banks. By enabling cloud portability and avoiding vendor lock-in, CockroachDB empowers companies to innovate and leverage new cloud services as they are released, ensuring they remain at the forefront of technological advancements.

    For organizations wanting to use fully managed SaaS offering, we have our 3 plans to choose from, our Basic and Standard tiers that are Serverless or multi-tenant, and we have our Advanced plan that is based on a dedicated (single-tenant) deployment model and designed for more sophisticated security and compliance requirements such as customer managed encryption keys (CMEK), PCI DSS support and HIPAA ready support. In contrast, Aurora DSQL is only available as a serverless option.

    Better together, in collaboration and in competitionCopy Icon

    Earlier this year we announced a number of partnership activities with AWS, including integration support with AWS Marketplace for our CockroachDB Cloud offering, and more recently we signed a Strategic Collaboration Agreement (SCA) with AWS so that we can accelerate data modernization and GenAI capabilities together.  As a trusted partner of AWS, we have developed many joint solutions whether as a managed service, on EKS, with Outposts, or on premise. 

    Many of these joint customers tell us they want PostgreSQL compatibility as the lingua franca of databases that scales whether the applications are new in the cloud or existing on-premise.  They tell us lifting and shifting business critical applications to the cloud is not only infeasible, but just doesn’t work. They tell us they want to deploy their database across multiple regions, but not at the expense of not having strong data consistency and high resilience.

    We’re committed to not just meeting this standard, but surpassing it, building relentlessly on our foundational strengths. The release of Aurora DSQL won’t slow our momentum, it only sharpens our competitive edge in the market. We look forward to pushing boundaries together, whether as strategic partners or worthy competitors.

    Learn more about how you can use CockroachDB to run your business-critical applications across any environment — whether in the cloud, on-premises, or hybrid — with global scale and unmatched resilience, on our product page.

    aurora dsql
    distributed sql