For those using Supabase in production, I'd love t...
# off-topic
s
For those using Supabase in production, I'd love to hear what/where your backend is while we wait patiently for Supabase Functions? AWS Lambda? Cloudflare Workers? Google Cloud Run? A node/go/elixir server hosted wherever?
v
im looking at nextjs api for simple stuff
will most likely have a node server (not serverless) as well
x
AWS Lambdas (Vercel, but it’s technically lambdas). Serverless goes nicely with Supabase since you can use PostgREST on the backend and offload a lots of operations to the client directly.
Cloudflare Workers (bundled) is another good runner here since they use execution time rather than cpu time for execution (in terms of resource usage), so while the worker waits for PostgREST to respond, you’re not consuming resources.
s
When you say Vercel, do you specifically mean APIs/endpoints in nextjs or svelte etc that are deployed to vercel? That's definitely a big + for Cloudflare Workers that I hadn't thought of
x
I use SvelteKit with vercel so that covers the page rendering too
But yeah, could just leave the frontend part aside, serverless endpoints do work very nice with Supabase
If you use next I’d say Vercel is the obvious choice, otherwise I’d recommend Workers
Only reason I don’t use workers myself is because I do some JS processing that can go over the 50ms limit
s
What are we talking in terms of complexity in your sveltekit endpoints on vercel? Is it mostly kept to my view needs this data, my view needs to update that type functions?
x
They are pretty basic but they can also be pretty complex 🤷‍♂️
s
I'll give it a go, just hoping to prevent a footgun lol
x
there's realistically nothing you would do in nodejs that you wouldn't do on lambdas
the only difference is state management
Actual AWS lambdas are still nodejs (Workers are a v8 derivate), you can run the same code, you just don't have continuity
The lambda can die if no traffic, or new ones can spawn if too much traffic
So you wouldn't do stuff like
const onlineUsers = []
to track stuff, since you'd have different processes
but there comes the beauty of Supabase Auth, since it's external, it solves the most common serverless problem - auth state
j
We use Cloud Run & Kotlin for our backend. We have a flutter app for Android and iOS.