NewSQL: SQL Scalability Without Sacrificing ACID
NewSQL databases aim for NoSQL's horizontal scaling with the ACID guarantees of a traditional relational database. They suit high-throughput OLTP systems, like e-commerce, that must scale out. The footgun is assuming they are a simple drop-in replacement.
Why it exists
For decades, developers faced a hard choice: use a traditional relational database (like PostgreSQL) for ACID guarantees but struggle with horizontal scaling, or use a NoSQL database for massive scale but give up strong consistency. NewSQL was created to resolve this trade-off for applications that need both.
The mental model
A NewSQL database is a relational database re-imagined for a distributed world. The goal is to provide the familiar SQL interface and ACID transaction guarantees of a traditional database, but with the ability to scale out horizontally across many commodity servers, just like a NoSQL system.
How it works
While implementations vary, NewSQL systems typically use a new architecture built from the ground up for distribution. They automatically shard (partition) data across a cluster of nodes. To maintain consistency during writes, they use consensus algorithms like Raft or Paxos to ensure all nodes agree on the state of a transaction before it's committed. To the application, it looks like a single, giant SQL database, but underneath, the work is distributed.
When to use it
Use NewSQL for Online Transaction Processing (OLTP) workloads that have outgrown a single database server but cannot compromise on data consistency. This is common in systems with many small, fast, concurrent reads and writes, such as financial trading platforms, large-scale e-commerce inventory systems, and global identity services.
When not to use it
Avoid NewSQL if your workload fits comfortably on a single, powerful database server; a traditional RDBMS is simpler and more mature. If your application can tolerate eventual consistency, a NoSQL database is often easier and cheaper to operate. NewSQL is also generally not optimized for Online Analytical Processing (OLAP) or data warehousing, which involve large, complex queries over historical data.
One canonical example
An e-commerce platform needs to handle millions of concurrent 'checkout' operations globally. A traditional SQL database would become a bottleneck. A typical NoSQL database might risk data inconsistency, like selling the same last item twice. A NewSQL system allows the database to scale across many nodes while ensuring every transaction is ACID-compliant, maintaining a perfectly correct inventory count even under extreme load.
Interview question
Which scenario best highlights the unique value proposition of a NewSQL database?
- a.Managing high-volume online transactions requiring strict data consistency across distributed nodes.Correct
- b.Operating a small-scale application that fits on a single server and prioritizes operational simplicity.
- c.Storing vast amounts of unstructured data where eventual consistency is acceptable.
- d.Performing complex analytical queries over historical data for business intelligence.
Why? this is the answer
NewSQL databases are designed for high-throughput Online Transaction Processing (OLTP) systems that need both horizontal scalability and strong ACID guarantees, as described in option A. Option C describes a NoSQL use case, option D describes an OLAP use case, and option B describes a scenario where a traditional RDBMS is more appropriate.
Just read this? Test yourself on what you have been reading.
Read the original → en.wikipedia.org
- #databases
- #architecture
- #newsql
- #scalability
- #acid
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on databases — each one lists the topics its interview covers.
See open roles