Hey! As part of the development of a new service, we would like to consider the use of storage servi

Hey! As part of the development of a new service, we would like to consider the use of storage services offered by Cloudflare. Although D1 is in beta, we want to carry out a POC to see if it can meet our needs in the future. I would like informed user feedback to confirm or not the assumptions we make about how D1 works.

Our needs are :
  • Store the data based on the user locations
  • We want to ensure availability to avoid down times
  • We want to be able to scale horizontally
To achieve theses needs, we hesitated between Durable Object and D1. Durable Objects are interesting because they meet our needs in terms of storing data close to the user. Unfortunately, we rule out their use because it would not allow us to obtain the list of all our objects without having to store the ids of each durable object created. Se we want to consider D1 but feel free to contradict me if this approach seems wrong.

Our guesses on what’s possible with Cloudflare D1:
  • Create one or more D1 databases for each Location Hints -> Our question, are location hints respected for sure?
  • Our object IDs are random but we voluntary add information related to the database that stores them
  • For sharing, Is a nice approach planned in the backlog at Cloudflare? As it stands, we would obtain an in-house solution where we add in the id of the objects, the location hints + the number of the db and thus, this allows us to scale up to 50,000 (current limit) Databases D1 worldwide. It requires work on our side and therefore, we were wondering if this kind of features was planned in the future?
  • How is high availability ensured? Is a D1 database hosted in a single location? In this case, what happens if the data center has anomalies? Can other data centers take over the D1 database or is it impacted and will no longer be accessible?
I am aware that the answer to these questions may evolve over time, but I would be interested in obtaining feedback.

Thanks !
Was this page helpful?