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. -- (
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()
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!
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.