Intermittent slow uploads to S3 using pre-signed URLs

  • Goal: I have a Retool app for my customer support team to upload documents to S3. The upload process first calls one of our backend APIs to get a pre-signed S3 URL, and then uploads the file by calling a Rest API Resource with the URL set to the pre-signed S3 URL. We are seeing intermittently slow uploads; e.g. 3MB file taking 20s to upload.

  • Steps: I tried changing our routing to go through Retool EU (since most my CS team is located in MENA). I set a 8000ms timeout on the REST API query, but seems like the query ignores that.

  • Details: Cloud-hosted version of Retool

I have a couple questions:

  1. How does Retool handle Rest API resource queries? Does Retool proxy these requests as well, or is it a direct API call?
  2. Would switching to the Amazon S3 Resource produce more consistent performance?
  3. I have an HAR that my teammate recorded, is there a way I can share that? That might give more insights into the issue.

Hi @sf_tech_bro,

Retool does proxy requests for REST API resources, so the API calls go through Retool's servers first, then to your backend. This could cause performance issues. It would make sense for you to switch to using the Amazon S3 resource in Retool. See these docs to set it up. Hopefully this will improve the performance.

(If you want, you can upload the HAR file here.)

Let me know how it goes! :grinning:

1 Like

Forgot to respond @lindakwoo
Thanks for the suggestion, I'll try it out :pray:

okay @sf_tech_bro , let me know how it goes.