Live data from Hacker News

Supabase Edge Runtime: Self-Hosted Deno Functions

supabase.com

51–60 of 105 posts

Re: Supabase Edge Runtime: Self-Hosted Deno Functions

#51
post #29

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 have stuck with cheap VPS servers for as long as I can remember. It takes 5 minutes to deploy a full stack node.js app, along with a database - and I've yet to exhaust the resources on my VPS, even with all my side projects (production grade and hobby stuff). Have always found it weird how so many heroku-style hosting providers charge _per app_, things get costly, quickly, when you have lots of small apps like I do…

These PaaScost an arms and a leg and each one have their own DSL u have to learn.

Easiest is to just provision ur own vps and run a docker-compose or k8s

Re: Supabase Edge Runtime: Self-Hosted Deno Functions

#52
post #24

Earlier quoted context omitted.

It's as bad as Deno Deploy has always been (used by Netlify edge functions, Supabase, and others). To me CF Workers are more about interacting with the CF CDN, doing lightweight HTTP stuff, etc. I would never use Workers to build a full server application. Their custom runtime locks you in, it's extremely barebones, and obviously almost no NPM modules are compatible. They are working on Node compat which will probabl…

Very well said. What would you say CF has been investing in instead?

My superficial impression is they've been investing more in their networking services for enterprise customers but don't take my word for it. I don't pay much attention to their announcement weeks.

Re: Supabase Edge Runtime: Self-Hosted Deno Functions

#53

How 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.

Would love to know what you're interested in doing.. we make Extism[0] which allows you to more or less ignore the lack of a "standard library" for something like V8 wasm environments.. Spin definitely makes it easier to compile high-level source code & have done great work on their SDKs to provide these "standard lib" elements. maybe Extism is useful, but if not please feel free to drop in our Discord[1] and chat w/ the team.

[0]: https://github.com/extism/extism [1]: https://discord.gg/cx3usBCWnc

Re: Supabase Edge Runtime: Self-Hosted Deno Functions

#54
Very interesting!

If I need to do more than one query to the database in series, my intuition is that it would be faster to make those calls in the same region as the database, rather than at the edge. It seems to be true using Vercel's playground[1] (towards Supabase).

Any guidance for Supabase based apps? Is it possible to run my functions close to the database?

[1] https://edge-data-latency.vercel.app/

Re: Supabase Edge Runtime: Self-Hosted Deno Functions

#55
post #54

Very interesting! If I need to do more than one query to the database in series, my intuition is that it would be faster to make those calls in the same region as the database, rather than at the edge. It seems to be true using Vercel's playground[1] (towards Supabase). Any guidance for Supabase based apps? Is it possible to run my functions close to the database? [1] https://edge-data-latency.vercel.app/

for when it really matters, then you should just use a Postgres Function. That will be an order of magnitude faster than anything you do to match the region.

Supabase has auto-generated APIs (using PostgREST), so you can execute a Postgres Functions like this:

    const { data, error } = await supabase.rpc('echo', { hello: 'world' })

Re: Supabase Edge Runtime: Self-Hosted Deno Functions

#56

hey 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.

Re: Supabase Edge Runtime: Self-Hosted Deno Functions

#57

This is the third big release this week (along with a Postgres Pooler and a Logging Server). If you're wondering why there are so many, we generally "build for three months" then do all of our big product announcements in a "Launch Week". We're 2 days into this Launch Week so there will be a few more releases to come.

I can't seem to find info about a postgres pooler release this week, where am I missing it?

Edit: never fails, you ask a question and then you immediately find it. https://news.ycombinator.com/item?id=35501718

Re: Supabase Edge Runtime: Self-Hosted Deno Functions

#58

Earlier quoted context omitted.

We got SOC2 Type 2 last week, HIPAA is next. We won't do much of an announcement about SOC2, so you can consider this comment the "official announcement" :)

Having been through the pain of SOC2 Type 2, I'll consider this a big announcement as well!

[deleted]

Re: Supabase Edge Runtime: Self-Hosted Deno Functions

#59

hey 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

#60
post #20

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…

> usually at a rate that's much cheaper than on-demand pricing

This is an area that is legitimate swindling/inflation by hosted app providers (e.g. DO Apps, Heroku, Render, Fly, etc). Oftentimes the per-vCPU/memory price is inflated over the underlying cost, even relative to a rather expensive underlying provider like AWS; which they'll reasonably justify by saying that this is the value-add, yeah you pay more but its more managed. But: when you have underlying access to the VPS, you can host more than one process! Which, of course, they're oftentimes doing on their end to cut costs.

Serverless functions can legitimately fall into the "always cheaper" category. If you've got twenty apps that each get request volume in the range of dozens-to-thousands per month; you could host that on a $5/mo VPS, or you could pay a few cents for a FaaS (Lambda, GCP, Cloudflare Workers, etc, all priced in the same magnitude). But the price-to-scale chart of serverless functions is really weird; they do hit a point where they're more expensive than just, you know, running a web server on a VPS. That point isn't at a super low volume, but its not far off from where its something to think about for a typical software organization. If I had a personal project that hit that point, I'd classify it as a good problem to have.

I also feel endless frustration in how there legit isn't a single cloud provider out there that (1) offers a serverless functions runtime, and (2) gives you the ability to set a non-zero budget which turns off the world when you go over budget. Many offer free tiers with no credit card, and some are even generous (Vercel and Firebase are two good examples), but I won't build on a free tier. I want to pay you. So, you upgrade and give a credit card, and now you're liable for one fuck-up bankrupting you, or throwing you on your knees at the mercy of their customer support. The severity of this fuck-up ranges from "my GCP account does just use a VPS, but egress is unlimited, so the bill was a bit high this month" to "the new dev changed a lambda function to call another which called the first one, and our bill is now the GDP of a developing nation-state".

The vast majority of the managed infrastructure world is, unfortunately, B2B swindlers just trying to out-swindle each other, only possible because they're all buying from each other, constantly raising prices, finding new ways to bill their customers, and losing any grip on the true (extremely low) reality of their costs. Supabase is better than most. I really do appreciate releases like this one. I'd also add Cloudflare to my list of "good ones"; they've taken a hard stance against charging for bandwidth, and I think that single decision had controlled a ton of the incremental costs we see from their newer higher-level product offerings like Workers.

Post reply on HN