Supabase vs Planetscale for a regular SAAS app

I'm pretty new to databases in general and i've been googling around lately and checking out YT videos on the topic. So far i've been able to narrow down my choices to supabase and planetscale. Can anyone elaborate on the pros vs cons of each provider, why theo prefers planetscale, etc? I'm also a bit confused about the pricing and how the privisions roughly translate to real-word usage, e.g., planetscale has 5GB storage for its free tier, while supabase 500MB DB and 1GB file storage. What exactly is planetscale referring to as the 5gb storage? (DB + file storage?) Planetscale's "1 billion row reads/mo 10 million row writes/mo" tho sounds really interesting. By 'row read', does it mean an SQL query? Which provider is easier to use, which is generally cheaper? I also read that for supabase, since it's basically postgres, you can just take the postgres DB if you want. Does the same apply for planetscale?
28 Replies
Neto
Neto15mo ago
storage is what it sounds, storing data on the db need a physical place to be stored, and depending on the data, it can take a lot of space
Neto
Neto15mo ago
as a example
Neto
Neto15mo ago
--- for the second point, ps itself explains that https://planetscale.com/docs/concepts/billing#understanding-rows-read -- for the third point, at high level, they supabase is postgres and ps is mysql if you want a deeper topic, you can check about vitess, that powers planetscale https://planetscale.com/docs/learn/operating-without-foreign-key-constraints
j3llyb3ans
j3llyb3ans15mo ago
thanks, checked both links a bit for now, will definitely check them out on a deeper level when i need to In general tho, which of the two would you prefer from the point of view of DX, price, scalability, ease of use? Also, theo recently had a vid where he mentioned the topic a bit (https://youtu.be/hgglCqAXHuE?t=334 ) I'm wondering what he meant tho about Supabase being less aligned with the T3 stack, does he mean supabase doesn't play as nice with prisma compared to planetscale? (or was he referring to something else?)
Neto
Neto15mo ago
with serverless, you spawn more instances to handle requests if the instance need the database, they need to open a connection to it plus having to deal with connection pools
Neto
Neto15mo ago
Theo - t3․gg
YouTube
PlanetScale CEO Sam Lambert on Web Dev Wednesday w/ Theo
So excited for this interview!!! Planetscale has always been a favorite product of mine and I'm so hyped to chat all about it with Sam
Neto
Neto15mo ago
you can check this interview with theo and ps ceo
j3llyb3ans
j3llyb3ans15mo ago
thanks, checking it out rn just watched the bits relevant to me seems like based on the video, planetscale sounds more like a fit for my use case (in particular, the part where he explained that planetscale is more of a specialist for databases whereas supabase is more of like an all-in-one backend solution like firebase that also provides auth, etc) although i'm not sure what other services supabase offers aside from the DB and Auth, i was planning on choosing a diff auth provider anyway (prob Auth0) so i guess planetscale makes more sense for me --- i'm curious about the learning curve tho, i did a bit of searching on YT for tutorials on planetscale (particularly NEXT + planetscale) and there aren't that many yet. Is planetscale quite easy to learn based on the available resources on YT? or should i start with supabase for now since there are more tutorials on YT, then move to learn planetscale when i'm already more comfortable with DBs?
Neto
Neto15mo ago
Ps docs are amazing at that Depending on the db implementation, you don't need to interact directly with it For auth, you can check clerk A nice feature of ps is the branching and production tables You should check that
b_e_n_t_e_n
b_e_n_t_e_n15mo ago
Supabase is great and it’s auth is great too It’s better than auth0 unless you need really advanced features I’d say
j3llyb3ans
j3llyb3ans15mo ago
i see how good is supabase's integration with prisma? i'm not really sure since theo didn't mention it explicitly in his videos but it seems like he was saying that planetscale plays nicer with T3? i'm guessing supabase may not play as nice with T3 but would still work great with T3 nonetheless?
Sybatron
Sybatron15mo ago
You can just use it for db host and then i think it's just basic postgress and just get the db url
j3llyb3ans
j3llyb3ans15mo ago
i see, thanks
toplop
toplop15mo ago
For my project which I want to keep free as long as possible, I'm using both to make use of their strengths and get around their limitations: Supabase for their auth, unlimited API requests, no egress for writes, and using their Database Webhooks to call a serverless function that writes the rows to Planetscale which I use for reads.
j3llyb3ans
j3llyb3ans14mo ago
funny cos lately, i've been thinking if there's a way to combine some services to get away with a free tier for as long as possible that sounds really up my alley, i might just try that, thanks! i'm guessing with a stack similar to that, the only thing you're probably going to pay for @ the initial stages would be the domain name? which i assume would be something like namecheap?
toplop
toplop14mo ago
Yeah. I'd go with Cloudflare for the domain name since they provide everything at cost. Also their free tier caching is really useful for reducing bandwidth usage on static assets and Cloudflare Workers is good for reading/querying the DB since the free tier doesn't come with the bandwidth limits that other serverless function providers have and has access to the Workers KV store (which has a pretty decent free tier too).
j3llyb3ans
j3llyb3ans14mo ago
thanks, checking out cloudflare rn just checked out cloudflare, looks nice i'll prob go with them for the domain name where do you usually host your apps? I've been suggested to go with either netlify or cloudflare pages. (i was initially going to go with vercel since it's a NEXT app, but vercel disallows commercial use on their free tier)
toplop
toplop14mo ago
Can't really go wrong with either one. Ultimately depends on your use case. Nowadays, I'd generally lean towards cloudflare pages cause of the unlimited bandwidth unless I need Netlify Identity for Netlify CMS or something.
j3llyb3ans
j3llyb3ans14mo ago
thanks again! Hey, was wonder if i can ask u about something again I'm currently on netlify but i checked out cloudflare recently because netlify has a very small limit of 100 hours for their functions (i'm assuming the limit applies to serverless functions, not edge functions, though i'm not rly sure) I checked clouflare and apparently they only support edge runtime for a fullstack NEXT app. does that mean that you write all of your pages and api routes with an edge function? Also, does cloudflare have something similar to vercel's regional edge functions? (https://youtu.be/_w0Ikk4JY7U?t=355).
toplop
toplop14mo ago
I'm not aware of an 100 hour limit with Netlify. I'm not familiar with Next so not sure about that but my app works fine deployed as a static site to cloudflare pages and using cloudflare workers for building the APIs. I imagine this should be possible with Next as well No I don't think cloudflare workers has something like that
Mattia
Mattia14mo ago
Supaase does it for me. You said "regular saas app". I love postgres and policies, they clear your code tenfolds if well used (you can just give the right permission to the right session and not have to worry about any kind of filtering when querying). Planetscale is just a db self hosted platform with neat docs, Mysql - A raw experience. You're asking the infamous "Firebase or MongoDB" question here, it doesn't really make too much sense to compare a fully fledged BaaS to a DB
j3llyb3ans
j3llyb3ans14mo ago
i found about the 100 hr limit by fiddling around netlify's dashboard, then checked their pricing page to find that it was a bit hidden How do you deal with auth and DB calls to supabase with cloudflare workers? From reading their docs i read that each invocation has a max limit of 10ms. Is 10ms enough for auth and DB stuff?
b_e_n_t_e_n
b_e_n_t_e_n14mo ago
100 hours / 10ms is 36,000,000 invocations lmao also 10ms is compute only, not awaiting fetch calls n' stuff
j3llyb3ans
j3llyb3ans14mo ago
the 100 hours is for netlify, the 10ms is for cloudflare's workers as for netlify idk what the timeout for their edge functions are, haven't found info from their docs
also 10ms is compute only, not awaiting fetch calls n' stuff
Yeah, but what i'm wondering about in particular is the execution time I guess for confirming auth status it'd probably fall under 10ms, but what about DB calls, i'm pretty sure 10ms isn't enough to query a DB and receive a response right? Or am i misunderstanding something?
b_e_n_t_e_n
b_e_n_t_e_n14mo ago
It’s 10 ms of cpu time Waiting for a response isn’t counted
toplop
toplop14mo ago
How do you deal with auth and DB calls to supabase with cloudflare workers?
Something like this https://supabase.com/docs/guides/functions/auth ? Haven't tested it myself though as for my use case I just call supabase's api directly for db calls which require auth.
Integrating With Supabase Auth | Supabase Docs
Supabase Edge Functions and Auth.
j3llyb3ans
j3llyb3ans13mo ago
i see, thanks! this looks really promising i guess it can be done, only thing i have to figure out now is regional edge (outside of vercel at least)
Walyson Moura
Walyson Moura4mo ago
It would be possible to use only The auth of supabase + database planetscale + prism?? Or would it be better to use Auth0 instead of supabase at auth?
Want results from more Discord servers?
Add your server
More Posts