From Azure Functions to FreeBSD
24 points by wezm
24 points by wezm
Azure Functions are so bad. They wanted to be able to run arbitrary Python or npm packages and so each one is backed by a full container, with all of the associated deployment time and overheads. But they have a bunch of limitations and must be written for specific APIs that terminate HTTPS for you and give you a request-response model. You can’t do long poll or similar without leaving the function running (you can’t mark the socket with the infrastructure and just be handed it back when either there’s more data from the client or when you receive some other even that you want to handle).
The thing I want from a FaaS environment is something that isn’t POSIX, that is a lightweight environment designed entirely around the network as the only IPC primitive, with first-class integration with backplane services like message queues and storage, where a trivial function can fit in under 1MiB of RAM, where I can scale it down to nothing when not in use and scale it up to a million concurrent requests trivially.
Azure Functions is zero of these things.
Containers are too heavy, the gold standard should really be built around language-based unikernels (they can be super minimal and fast).
Check out this paper on using MirageOS (OCaml microkernel) for serverless. MirageOS goes down to megabytes of RAM, has top-tier networking libraries and can be scaled and load balanced fairly trivially.
Exactly. It's not just that they're big, it's that they provide a load of features that are not helpful. A function doesn't want a local filesystem. A filesystem conflates two things:
You often want things like a local persistent cache that can go away when the function exits, or a shared namespace that is shared across invocations of the function. But you want all IPC to be trivially scalable to a datacenter, which means you don't want shared memory, you don't want local pipes, but you do want message queues with reliable delivery, busses, and so on. A POSIX environment is absolutely the wrong tool for this.
Interesting.
I’ll be the first to admit a curmudgeonly avoidance of FaaS.
What is something that does the right things?
Google Run is basically containers, and Cloud Functions are otherwise on life support it seems.
Would OpenFaaS be the gold standard?