D1 Location Hints Explanation And Improvement

Hi,

I previously attempted to write about this, but trolls quickly jumped the gun and said it was chatgpt. Moving on, I still need some explanation regarding this subject.

My current project requires data to be stored in their specific countries, for example US based customers in US, UK in UK, and so on. Because this is not possible with D1 and we only have a very broad definition of location “hints”, please explain the following:

wnam - Western North America

  • What countries do you store data in, specifically?

enam - Eastern North America

  • What countries do you store data in, specifically?

weur - Western Europe

  • What countries do you store data in, specifically?

eeur - Eastern Europe

  • What countries do you store data in, specifically?

apac - Asia-Pacific

  • What countries do you store data in, specifically?

Please note this is absolutely crucial due to GDPR and other political bonanza.

As far as suggestion goes, please provide better “hints” for locations. For example, Region Groups - Fauna Documentation (as you can see, it’s not so broad).

Thank you.

D1 does not support Jurisdictional restrictions in the way some other services do. As such it would likely not be an appropriate solution with the requirements that have been set forth.

1 Like

As said above, location hints are absolutely not what you want for gdpr and such, they are merely hints which may not even be respected, or land in the same location.

Cloudflare Durable Objects (DOs) for example support jurisdictions (just eu/fedramp): Data location · Cloudflare Durable Objects docs.

The D1 Team has confirmed before that jurisdictions are on the road map as well. As D1 is built on DOs, I wouldn’t expect anything more then eu/gdpr & fedramp jurisdictions, but we’ll have to see.

There’s a nice community site here which can show you in which locations jurisdictions run in:

As well as where location hints run in:

(and of course, as stressed above, location hints are not what you want for legal requirements, the countries in which location hints/regions run in may change any time, and hints are only best effort and may fall somewhere else if needed.)

1 Like

Thanks, this is really helpful. However, I do not see the point of “hints” if you cannot use it for legal purposes. Nevertheless, the site you provided at least gives some insight as to where the data might sit, which is really useful.

Without hints, the D1 DB would always be created closest to you. If you were making a service which will live on us-west but were in Europe, that would be an issue. Also if you were scripting creation of DBs on behalf of users, or just wanted one in each region, etc.

Yea, they said they were aiming for Jurisdiction support by GA, and in the Discord they’ve announced GA to be in early april, so we’ll just have to see. Not sure if it’s still part of the plans or not.

1 Like