Fission: A Deep Dive Into Serverless Kubernetes Frameworks (2)

Background

Introduction to Fission

Core Concepts

Key Components

Mechanism Explanation

Function Executor

PoolManager

fission environment create --name python --image fission/python-env
fission function create --name hello --env python --code hello.py --executortype poolmgr

NewDeploy

fission fn create --name hello --env python --code hello.py --executortype newdeploy --minscale 1 --maxscale 3 --targetcpu 50
i. When minscale is greater than 0, NewDeploy immediately creates the service, deployment, and HPA for this function. Pods are managed by deployment, and every pod that runs this function will be specialized.
ii. When minscale is less than 0, the resources will not be created until the function is actually triggered.

Comparison between PoolManager and NewDeploy

Summary

Pod Specialization

  • Fetcher: downloads user functions and places them into a shared volume. Different language environments use different fetcher images. For more information about how fetcher works, see fetcher.go.
  • Env: the carrier that runs the user function. After Env loads a user function from the shared volume, it can receive user requests.

Trigger

HTTP Trigger

fission httptrigger create --url /echo --method GET --function hello --createingress --host example.com
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
# The name of the ingress project
name: xxx
...
spec:
rules:
- host: example.com
http:
paths:
- backend:
# Point to the router service
serviceName: router
servicePort: 80
# Access path
path: /echo

Time Trigger

fission tt create --name halfhourly --function hello --cron "*/30 * * * *"
trigger 'halfhourly' created

Message Queue Trigger

fission mqt create --name hellomsg --function hello --mqtype kafka --topic input --resptopic output --errortopic error

Summary

Auto-Scaling

fission fn create --name hello --env python --code hello.py --executortype newdeploy --minmemory 64 --maxmemory 128 --minscale 1 --maxscale 6 --targetcpu 50
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
labels:
executorInstanceId: xxx
executorType: newdeploy
functionName: hello
...
# The name of the HPA
name: hello-${executorInstanceId}
# The namespace where the HPA is located
namespace: fission-function
...
spec:
# The maximum number of replicas allowed
maxReplicas: 6
# The minimum number of replicas allowed
minReplicas: 1
# The target that is associated with this HPA
scaleTargetRef:
apiVersion: extensions/v1beta1
kind: Deployment
name: hello-${executorInstanceId}
# The CPU usage of the target
targetCPUUtilizationPercentage: 50

Summary

Log Processing

Summary

Summary: Kubeless vs. Fission

Reference

--

--

--

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Subdomains Enumeration: what is, how to do it, monitoring automation using webhooks and…

COMPOSICIONES A COLOR

Querying ApsaraDB for RDS with Data Lake Analytics

How to Create an SSL VPN server on Alibaba Cloud in 15 Minutes

Tips on Writing Good API Docs

The initial issuance of NT on BSC is completed

What engineers can learn from dancing

My Internship Journey So Far — Part 1

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alibaba Cloud

Alibaba Cloud

Follow me to keep abreast with the latest technology news, industry insights, and developer trends. Alibaba Cloud website:https://www.alibabacloud.com

More from Medium

Cassandra Monitoring Setup Using Open Source Tools

Solutions for Operation not permitted error when Postgresql is running on Docker using Vagrant’s…

AWS ElastiCache(Redis) With TLS

How to Connect Elastic Sink Connector with Kafka