Live data from Hacker News

Netlify Edge Functions: A new serverless runtime powered by Deno

netlify.com

81–90 of 166 posts

Re: Netlify Edge Functions: A new serverless runtime powered by Deno

#81
post #5

This is great news. I'm really rooting for a successful trend of Serverless runtimes, mainly as a weapon against rising cloud deployment costs. While the general trend today is to back the serverless environment with Javascript runtimes (Cloudflare runs its edge on top of V8, Netlify uses deno, most other serverless runtimes use nodejs), I'm optimistic that WebAssembly will take over this space eventually, for a bunc…

> I'm really rooting for a successful trend of Serverless runtimes, mainly as a weapon against rising cloud deployment costs.

How would that work? Don't these tend to facilitate cloud lock-in or at least be cloud-only in the sense that they make it hard to operate your own metal infrastructure?

Re: Netlify Edge Functions: A new serverless runtime powered by Deno

#82

Earlier quoted context omitted.

Netlify and Supabase use Deno's infrastructure for code execution ( https://deno.com/deploy/subhosting ). Vercel hosts their edge functions on Cloudflare (nothing to do with Deno). Slack's Deno runtime is hosted on AWS.

Are you willing to talk a bit about how Deno Deploy works internally? I think you have an internal build of Deno that can run multiple isolates (unlike the CLI, which basically runs one). How do you limit the the blast radius in case of a vuln in Deno? Kenton Varda did a pretty great writeup on CF worker security [0]. Would love to see Deno Deploy do something similar. [0] https://blog.cloudflare.com/mitigating-spect…

We probably will eventually. A talk like this takes a _lot_ of time to prepare though, so it's not on the top of our priority list. But it will happen eventually.

The TLDR is that Deno Deploy works pretty similarly to CFW in that it can run many isolates very tightly packed on a single machine. The isolation strategy differs slightly between CFW and Deploy, but both systems make extensive use of "defense in depth" strategies where you minimize the blast radius by stacking two or more defenses against the same issue on-top of each other. That makes it _much_ more difficult to escape any isolation - instead of breaking out of one sandbox, you might have to break out of two or three layers of isolation.

These levels of isolation could happen at different layers. For example network restrictions could be initially restricted by an in-process permission check, then additionally a network namespace, and finally a routing policy on the network that the machine is connected to. Imagine this, but not just for network, but also for compute, storage, etc.

Re: Netlify Edge Functions: A new serverless runtime powered by Deno

#83

What are the cold start times like? Compared to say Cloudflare Workers where they claim you can have no cold starts?

Deno Deploy (https://deno.com/deploy) uses the same optimizations as CFW to achieve effectively 0ms cold starts.

Netlify Edge Functions are still in beta and don't have all of the same optimizations yet, but we're going to be working with Netlify over the next few months to enable these optimizations to Netlify Edge Functions too.

Re: Netlify Edge Functions: A new serverless runtime powered by Deno

#84
post #80

Earlier quoted context omitted.

When you share a url like a news article on Twitter or send it on Slack, iMessage etc, you get a small preview widget showing you the headline and a photo from the story. The way this is generated is Twitter/iMessage scrapes the HTML of the url you are sharing and looks for https://imgur/adfstdd "> and displays whatever image is in the content field. Similarly the widget title is populated from In a static html site…

> In a static html site there is only one index.html so all routes have the same meta tags unless you overwrite the index.html file using an edge worker. I guess this is specifically for SPA static sites? I would expect a static html site to have different html files for each page, like blog/2020-09-09-title.html and that could then have its own metatags, so no need for this dynamic rewriting, unless I'm missing some…

Correct. This is only for SPAs that use client side routing like react-router. React SPAs are quite common with startups in my experience.

Re: Netlify Edge Functions: A new serverless runtime powered by Deno

#85
post #75
post #60

Earlier quoted context omitted.

Different strokes for different folks. This has been one of the big knocks on AWS, that a poor little old lady can setup a "free" AWS account then when her website (and accompanying Lambda function) goes viral she gets hit with a $100k bill from uncle Jeff.

Would the Lady prefer to let her site go down? I don't understand this way of thinking. One of the main benefits of serverless is scalability, peace of mind for precisely when you go viral. If you're doing something good, especially if you're selling something good, all you want is to go viral. And of you went viral, you don't mind paying the AWS costs, which should be tiny compared to your revenue. Just need to care…

Sure, but I think the GP was referring to a situation where revenue doesn’t match the traffic.

Imagine the grandma scenario. Let’s say that she cooks and sells artisanal jams and jellies. With the help of her granddaughter, she creates a TikTok that goes viral. Her web store immediately sells out, and the traffic from the video hammers her website. She cannot react fast enough to enable back orders and so most of those visits go to waste.

Putting aside the technical absurdities (why is she hosting on a lambda, etc), in this scenario, grandma is up a creek.

If this scenario were real, I would feel really bad for the grandma with a huge bill and not enough revenue to cover it, but I would be livid at whatever imbecile decided to set her up with such a ridiculous hosting paradigm.

“But it only costs pennies a month to run!*”

Yeah, until she goes viral. This scenario right here is why services like Squarespace et al are still valuable. You’ll pay a few extra bucks a month, but if you go viral, you won’t go bankrupt when the bill is due.

Re: Netlify Edge Functions: A new serverless runtime powered by Deno

#86
post #16
post #5

This is great news. I'm really rooting for a successful trend of Serverless runtimes, mainly as a weapon against rising cloud deployment costs. While the general trend today is to back the serverless environment with Javascript runtimes (Cloudflare runs its edge on top of V8, Netlify uses deno, most other serverless runtimes use nodejs), I'm optimistic that WebAssembly will take over this space eventually, for a bunc…

I agree about WASM. I am sort of worried that Deno may be too late tbh. Why would I bother with an interpreted language at all when I can code in any language I want and run it anywhere with WASM?

Deno supports wasm. :p

Re: Netlify Edge Functions: A new serverless runtime powered by Deno

#87

Netlify pricing has always been confusing to me, but I'm not entirely sure why. I guess I'm more accustomed to pay-as-you-go in this space (CFW) than tiered plans (Netlify bundles their features into starter/pro/business). It seems that the free plan is 3M invocations/mo, starter is 15M/mo, and business is 150M/mo, but there aren't any ways to increase those limits (business says to contact them for higher limits). P…

> Personally I'd prefer true pay-as-you-go without hard limits, even if it's a bit more expensive. Please, a hard no to that. That's the worse aspect of AWS, Azure and all those new huge hosting centers - hard to calculate the real cost and set a budget. I don't know about Netlify, but the old Linode (before it got acquired), was flexible with its "hard" limits in a plan - for example, if your site got slashdotted /…

Like another comment said, different strokes for different folks.

I would much rather pay overage fees than have my site go down due to a hard limit, but I would also like the option to choose the opposite.

That way you appeal to both sides of the scalability-vs-predictability crowd.

Re: Netlify Edge Functions: A new serverless runtime powered by Deno

#89
post #72
post #48

Earlier quoted context omitted.

I sought to unserstand "serverless" but every deployment diagram I have ever seen show things that look an aweful lot like they run on... servers? Maybe I don't get the idea (and honestly I was too lazy to put in the legwork), but when I hear something like "serverless" I imagine some p2p javascript federated decentralized beast where the shared state is stored through magic and tricks with the users clients and ther…

> Instead it seems like a buzzword (?) for a weirdly niche way of running things that someone with a 4 Euro/Month nginx instance that hosts 10 websites will probably never understand. To me, serverless means that I as the developer don't have to do ongoing server maintenance work. A 4 Euro/month setup sounds great, until you find out that you never enabled log rotation and filled up the disk space, or your certificat…

But where does the code run physically? Of course on a server, otherwise it wouldn't be reachable from the net. But who maintains those servers? Is there some contract with those who maintain it?

In my experience if you run things professionally you have to set up log rotation purely for legal reasons anyways. Is serverless without logs? Or how would you there ensure to log privacy relevant data only for the legally allowed periods?

How do you do SSL on serverless and who is in control of the certs that guarantee safe communications between you and your customers? If it is not you, are they somehow contractually bound to keep your user data private?

Re: Netlify Edge Functions: A new serverless runtime powered by Deno

#90
post #5

This is great news. I'm really rooting for a successful trend of Serverless runtimes, mainly as a weapon against rising cloud deployment costs. While the general trend today is to back the serverless environment with Javascript runtimes (Cloudflare runs its edge on top of V8, Netlify uses deno, most other serverless runtimes use nodejs), I'm optimistic that WebAssembly will take over this space eventually, for a bunc…

Really, really dumb question. I've seen a lot of node/python/etc serverless offerings. Is there something where you just provide a binary and its executed each time? For example, I write a simple single responsibility piece of code in Go `add_to_cart.go` and build it, deploy it, and somehow map it to some network request. dot slash pass args, and return the result? No need to have containers or runtime?

It's possible you'd run into environment issues. JS or Python code (or a container) doesn't have to care as much what OS or architecture it's run on. A raw binary could pierce that abstraction and make the service more complicated to offer.
Post reply on HN