SupabaseInian ParameshwaranAnnouncement
Storage is now available in Supabase
Summary
Supabase launched Storage, adding a scalable object store to its existing Postgres, authentication, and API services. Existing open-source storage servers like Ceph, Swift, Minio, and Zenko were evaluated but rejected due to auth incompatibilities and external dependencies like etcd, MongoDB, and Kafka. Consequently, the team implemented a custom Storage API server built with Fastify and TypeScript behind the Kong gateway. Object metadata and access control reside directly in Postgres, leveraging Row Level Security policies written in SQL rather than a proprietary domain-specific language. Objects stream directly to managed backends like AWS S3 using Node streams with minimal in-memory buffering, accompanied by a default one-hour Cache-Control header.
Context
Users required a scalable object store integrated into the Supabase ecosystem, but existing open-source storage servers could not use Postgres as their primary datastore and bundled incompatible authentication systems.
Approach / What changed
Built a custom Storage API server using Fastify, TypeScript, and Node streams behind a Kong gateway, delegating metadata and authorization to Postgres tables via Row Level Security while storing actual objects in S3.
Takeaways
Instead of introducing a custom policy DSL, Supabase Storage leverages Postgres Row Level Security on a dedicated storage schema to evaluate authorization.
Node streams upload objects directly to S3 with minimal in-memory buffering, reducing RAM consumption during large file transfers.
Supabase Storage applies a default Cache-Control header of one hour to retrieved objects to ensure browser caching, which can be overridden.
Source and freshness
- Source
- supabase.com
- Published
- Added to Yomu
- Last updated
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.