Serverless Functions, Made Simple.

OpenFaaS® makes it simple to deploy both functions and existing code to Kubernetes

Run anywhere

Anywhere

Avoid lock-in through the use of Docker. Run on any public or private cloud.

Any code

Any code

Build both microservices & functions in any language. Legacy code and binaries.

Any scale

Any scale

Auto-scale for demand or to zero when idle.

Understand the value of Serverless

In Serverless For Everyone Else, you'll gain a working knowledge of the value and use-cases of serverless functions. You'll then build your own with Node.js and learn how to secure and monitor them.

GET THE EBOOK

Run your code anywhere with the same unified experience.

Bring your laptop, your own on-prem hardware or create a cluster in the cloud. Let Kubernetes do the heavy lifting enabling you to build a scalable, fault-tolerant event-driven serverless platform for your applications.

You can try out OpenFaaS in 60 seconds or write and deploy your first Python function in around 10-15 minutes. From there you can take the OpenFaaS workshop, a series of tried-and-tested self-paced labs which teach you everything you need to know about functions — and more.

Function Store

Functions Store

An ecosystem for sharing, reusing and collaborating on functions

Reduce Boilerplating

Templating system

Reduce boilerplate code, share code in the templates store

Functions and Microservices

Functions or Microservices

Deploy existing microservices using Express.js, Sinatra, ASP.NET Core or simplify with functions.

Simple, powerful functions from anywhere.

Whether you want to use Go, Java, Python, C#, Ruby - Express.js, Django, ASP.NET Core, even binaries like ffmpeg, ImageMagick, or anything else. We have you covered with the template store.

$ faas-cli new --lang java11 java-fn

Handler.java
package com.openfaas.function;

import com.openfaas.model.IHandler;
import com.openfaas.model.IResponse;
import com.openfaas.model.IRequest;
import com.openfaas.model.Response;

public class Handler implements com.openfaas.model.IHandler {

    public IResponse Handle(IRequest req) {
        Response res = new Response();
	    res.setBody("Hello, world!");

	    return res;
    }
}
$ faas-cli template store pull golang-http
$ faas-cli new --lang golang-http golang-http-fn
handler.go
package function

import (
	"fmt"
	"net/http"

	"github.com/openfaas-incubator/go-function-sdk"
)

// Handle a function invocation
func Handle(req handler.Request) (handler.Response, error) {
	var err error

	message := fmt.Sprintf("Hello world, input was: %s", string(req.Body))

	return handler.Response{
		Body:       []byte(message),
		StatusCode: http.StatusOK,
	}, err
}
$ faas-cli new --lang python3 python3-fn

main.py
def handle(req):
    """handle a request to the function
    Args:
        req (str): request body
    """

    return req
$ faas-cli new --lang node12 javascript-fn
handler.js
"use strict"

module.exports = async (event, context) => {
  const result = {
    status: "Received input: " + JSON.stringify(event.body)
  };

  return context
  .status(200)
  .succeed(result);
}
$ faas-cli template store pull bash-streaming
$ faas-cli new --lang bash-streaming bash-fn
handler.sh
#!/bin/sh
for i in $(seq 1 100)
do
    sleep 0.001
    echo "Hello" $i
done
$ faas-cli new --lang dockerfile ruby
Dockerfile
FROM ruby:2.7-alpine3.11

WORKDIR /home/app
COPY    .   .

RUN bundle install

CMD ["ruby", "main.rb"]

OpenFaaS Sponsors

platinum Tier

gold Tier

Thank you to our sponsors and customers, for supporting our work.

Become a sponsor

Start your Serverless Journey

Understand the use-cases for functions and learn at your own pace with the OpenFaaS Manual: Serverless For Everyone Else.

GET THE MANUAL

Run OpenFaaS in Production

OpenFaaS Pro is a commercially licensed version of OpenFaaS meant for production use.

Get the world's best support, work with the founders and unlock features.

FIND OUT MORE