Convert Figma logo to code with AI

fission logofission

Fast and Simple Serverless Functions for Kubernetes

8,378
781
8,378
226

Top Related Projects

⚡ Serverless Framework – Effortlessly build apps that auto-scale, incur zero costs when idle, and require minimal maintenance using AWS Lambda and other managed cloud services.

24,977

OpenFaaS - Serverless Functions Made Simple

Kubernetes Native Serverless Framework

5,271

High-Performance Serverless event and data processing platform

5,517

Kubernetes-based, scale-to-zero, request-driven compute

Apache OpenWhisk is an open source serverless cloud platform

Quick Overview

Fission is an open-source, Kubernetes-native serverless framework. It allows developers to easily create, deploy, and manage serverless functions on Kubernetes clusters without having to deal with the complexities of container infrastructure.

Pros

  • Simplifies serverless development on Kubernetes
  • Supports multiple languages and runtimes
  • Offers automatic scaling and low latency
  • Provides built-in support for workflows and canary deployments

Cons

  • Requires a Kubernetes cluster, which can be complex to set up and maintain
  • Learning curve for developers new to Kubernetes concepts
  • Limited ecosystem compared to some cloud provider serverless offerings
  • May have higher operational overhead compared to fully managed serverless platforms

Getting Started

To get started with Fission:

  1. Install Kubernetes on your local machine or cloud provider
  2. Install Helm (Kubernetes package manager)
  3. Install Fission using Helm:
helm repo add fission-charts https://fission.github.io/fission-charts/
helm install --name-space fission --create-namespace fission fission-charts/fission-all
  1. Install the Fission CLI:
curl -Lo fission https://github.com/fission/fission/releases/download/v1.16.0/fission-v1.16.0-linux-amd64 \
    && chmod +x fission && sudo mv fission /usr/local/bin/
  1. Create and deploy a simple function:
# Create a Python environment
fission env create --name python --image fission/python-env

# Create a function
echo 'def main():\n    return "Hello, Fission!"' > hello.py
fission function create --name hello --env python --code hello.py

# Create an HTTP trigger
fission route create --method GET --url /hello --function hello

# Test the function
fission function test --name hello

This quick start guide will help you set up Fission and deploy your first serverless function on Kubernetes.

Competitor Comparisons

⚡ Serverless Framework – Effortlessly build apps that auto-scale, incur zero costs when idle, and require minimal maintenance using AWS Lambda and other managed cloud services.

Pros of Serverless

  • Broader cloud provider support (AWS, Azure, GCP, etc.)
  • Larger community and ecosystem with extensive plugins
  • More comprehensive documentation and tutorials

Cons of Serverless

  • Steeper learning curve for beginners
  • More complex configuration for multi-cloud deployments
  • Potentially higher resource usage for large-scale applications

Code Comparison

Serverless (YAML configuration):

service: my-service
provider:
  name: aws
  runtime: nodejs14.x
functions:
  hello:
    handler: handler.hello

Fission (Go code):

package main

import (
    "net/http"
    fission "github.com/fission/fission-go"
)

func HelloHandler(w http.ResponseWriter, r *http.Request) {
    w.Write([]byte("Hello, Fission!"))
}

func main() {
    fission.SetHandler(fission.Handler(HelloHandler))
}

Both Serverless and Fission aim to simplify serverless application development, but they take different approaches. Serverless focuses on a cloud-agnostic framework with extensive provider support, while Fission emphasizes Kubernetes-native serverless computing. The code examples highlight the configuration-based approach of Serverless versus the code-centric approach of Fission.

24,977

OpenFaaS - Serverless Functions Made Simple

Pros of OpenFaaS

  • Broader language support, including first-class Go support
  • More extensive ecosystem with additional tools and UI
  • Easier to deploy and manage on various platforms, including Kubernetes

Cons of OpenFaaS

  • Steeper learning curve for beginners
  • More complex architecture, which can be overwhelming for simple use cases
  • Requires more resources to run compared to Fission

Code Comparison

Fission function example:

def hello(context):
    print("Hello, World!")
    return "Hello, World!"

OpenFaaS function example:

def handle(req):
    return "Hello, World!"

Both frameworks use simple function definitions, but Fission includes a context parameter, while OpenFaaS uses a more straightforward approach.

Key Differences

  • Fission focuses on simplicity and ease of use, while OpenFaaS offers more features and flexibility
  • Fission has native support for Kubernetes, whereas OpenFaaS can run on various platforms
  • OpenFaaS has a larger community and more frequent updates
  • Fission uses a pool of pre-warmed containers for faster cold starts, while OpenFaaS relies on on-demand container creation

Choose Fission for simpler deployments and faster cold starts, or OpenFaaS for more advanced features and broader platform support.

Kubernetes Native Serverless Framework

Pros of Kubeless

  • Simpler architecture with fewer components, making it easier to deploy and manage
  • Native integration with Kubernetes, leveraging existing resources like ConfigMaps
  • Supports multiple runtimes including Python, Node.js, Ruby, and Go out of the box

Cons of Kubeless

  • Less active development and community support compared to Fission
  • Limited built-in monitoring and observability features
  • Fewer advanced features like canary deployments and auto-scaling

Code Comparison

Kubeless function deployment:

apiVersion: kubeless.io/v1beta1
kind: Function
metadata:
  name: hello
spec:
  handler: handler.hello
  runtime: python2.7

Fission function deployment:

apiVersion: fission.io/v1
kind: Function
metadata:
  name: hello
spec:
  environment:
    name: python
    poolsize: 1
  package:
    functionName: hello
    sourcePath: "hello.py"

Both Fission and Kubeless are serverless frameworks for Kubernetes, but they differ in their approach and features. Fission offers a more comprehensive set of features and active development, while Kubeless provides a simpler, more Kubernetes-native experience. The choice between them depends on specific project requirements and the desired level of complexity.

5,271

High-Performance Serverless event and data processing platform

Pros of Nuclio

  • Supports multiple programming languages and runtimes
  • Built-in UI for function management and monitoring
  • Advanced auto-scaling capabilities

Cons of Nuclio

  • Steeper learning curve due to more complex architecture
  • Requires more resources for deployment and operation

Code Comparison

Nuclio function example:

def handler(context, event):
    return context.Response(body='Hello, Nuclio!',
                            headers={},
                            content_type='text/plain',
                            status_code=200)

Fission function example:

def main():
    return "Hello, Fission!"

Both Nuclio and Fission are serverless frameworks for Kubernetes, but they have different approaches to function deployment and execution. Nuclio offers more advanced features and language support, while Fission focuses on simplicity and ease of use.

Nuclio provides a more comprehensive platform with built-in UI and advanced auto-scaling, making it suitable for complex serverless applications. However, this comes at the cost of a steeper learning curve and higher resource requirements.

Fission, on the other hand, offers a simpler architecture and easier deployment process, making it more accessible for beginners and smaller projects. It may lack some of the advanced features found in Nuclio but compensates with its lightweight nature and straightforward usage.

5,517

Kubernetes-based, scale-to-zero, request-driven compute

Pros of Knative Serving

  • More comprehensive ecosystem with broader industry adoption
  • Tighter integration with Kubernetes and cloud-native technologies
  • Supports advanced traffic management and autoscaling features

Cons of Knative Serving

  • Steeper learning curve and more complex setup
  • Requires more resources and overhead for smaller deployments
  • Less focused on specific serverless use cases compared to Fission

Code Comparison

Fission example:

def hello():
    return "Hello, World!"

Knative Serving example:

apiVersion: serving.knative.dev/v1
kind: Service
metadata:
  name: helloworld
spec:
  template:
    spec:
      containers:
        - image: gcr.io/knative-samples/helloworld-go
          env:
            - name: TARGET
              value: "World"

Fission focuses on simplicity and ease of use for serverless functions, while Knative Serving provides a more comprehensive platform for deploying and managing containerized applications. Fission's code is typically more concise and function-oriented, whereas Knative Serving uses Kubernetes-style YAML configurations for deployment and management.

Apache OpenWhisk is an open source serverless cloud platform

Pros of OpenWhisk

  • More mature and widely adopted serverless platform
  • Supports multiple programming languages and runtimes
  • Offers a rich ecosystem of integrations and extensions

Cons of OpenWhisk

  • More complex architecture and deployment process
  • Higher resource requirements for running the platform
  • Steeper learning curve for developers new to serverless

Code Comparison

OpenWhisk action example:

function main(params) {
    var name = params.name || 'World';
    return {payload: 'Hello, ' + name + '!'};
}

Fission function example:

def main():
    return "Hello, World!"

Both Fission and OpenWhisk are serverless platforms designed to run functions in response to events. Fission is more lightweight and Kubernetes-native, making it easier to deploy and manage in Kubernetes environments. OpenWhisk, on the other hand, offers a more comprehensive set of features and language support, but comes with increased complexity.

Fission focuses on simplicity and ease of use, with a straightforward function deployment process. OpenWhisk provides more advanced features like function composition and a built-in API gateway, but requires more setup and configuration.

In terms of code, Fission functions are typically simpler and more focused on Kubernetes integration, while OpenWhisk actions can be more complex and offer more flexibility in terms of input parameters and return values.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README


Fission: Serverless Functions for Kubernetes

Fission Licence Fission Releases go.dev reference Go Report Card Fission contributors Commit Activity
Fission website Fission slack Fission twitter GitHub Repo stars


Fission is an open-source, Kubernetes-native serverless framework that simplifies the deployment of functions and applications on Kubernetes. With Fission, developers can easily create and deploy serverless functions that can be triggered by a variety of events, such as HTTP requests, messages from a message queue, or scheduled tasks.

Fission provides a simple, easy-to-use interface for developers to create serverless functions in their language of choice, without having to worry about the underlying infrastructure. The framework also offers automatic scaling, so functions can scale up or down based on demand, without any additional configuration.

Fission operates on just the code: Docker and Kubernetes are abstracted away under normal operation, though you can use both to extend Fission if you want to.

Fission is extensible to any language; the core is written in Go, and language-specific parts are isolated in something called environments (more below). Fission currently supports NodeJS, Python, Ruby, Go, PHP, Bash, and any Linux executable, with more languages coming soon.

Table of Contents

Performance: 100msec cold start

Fission maintains a pool of "warm" containers that each contain a small dynamic loader. When a function is first called, i.e. "cold-started", a running container is chosen and the function is loaded. This pool is what makes Fission fast: cold-start latencies are typically about 100msec.

Kubernetes is the right place for Serverless

We're built on Kubernetes because we think any non-trivial app will use a combination of serverless functions and more conventional microservices, and Kubernetes is a great framework to bring these together seamlessly.

Building on Kubernetes also means that anything you do for operations on your Kubernetes cluster — such as monitoring or log aggregation — also helps with ops on your Fission deployment.

Getting Started

  # Add the stock NodeJS env to your Fission deployment
  $ fission env create --name nodejs --image fission/node-env

  # Create a function with a javascript one-liner that prints "hello world"
  $ fission function create --name hello --env nodejs --code https://raw.githubusercontent.com/fission/examples/master/nodejs/hello.js

  # Run the function.  This takes about 100msec the first time.
  $ fission function test --name hello
  Hello, world!

Learn More

Contributing

Check out the contributing guide.

Who is using Fission?

Sponsors

The following companies, organizations, and individuals support Fission's ongoing maintenance and development. If you are using/contributing to Fission, we would be happy to list you here, please raise a Pull request.

InfraCloud Srcmesh

License

Fission is licensed under the Apache License 2.0 - see the LICENSE file for details