Skip to content

Latest commit

 

History

History
34 lines (19 loc) · 1.17 KB

File metadata and controls

34 lines (19 loc) · 1.17 KB

R2

What is it?

R2 is Cloudflare's blob storage provider. We use it to store all of the release assets stored by the Release Worker.

Noteworthy points

Directories

R2 stores files flatly, meaning a directory does not exist in R2.

However, R2 allows characters such as slashes (/) in an object's name. For directories we can then specify a prefix (like nodejs/release/) and R2 will only return objects that has a name that starts with that prefix.

Bindings API

R2 allows integration with Workers through their bindings API. We use this when fetching files.

S3 API

Due to some performance issues we were seeing with R2's list binding command, we opted to use R2's S3 API for listing directories.

Buckets

We have two R2 buckets:

  • dist-staging - Holds staged releases. This bucket is private and should not be publicly accessible.

  • dist-prod - Holds released versions of Node.js. Everything in this bucket should be considered publicly accessible.

(see Release Process for more information on how we use these buckets)