Back to all summaries

Improve global upload performance with R2 Local Uploads

Frank Chen, Rahul Suresh, Anni Wang
R2 Performance Storage

AI-Generated Summary: This is an automated summary created using AI. For the full details and context, please read the original post.

Improve Global Upload Performance with R2 Local Uploads

Cloudflare glides into open beta with Local Uploads for R2, a feature designed to accelerate global upload performance. With Local Uploads enabled, object data is first written to a storage location close to the client, then asynchronously copied to the bucket's location. This approach ensures immediate accessibility and strong consistency, leading to faster uploads and a more global feel.

Key Technical Details

Local Uploads solve the distance problem by allowing uploads to be written to a storage location close to the client, reducing the distance data must travel to reach the bucket. R2's architecture is composed of multiple components, including the R2 Gateway Worker, Durable Object Metadata Service, and Distributed Storage Infrastructure. With Local Uploads, the upload process is optimized to write data locally, then asynchronously copy it to the bucket's location.

Practical Implications for Developers

Enabling Local Uploads can result in a 75% reduction in total request duration for global uploads. Developers can try Local Uploads in the Cloudflare Dashboard or with a single Wrangler command. This feature is particularly beneficial for applications that require global performance, such as media content uploads from different regions or devices sending logs and telemetry from around the world.

Benefits and Use Cases

Local Uploads make upload requests faster, reducing Time to Last Byte (TTLB) by up to 75%. This feature is ideal for applications that require fast and reliable uploads, such as:

  • Media content uploads from different regions
  • Devices sending logs and telemetry from around the world
  • Applications that require strong consistency and zero egress fees

By enabling Local Uploads, developers can improve the performance and reliability of their applications, ensuring a better user experience for their customers.

Want to read the full article?

Read Full Post on Cloudflare Blog