Follow BigDATAwire:

December 3, 2024

AWS Takes On Google Spanner with Atomic Clock-Powered Distributed DBs

(AnsataCrucs/Shutterstock)

AWS today announced two new database services aimed at providing low-latency data processing that can support transactions anywhere on the globe. The new services, including the Postgres-flavored Aurora DSQL and DynamoDB global tables, put AWS in head-to-head competition with Google Cloud’s Spanner, which also uses atomic clocks to ensure that far-flung transactions don’t get out of order.

For years, Google Cloud has been the dominant force in a small but important niche of the relational database market that requires low latency as well as transactional consistency for database operations that take place anywhere on the planet (or off of it).

The tough architectural challenge has always been how to account for the time lag between nodes in a globally distributed database. While the speed of light–nearly 300 million meters per second–is definitely fast, it’s not fast enough to support distributed nodes in a database in the manner that is required.

For certain use cases, such as banking, companies have gotten around the physical limits by using clever mechanisms to ensure that the order of database transactions get out of synch. Google Cloud famously uses atomic clocks, which other databases, such as CockroachDB and YugabyteDB, have used software, such as the Raft consensus algorithm, to guarantee consistency.

AWS CEO Matt Garman describes Aurora DSQL at re:Invent 2024

With its new Aurora DSQL offering unveiled today, AWS has adopted new technologies and techniques to overcome the twin challenges of distributed databases: how to achieve strong consistency with low latency in geographically distinct nodes, and syncing servers with microsecond accuracy around the globe. The company explains:

“To achieve multi-Region strong consistency with low latency, Aurora DSQL decouples transaction processing from storage to overcome the limitations of the current approaches, which were constrained by information being passed back and forth multiple times at the speed of light,” the company says in its press release.

“To overcome this, Aurora DSQL only checks each transaction at commit time and, on commit, parallelizes all the writes across all regions to provide a multi-Region database with strong consistency and fast writes,” it continues. “To ensure each Region sees every database operation in the exact order they occurred, Aurora DSQL uses Amazon Time Sync Service, which added hardware reference clocks on every [EC2] instance, synchronizing them to satellite-connected atomic clocks to provide microseconds level accurate time within anywhere in the world.”

AWS has been working on a globally distributed version of Aurora for at least three years. The company told this reporter at the re:Invent conference in 2021 that it pretty much had the global reads covered, but was still working at scaling global writes, which is a tricker problem.

Aurora DSQL is a serverless offering, which requires minimal operational overhead for customers. AWS says it provides 99.999% availability across multiple regions, virtually limitless scalability, and compatibility with existing applications that use a Postgres database.

AWS pitted Aurora DSQL against Google’s Spanner to see how it compares. The company says that, for a basic 10-transaction SQL statement, Aurora DSQL was able to deliver 4x the throughput for both reads and writes. It will be interesting to see how the two databases compete in more complex workloads in the future.

AWS rolled out a similar capability with DynamoDB, its popular NoSQL database.

“It turns out that relational databases are not the only ones that benefit from multi-region, strongly consistent, low latency capabilities,” AWS CEO Matt Garman said during today’s keynote address. “So I’m also pleased to announce that we’re adding the same multi-region, strong consistency to DynamoDB global tables. So now whether you’re running SQL or NoSQL, you get the best of all worlds—active-active, multi-region databases.”

Related Items:

AWS Cancels Serverless Postgres Service That Scales to Zero

AWS Working to Scale Aurora DB Writes Globally, Like Spanner

Google Cloud Gives Spanner a PostgreSQL Interface

BigDATAwire