Are there usecases for NoSQL systems on an Cloud Managed RDBMS world

NoSQL on an On-Prem world

The case for NoSQL on an On-Prem world is easy: You need fast (non-acid) writes with the possibility to scale your system horizontally AND reads must be fast but simple, i.e. no joins, no foreign keys, etc. NoSQL systems like Apache Cassandra or MongoDB achieve fast write times, in part, due to their relaxation of ACID properties.

In Cassandra’s case, it focuses on Availabilty and Partition Tolerance at the expense of Consistency, its up to you to as an designer/architect to decide the level of consistency (One, Quorum, All, etc.) of a given query or write operation.

So, if you need fast writes, fast (albeit simple) reads, the ability to scale horizontally and the possibility to use hardware with modest specs… then NoSQL is what you need. You can add here the need for a distributed storage system, perhaps to improve performance by having the storage closer to the different regions of your end-users.

Are managed RDBMS a game changer?

Cloud Managed Solutions such as Amazon RDS offer both Vertical and Horizontal Scaling with a simple push of a button (in the case of vertical scaling) and slightly more complicated for a horizaontal scaling. Take, for instance, a PostgreSQLRDS Managed System. PostgreSQL has notoriously been proposed as a NoSQL Document Store thanks to its extensive JSON support which allows it to serve as schemaless document storage. This means you now have a NoSQL Document Store that can scale horizontally AND has ACID compliance AND also supports relational storage which is fast, mature, supports user defined functions for Server-side scripts, etc. Why would anyone bother with a NoSQL system which sacrifices ACID compliance and has no join capability?

Yes! …but actually no

Distributed Storage – Locality

This particular use-case is perfectly doable on Cloud Managed Solutions. Read-replicas can easily be scaled close to your users maximizing performance by both requiring less IO transit and serving less users (less load). As long as your performance bottle-neck is on queries then you definitely don’t need NoSQL to satisfy this use-case.

Distributed Storage – Write performance

Since Read Replicas are… well read-only, then Cloud Managed Solutions will not necessarily solve your issues with a huge write load. All writes still go to a single master! That said, since all queries are served by your read replicas, your Master is free to focus on serving only write requests. This performance boost might be enough for your particular use-case.

Relatively cheap hardware

You still need to choose how “big” you want your instance to be on Cloud Managed Solutions such as Amazon RDS for PostgreSQL (Pricing) so whether this ends up being cheaper than NoSQL depends on the particular setup you need. Consider for instance, MY calculations for MY particular needs for a given project, at the time of writing:

AWS RDS PostgreSQL

Storage volume (General Purpose SSD (gp2)), Storage amount (300 GB per month), Nodes (1), Instance Type (db.t4g.xlarge), Utilization (On-Demand only) (50 %Utilized/Month), Deployment Option (Multi-AZ), Pricing Model (OnDemand) Monthly: 262.53 USD Total 12 months cost: 3,150.36 USD Source: RDSPostgreSQL Pricing Calculator

AWS Keyspaces

Amazon Keyspaces is basically serverless Apache Cassandra

| Qty | Price | Time Unit | Total | | 300 GB | 0,32 | 1 month | 96 | | 2 M | 1,5576 | 30 days | 93,456 | | 1 M | 0,312 | 30 days | 9,36 | | | | Total | 198,816 |

Monthly: 198.82 USD Total 12 months cost: 2,385.84 USD Source: Amazon Keyspaces pricing

Not all managed solutions are equally managed…

For SQL DBs, the actual capacity of the hardware on which it runs is crucial. You can get very good saving on a cloud managed solution as long as you are able to predict fairly accurate how much power you’re gonna need. No-SQL (like Keyspaces) on the other hand, can use moderate hardware and the impact from using more powerful hardware is not as strong as with SQLs systems. This allows Keyspaces to use the same pool of resources for everyone and it becomes more like “true” serverless or akin to paying for using an API.

In conclusion

The ease with which you can scale vertically on SQL cloud managed solutions, i.e. switching from a small instance to a larger one, opens up the already huge list of usecases for which a SQL DB is suitable. Add to this that you can distribute (maybe even geographically) with the use of read-replicas and it certainly looks like SQL are a perfect fit for everything.

However, such power comes at a cost, there are still a number of usecases where going NoSQL is cheaper. Furthermore, if your use-case is write-heavy, such as anything time-series, then NoSql are still your best option.