Supabase storage download is slow?

Hey everyone, hope you are all doing well.

I just encountered a funny issue.

I have a service that needs to download a "large" file to do some processing on it. I recently noticed that in local it was faster than on my prod (on GKE).

I was using supabase.storage.from("").download() and for a file of 200mb it was taking ~15s on local with 80Mbps of down speed.
But what suprised me is that it was taking 4 to 5 minutes on the pod on GKE. I then did a speed test from the pod and it was 17Gbps so that was not the issue xd
I also tried to download the file with wget and it was taking 3-4s. -- ( kubectl exec -it PODNAME -- wget -O tempfile.mp4 SIGNEDURL )

I measured my code, checked the cpu usage, cache, ... Nothing seemed to be the cause of it.

Then I decided to change my way of doing things. Instead of using download(), I now create a signedUrl and then download from it with node's https.get()

I supposed it has something to do with auth that makes that download slow? I don't know exactly how it works.
I was about to create an issue, but I thought that maybe ask around here first may be a good idea.

If you have any idea of the why, I would love to understand more this. Thank!
Was this page helpful?