Cloudflare announces D1 = DATABASE

Cloudflare announces their first DATABASE!! To my surprise, it is a SQL database.

I was fully expecting a document database akin to MongoDB. However, it is a SQL database utilizing SQLite, an open source SQL based database. This is a HUUUUUGE development in many ways.

  1. SQL databases are by far the most commonly used and the SQL language is probably the most known in the world.
  2. Allows for complete applications built within the Cloudflare design

One thing to note, it is NOT a multi-write database. MongoDB is a multi-write. This is much more like the SOCRATES architecture used by Azure SQL Database HYPERSCALE & AWS AuroraDB. It does provide MULTI-READ and even better, in a SERVERLESS manner.

FF, what is the potential issue with single-write? BANDWIDTH; performance, time.

Let me paint a picture.
Saul’s SaaSSY is a new SaaS product that helps companies with accounting “stuff”. They are doing business in the US, Canada, EU… around the world. They are built in this NEW Cloudflare database. The database is in Chicago.

FF corporation is in Germany and uses Saul’s SaaSY. FF’s accounting department has people in Germany and Australia. When FF Corp in Germany logs in, Cloudflare creates a SERVERLESS READ ONLY copy of the data in Germany. Similarly, when FF Corp Australia logs in, Cloudflare creates a READ ONLY copy in Australia. Note, after an hour or so of not using this copy, the SERVERLESS and copy are deallocated.

Now, FF Germany finds an error in an address and updates the address. They use the READ ONLY copy to come up with the transaction to write. They submit the transaction. That transaction has to travel to Chicago then to ensure data consistency, the READ ONLY replicas need to be updated as fast as possible so that everyone is looking at the most recent set of data. It would be pretty bad if FF Germany sent the transaction and at almost the same time, FF Australia went in and noticed the error and typo’d a new address and submitted that before seeing that it was already updated by FF Germany… So it is very important to be able to prevent this kind of issue. So the time and performance and internal mechanisms of the database to prevent this type of issue are very important. It is vital that the speed of the write and the speed to update the read-only copies are very very fast (as well as other internal things done to ensure consistency). If it is slow, this can cause big issues.

The biggest advantages I see for NET here is that the serverless read only replicas can be in any of their PoPs where-as the read only replicas for Hyperscale or AuroroaDB are specified. Also, the pricing looks to be a whole lot cheaper than AuroraDB and Hyperscale. These databases charge a very high premium.



Oh, forgot to add that they are also working on making it work with CURRENT ON-PREM databases… Seems like you can plug into your current database and perhaps use that as the central store and utilize D1 for its edge capabilities. I think they said this is still in the works so I didn’t see as much detail for it.


I think they are saying “hey now you can build a full web app on Workers with a database backend (D1) and resilient storage (R2) now, come try it!” This set up is, in my opinion, close to the AWS EC2/EKS + RDS + S3 combination that dominates the web application stack today but aiming at a niche set of customers that need super fast response time.

SQLite has one of the highest throughput and fastest response time of all databases. I don’t think MongoDB will have much advantage here in terms of speed for the tiny to medium size web apps that Workers are targeting.

The pricing strategy is interesting: in the post they say that the database will have no egress fee (where AWS still charges:…) but will have charges based on number of operations. So this is charging by usage unlike RDS which charges by time.

I am curious how this will play out but this won’t have materia financial impact anytime soon. Definitely a power move into the battlefield with the large cloud providers.

Btw this is how the mapping works in my head. I may be wrong. Left is AWS, right is Cloudflare.
EC2/EKS : Workers
RDS : D1
S3 : R2


FinallyFoolin and Chang88,

I am awed by the knowledge you guys have about these things and by how well you explain them. Thanks so much, you are really assets to the board.



Workers is NETs version of AWS’s Lambda.

EKS is managed Kubernetes, Kubernetes is a container management system (continuing because of buzzword soup!)… Containers are self-contained virtual ‘computers’ (which normally run one application).

EC2 is AWS’s hosted computers (actually virtual machines) so you can log in, configure the OS, install whatever you like etc.



Workers is NETs version of AWS’s Lambda.

Greg is absolutely right here. I made the wrong comparison on the stack in my previous post. EC2/EKS are long running compute resources and Lambda is the serverless one. They are both ways to deploy web applications.

What advantages does NET bring to the table vs AWS besides how they are charging for it? AWS could give it away in the end, so what will bring customers to NET vs AWS?


Good question. The positioning of NET seems to be to build out a bunch of the things that AWS et al already do, ie, positioning themselves to be the 4th* public cloud, and their messaging seems to be we’re not going to sting you with unexpected charges, and be the ‘good people’ of cloud.

I’ve used AWS a bunch, and some of those charges can sure mount up quickly.

I suspect Cloudflare are targeting different customers to AWS etc., smaller, smaller budgets, more agile. Will be interesting to watch their progress particularly with enterprise customers.

It does seem a bit of an adjunct to their CDN roots + their security focus now (eg: their homepage has a bright orange “Under attack?” button).


  • Theres probably a bunch more but behind AWS, Azure, GCP…

Let’s not forget the news that R2 is now in Open Beta the direct competitor to S3.

Anyway don’t expect much revenue coming from D1 anytime soon, it’s early days but a very great step towards becoming the 4th cloud provider.