Making uploads faster

May 28, 2022
rushi@ente.io

We have shipped an improvement to make your uploads faster ⚡️

How uploads happened before

When uploading a file, we fetched a list of URLs from the server to PUT files to. Then, the encrypted files / file parts were uploaded to those URLs, that are hosted on storage servers located in Europe.

We noticed that this could be improved by proxying data through Cloudflare Workers that are deployed across the world, there by ensuring proximity to our customers. There was also the added advantage of Cloudflare's great network speeds.

How uploads happen now

Now, we upload the same encrypted file / file parts to the Cloudflare Worker rather than directly uploading to our servers in Europe. The Worker then uploads these to our servers.

Even though this has increased the complexity of uploads on the backend, this has made our uploads faster due to the Workers being closer and having greater network speeds. This gain is even more pronounced for large multi-part uploads.

We got the following results from a sample test using the same set of files:

File sizeBeforeAfterImprovement
2.6 MB5.3 s4.1 s23.42%
2.7 MB4.3 s5.6 s28.88%
3.3 MB8.1 s8.1 s0.46%
23 MB23 s21 s8.60%
141 MB119 s82 s31.20%
354 MB306 s217 s29.01%

This change is currently live on our web and desktop apps and we will be bringing it to our mobile apps soon. We hope you'll be happy to see faster uploads! 😊


If you'd like to hear more about our performance challenges, follow us on Twitter.

Or if you'd like to hang out with a bunch of engineers building an e2ee photo storage service, come say hello on Discord.