S
Supabase2w ago
Heka

Does createSignedUrl() count toward Cached Egress with Smart CDN enabled?

The docs say "Smart CDN caching works with all types of storage operations including signed URLs." https://supabase.com/docs/guides/storage/cdn/smart-cdn Does this mean the createSignedUrl() API call itself is cached and doesn't count toward egress? Or does it only cache the file downloads accessed via those signed URLs? I have an Instagram Reels-style feed with lots of short-form videos. I need to use signed URLs (or RLS policies) because only users in specific groups should be able to view certain videos - I can't make the bucket fully public. If 100 users scroll through the feed and each calls createSignedUrl() for the same video, is that 100 egress hits for the API calls alone? Or does Smart CDN help reduce this? Currently hitting my 5GB free tier limit and trying to understand if going for pro plan and enabling Smart CDN will fix my problem of hitting the quote or do I need something else in my setup. Since even in pro the quota is 250gb and If I hit 5gb just using the app my self for a week something needs to change
Smart CDN | Supabase Docs
Learn how Supabase Storage caches objects with a CDN.
1 Reply
garyaustin
garyaustin2w ago
100 non cached egress hits for the file as each signedUrl is slightly different as the cache time changes. Also each one fetched from the CDN even if cached is a cached egress hit. Public files would be 1 non cached egress hit and then 1 cached egress hit every time accessed after. Note my understanding is that cached egress is the data leaving the CDN (not going in) so if 10 users hit the CDN for the same public file it is 1 egress hit and 9 cached egress hits times the length of the file.

Did you find this page helpful?