Fission - Serverless Framework For Kubernetes
Fission introduction and demonstration
Slides
- 2018 Google Cloud Platform User Group Taiwan #41
- 2018 Kubernetes Seminar
Fission introduction and demonstration
At Part 2, we knew what’s real payload was passed to function and how to create a serverless guesbook. In the last post, we will go through the final bank sample and know how to deploy a application to different fission clusters.
In this section, we use a more complex bank sample to demonstrate how to use AJAX interacts with fission functions.
Part 1 we talked about the advantage of adopting fission as serverless framework on kubernetes, basic concept of around fission core and how to create a simple HelloWorld example with fission.
In this post we’ll dive deeper to see what’s the payload of a HTTP request being passed to user function and learn how to create a guestbook application consists with REST functions in Golang.
Before we diving into code, we first need to understand what exactly happened inside Fission. Here is a brief diagram describes how requests being sent to function inside Kubernetes cluster.
The requests will first come to the router
and it checks whether the destination URL
and HTTP method
are registered by http trigger
.
Once both are matched, router will then proxy request to the function pod (a pod specialized with function pointed by http trigger) to get response from it; reject, otherwise.
When users try to develop serverless applications, they often choose to start with serverless services offered on public clouds, like AWS Lambda or Google Cloud Functions. However, users may encounter following problems after application development:
Fission is a serverless framework built on top of Kubernetes. Here are some benefits for adopting Fission as serverless solution to develop a severless application:
Portability
spec
files.Support rich event sources
Rich Environment (Language) supportability
Build automation
After seeing these advantages for adopting Fission as serverless framework, you may feel exciting and start wondering how to create a serverless applciation with Fission. Let’s dive into the concepts of fission first.
Tutorial for how to integrate Fission with Istio
Fission is a framework for serverless functions on Kubernetes. Istio is an open platform to connect, manage, and secure microservice announced by Google, IBM and Lyft. It makes sense to combine them together to provide user more powerful functionalities.
Since this is the very first step for fission to integrate with Istio, there are still couple problems need to be solved. For those interested in trying to integrate fission with istio, following is the set up tutorial.
Available zone can be found here
$ export ZONE=<zone name>
$ gcloud container clusters create istio-demo-1 \
--machine-type=n1-standard-2 \
--num-nodes=1 \
--no-enable-legacy-authorization \
--zone=$ZONE \
--cluster-version=1.9.2-gke.1