just use a regular server for mid/larger sized apps. i started my web dev journey with JAMStack, Vercel, the "edge". everything is easy as long as one only deploys a full-stack NextJS app. the moment other apps come in, just use a server deployed as VPS and avoid "edge runtime hell". edge runtime hell refers to "you can't do this (function with over 2MB payload), you can't do that (because not supported by X)". EDIT:…
I'm coming around to building everything for a VPS from the outset. There's a lot of upside to VPSes, such as: 1. Can be purchased as a fixed cost, usually at a rate that's much cheaper than on-demand pricing, and especially serverless--this tends to only get better with time as competition keeps prices low 2. It's "just" a Unix/Windows/Mac box, so the issues with runtime constraints you mention are bounded different…
Supabase Edge Runtime: Self-Hosted Deno Functions
61–70 of 105 posts
Re: Supabase Edge Runtime: Self-Hosted Deno Functions
#62Earlier quoted context omitted.
I'm coming around to building everything for a VPS from the outset. There's a lot of upside to VPSes, such as: 1. Can be purchased as a fixed cost, usually at a rate that's much cheaper than on-demand pricing, and especially serverless--this tends to only get better with time as competition keeps prices low 2. It's "just" a Unix/Windows/Mac box, so the issues with runtime constraints you mention are bounded different…
I've been using Coolify on a Hetzner VPS, it works great, it's like an open source Heroku that works through Docker and Compose.
Re: Supabase Edge Runtime: Self-Hosted Deno Functions
#63hey hn, supabase ceo here This is a webserver for Deno. It is MIT licensed, written in Rust, and based on the latest Deno Runtime (1.32+). It can serve TypeScript, JavaScript, and WASM functions. This one is important for local development and self-hosting. For local development, it ensures there is parity between development and production. For self-hosting, it means you can deploy and manage your Deno Functions on…
Great work! I've been dabbling with deno for a couple years now, one of the most powerful features I'm excited about is BroadcastChannel[1] support, which works with --unstable in Deno Deploy. One of the challenges I've run into is debugging timeouts in deno deploy, so I'm curious-- 1. is BroadcastChannel supported in supabase self-hosted edge functions? 2. is there more tooling available to supabase edge functions t…
Thanks! Good Questions
1. We haven't enabled BroadcastChannel in the Edge Runtime. Mainly because we haven't found good use cases for it within Edge Functions (it does make sense as a way to subscribe within a browser client, but not sure how it fits with async/short-lived nature of Edge Functions). Curious about how you plan to use BroadcastChannel in Edge Functions?
2. As I've mentioned in the blog post Edge Runtime allows you to tweak the duration and memory available for an Edge Function (check the examples/main/index.ts in the repo too). Personally, I use this option to debug timeouts and memory issues on Edge Functions. We also plan to introduce better ways to profile your Edge Functions in the future.
Re: Supabase Edge Runtime: Self-Hosted Deno Functions
#64hey hn, supabase ceo here This is a webserver for Deno. It is MIT licensed, written in Rust, and based on the latest Deno Runtime (1.32+). It can serve TypeScript, JavaScript, and WASM functions. This one is important for local development and self-hosting. For local development, it ensures there is parity between development and production. For self-hosting, it means you can deploy and manage your Deno Functions on…
Interesting! Do you have an idea of what it would mean performance/latency wise to replace kong with this?
Re: Supabase Edge Runtime: Self-Hosted Deno Functions
#65How about WASM functions? One of Deno's selling points is sandboxing but WASM takes it to a new level it seems. I've been looking into Spin and also Dapr with WasmEdge. There is even QuickJS which does JavaScript.
You can already use WASM modules within Edge Functions. We have an example on using WASM modules to generate OpenGraph images - https://github.com/supabase/supabase/tree/master/examples/ed...
We are also exploring ways to create functions in WASM-supported languages and run them directly on Edge Runtime. We expect this would be easier WasmGC[0] is shipped and Deno's WASI support improves.
Re: Supabase Edge Runtime: Self-Hosted Deno Functions
#66Earlier quoted context omitted.
I've been using Coolify on a Hetzner VPS, it works great, it's like an open source Heroku that works through Docker and Compose.
I had a look at it and it seemed interesting, but then I spotted the `-v /var/run/docker.sock:/var/run/docker.sock`.
Re: Supabase Edge Runtime: Self-Hosted Deno Functions
#67Earlier quoted context omitted.
I had a look at it and it seemed interesting, but then I spotted the `-v /var/run/docker.sock:/var/run/docker.sock`.
In case anyone's wondering, that gives the container root level access to the host's Docker daemon. A big potential security hole.
Re: Supabase Edge Runtime: Self-Hosted Deno Functions
#68Earlier quoted context omitted.
Is Supabase targeted towards webdev "apps" or mobile "apps"? As a mobile dev I got excited to check out a Firebase + serverless alternative, but the docs seem very targeted towards webdevs and non-native apps. I see there's a 1.0 Swift library that's available, would love if someone can chime in with their experience using that in an iOS app.
They seem to have Flutter support but the lack of React Native support is non starter for me.
There were a few kinks initially, like URL polyfil being missing from RN and the need for AsyncStorage alongside supabase.js but they've all been rectified by the team or made more clear using their Expo instructions in the docs — Although maybe it'd be clearer for people that the expo guide is for RN? People who haven't started using RN might not know the connection?
It's such a pleasant stack, we're experimenting currently with edge functions in place of an API in certain places, so far it's just to use Cloudflare Turnstile to insert contact form records into a database, but it's super trivial.
Excited for the future of edge functions!
Re: Supabase Edge Runtime: Self-Hosted Deno Functions
#69hey hn, supabase ceo here This is a webserver for Deno. It is MIT licensed, written in Rust, and based on the latest Deno Runtime (1.32+). It can serve TypeScript, JavaScript, and WASM functions. This one is important for local development and self-hosting. For local development, it ensures there is parity between development and production. For self-hosting, it means you can deploy and manage your Deno Functions on…
Congrats on the launch! I’ve been so underwhelmed with Lambda’s lack of forward progress lately and have been wanting to play around a bit with V8 isolates. This looks like a super-easy way to get a runtime spun up and handling requests on AWS.
Our Lambdas are currently written in Typescript and built with esbuild. We zip them and push to AWS.
Re: Supabase Edge Runtime: Self-Hosted Deno Functions
#70does any one have good practical experience running Supabase locally? Its against their business model to have this run well so I'm a bit scared of the growing lock-in. (P.S. if Supabase is listening some customers like myself would be willing to pay a significant amount for support in a kubernetes/docker deployment running on our servers. We currently pay $50k - $100k simply for enterprise support contracts for each…