
Show HN: Functions as a Service for Kubernetes - alexellisuk
https://github.com/alexellis/faas-netes
======
alexellisuk
I've just had a play with community FaaS app - an online code editor +
executor from a DevRel guy at Cisco.
[https://github.com/JockDaRock/Time2Code](https://github.com/JockDaRock/Time2Code)

You can run Go/Node/Python in your browser via functions.

------
deferredposts
How does this differ from the existing FaaS frameworks on top of Kubernetes?

~~~
alexellisuk
FaaS is the first Kubernetes FaaS framework to natively support Docker Swarm
and Kubernetes. Rather than using a highly specific / burnt-in JavaScript and
Python runtime (as the other frameworks do) - any process or container can be
deployed as a serverless function. This is because the execution of your
functions is separate from the orchestration layer.

A tiny Golang shim (watchdog) is embedded in your container and means you
don't have to create and maintain individual runtimes. You can even make `cat`
or `gofmt` into a serverless function with no extra code. Communication is by
stdin/stdout pipes (similar to CGI) meaning you can also support native
Windows processes too - such as .NET.

You have a UI built-in for testing/viewing functions and metrics are used to
auto-scale your functions for demand.

If you're already using Docker to package applications, it will be easy to
adopt this OSS FaaS - whether building for Windows or Linux. More info on the
README
[https://github.com/alexellis/faas/](https://github.com/alexellis/faas/)

~~~
posnet
How does the overhead of creating a new process for every request compare to
language specific runtimes.

I realise it will be more, since it adds flexibility, just curious how much.

~~~
alexellisuk
Good question - it depends entirely on the disk storage, RAM generation &
speed and CPU. Golang and Python are fastest. I am sure it could be further
optimized for a given combination.

Tested on a Type 3 Packet Bare Metal host with latest Docker Swarm. The NodeJS
example called NodeInfo comes back in around 0.1s / 100ms for a round-trip. A
bash built-in (cat) is 0.015s / 15ms. Golang sample markdown function - 0.024s
/ 24ms.

