Live data from Hacker News

The next generation of serverless

fermyon.com

81–90 of 93 posts

Re: The next generation of serverless

#81
post #62

I've been dealing with serverless since 2018 and have a company with a 100% serverless and open-source product (webiny.com). I'm not sure I fully agree with your 4 issues and the fact that Web Assembly is the answer. "Serverless functions are slow" -> not really, only if designed poorly "DX serverless functions is sub-par" -> where's your proof, again you'll have bad experience as a developer only if you don't know w…

I can believe the other points, but the WASM hype train has officially jumped the shark.

Re: The next generation of serverless

#82

We use AWS Lambda as a monolithic "serverless" to run our Django stack since Lambda can now take standard containers[0]. The full environment, costs us US$100/mnth to run production b2b application. Traffic is quite light, but we literally don't pay for non-usage. The most expensive thing of our monthly bill is the postgres RDS+Elasticache. So for our use case it is extremely cost effective, esp for UAT, Staging wher…

Honest question: When would I want to use Lambda containers vs ECS Fargate?

Re: The next generation of serverless

#83

Earlier quoted context omitted.

I tried moving off Gmail, I really did. But all the EU-based alternatives just suck so much. So now I'm back to Gmail, but I pay for it (Google Workspace). This way I at least have a commercial relationship with Google which gives me various contractual rights, and access to phone support. I also have a contingency plan: I have my email address on my own domain, and I backup my mailbox once in a while, so that I can…

Have you considered Zoho? It's a company based in India, but they have European servers.

We tried zoho. Had to move as the servers reputation was awful. Maybe you get your own ip if you do enterprise?

Re: The next generation of serverless

#85
post #9

This sales pitch ignores cloudflare workers, which sound pretty similar to me, with both webassembly and key-value storage. The distinguishing part of the articles option seems to be that webassembly functions are uploaded in an OCI container, which I don't think anyone else supports, and I don't think was designed with this use case in mind?

Oh no they didn't ignore them. They included them with the slow, locked in, poor developer experience first generation providers but also with a "more limited fashion" disclaimer.

Re: The next generation of serverless

#86
post #47

I see that there's some skepticism about running WebAssembly in containers and how it constitutes a next-gen serverless solution. It's important to note that the use of WebAssembly here is not just about the runtime environment but also about the features it brings. WebAssembly binaries can start up significantly faster than traditional VMs or containers. They also have a strong isolation model and security sandbox t…

Java servlets in application servers, and IIS CLR Handlers, WebAssembly sales pitch is so 2001.

Except you run a separate tomcat instance per app or better yet, embedded tomcat anyway.

Source: Someone who runs two dozen Tomcat containers.

Re: The next generation of serverless

#87

We use AWS Lambda as a monolithic "serverless" to run our Django stack since Lambda can now take standard containers[0]. The full environment, costs us US$100/mnth to run production b2b application. Traffic is quite light, but we literally don't pay for non-usage. The most expensive thing of our monthly bill is the postgres RDS+Elasticache. So for our use case it is extremely cost effective, esp for UAT, Staging wher…

Honest question: When would I want to use Lambda containers vs ECS Fargate?

Two scenarios I have used them for:

1. Short running batch jobs activated by events i.e. new S3 file, entry in a dynamic db database. The start up time is not a problem for these.

2. Serverless api sitting behind an api gateway. Again the startup latency is no problem.

I used .NET core for these and the startup latency was never a problem. Haven't tried node, I imagine it might be an issue there since the runtime might have to hoist all your javascript.

Re: The next generation of serverless

#88
post #48

Earlier quoted context omitted.

> Even the cold start and memory benefits could largely be replicated for native code if you write a custom kernel ... people act as if lightweight isolation is fundamentally impossible without a JITted platform I think when most people refer to this as being "impossible", they mean practically impossible, not dis-allowed by the laws of physics. "First write your custom kernel" is a step only a miniscule proportion o…

I don't understand why we need a 'custom kernel'. Have your serverless server give you the specs for whatever the heck they want to run and compile against that. Why do we need a new kernel?

I could have better explained what I was talking about. The point of a custom kernel would be to get extremely fast startup and context switch times, and extremely low per-process memory overhead, by doing things that Linux doesn't do - either because they're unnecessary or unhelpful for typical Linux use cases, or because they require making stronger assumptions about what userland needs to do. As a relatively flashy example, if you can assume that processes don't need overlapping addresses, you can share page tables between processes and rely on PCID/ASID to ensure each process can only access its own memory. [3] But there are also simpler things like - on Linux, starting a process requires forking the parent process, creating copies of its page tables, only for `exec` to immediately throw them away. Even posix_spawn is implemented on top of vfork. That's fast enough for Linux, but it's unnecessary. A custom kernel that doesn't provide Unix compatibility could dispense with it.

To be fair, none of that may be necessary. This blog post is advertising 1-2ms startup time. Based on a little benchmark [1] I just ran, on my desktop, Linux can execute a trivial process (/bin/busybox true) from start to finish in 0.4ms. A real application executed normally would obviously take much longer to start up. But I think their 1-2ms number is based on snapshotting the process after initialization, so a fair comparison would do that on native as well. Full process snapshotting for native processes is something that has been done before ('unexec', CRIU) but admittedly isn't very common, and I don't have a good way to test it. With snapshotting, there won't be any code executing in the process at startup, so most of the initialization time would be eliminated, but the mere act of loading more memory into the page table would have some cost. But probably not very much.

However, Fermyon uses Wasmtime, and Wasmtime's blog post on snapshotting [2] advertises single-digit microsecond startup, which is pretty cool. Starting native processes in single-digit microseconds is out of the question under Linux. But a custom kernel might be able to get there.

Edit: I guess I should add something. I'm not saying a custom kernel should just be table stakes. Writing one is obviously a major commitment and requires a high level of expertise. But you could say the same thing about JIT runtimes such as Wasmtime. There is even some overlap between what they're doing (i.e. loading binaries and managing processes). A kernel and a JIT are still fairly different projects, but they both require similar types of expertise, and I think the level of complexity is also comparable.

[1] https://gist.github.com/comex/0402dc95afb1c2ca3076d5b1b64bcc... [2] https://bytecodealliance.org/articles/wasmtime-10-performanc... [3] https://stackoverflow.com/questions/73753466/how-does-linux-...

Re: The next generation of serverless

#89
post #47

Earlier quoted context omitted.

Java servlets in application servers, and IIS CLR Handlers, WebAssembly sales pitch is so 2001.

Except you run a separate tomcat instance per app or better yet, embedded tomcat anyway. Source: Someone who runs two dozen Tomcat containers.

Doesn't change the fact of the "clever" Webassembly marketing.

Re: The next generation of serverless

#90

A very timed response to Wasmer Edge release yesterday! [1] Even though I don't agree with their take, I have to congratulate their team for the fast response. At the end this is what startups are about. https://wasmer.io/posts/announcing-wasmer-edge

If you go to the bottom, underneath the author's name is JUNE 06, 2023. So I guess it was the other way around. Makes sense because 3 regions don't make an edge offering, so WasmerEdge must have been rushed out there.

I didn't realize of the date, thanks for the correction. I guess my compliment doesn't make that much sense either.

Indeed, we have a rush for shipping great products to the world (although Wasmer Edge is been more than a year in the making!)

Post reply on HN