EasyFaaS is a stateless and high performance function computing service engine

EasyFaaS is a stateless and high performance function computing service engine

2022-09-14 0 854
Resource Number 38551 Last Updated 2025-02-24
¥ 0USD Upgrade VIP
Download Now Matters needing attention
Can't download? Please contact customer service to submit a link error!
Value-added Service: Installation Guide Environment Configuration Secondary Development Template Modification Source Code Installation

EasyFaaS recommended in this issue is a functional computing service engine with light dependence, strong adaptability, low resource consumption, stateless and high performance.

Features

  • Dependence light : EasyFaaS only relies on Linux kernel, does not rely on Docker, Kubernetes and other external services
  • Adaptive : EasyFaaS can run on a variety of system environments, including Docker, Kubernetes and bare metal
  • Less resource occupation : fewer modules, smaller service system module occupation
  • Stateless : Each EasyFaaS Pod itself is stateless and internally autonomous
  • High performance : Shorter scheduling links, less overhead, and better performance

For

  • Edge computing -Edge
  • Internet of Things -IoT
  • CICD
  • Privatization
  • CDN

Fast start

Based on Linux (kernel 4.0+), pre-installed docker provides two ways for developers to get started quickly:

    • Mode 1: Run in all-in-one mode
    • Method 2: Run

with docker-compose

  • Method 3: Compile, package and deploy

Method 1: Run in all-in-one mode

Compile

Compile all modules Note: If you are in a linux environment or do not need to compile individual modules, just run the command 1.1

$ make

Cross-compile for other platforms:

$ KUN_BUILD_PLATFORMS="linux/amd64" make

Compile only one module:

$ make WHAT=./pkg/controller

Packing

$ scripts/build-image.sh -h
Usage: scripts/build-image.sh [OPTIONS]
-h --help 
-m= --module= module name 
-i= --image= image name 
-t= --tag= mirror tag 
-e= --env= deployment environment (mirroring repository configuration) 

Package the all-in-one image, which will contain the controller component, funclet component, and stubs component. Note that the runtime is not currently open source, directly pull the image can be executed:

$ scripts/build-image.sh -m=one -i=easyfaas -t=dev

If you need to publish a packaged image, you need to specify REGISTRY, such as

$REGISTRY=registry.baidubce.com/< your_namespace> / ./scripts/build-image.sh -m=one -i=easyfaas  -t=dev

< Upload image

If on the local machine, otherwise need to upload the image

docker push [OPTIONS] NAME[:TAG]
Such as:
docker push registry.baidubce.com/< your_namespace> /< your_image_name> :< your_image_tag> 

Start service

export faasPath=/< your_path_prefix> /easyfaas/faas

#runner runtime please download the image directly 
docker run -td -e WITHRUNNER=1 -e WITHNODEJS10=1  -e  WITHNODEJS12=1 -e WITHPYTHON3=1 --name runner-runtime  -v ${faasPath}/runtime:/var/faas/runtime -v ${faasPath}/runner:/var/faas/runner  registry.baidubce.com/easyfaas-public/runner-runtime:demo1.0

# Start all-in-one service 
docker run -td --privileged -v ${faasPath}/runner:/var/faas/runner -v ${faasPath}/runtime:/var/faas/runtime -v ${faasPath}/data:/var/faas/runner-data --name easyfaas  registry.baidubce.com/easyfaas-public/all-in-one:demo1.0

Operation run

After the installation is complete, run the following command to enter the container:

$ docker exec -it easyfaas bash

Method 2: Run the easyfaas service locally with docker-compose

Ensure the normal operation of the local Docker service. Because the underlying of the easyfaas service depends on the underlying linux features such as cgroup/loop devices, it is recommended that the Linux system be preferred.

easyfaas component image

As described in the overall architecture diagram, easyfaas is composed of 4 components, namely controller component, funclet component, runner runtime component, And FUN-Registry, a native code repository built by the stubs module.

You can directly use the public image released by easyfaas. If the local computer cannot access the public network, you can download and store the image file in the tar file from the server that can access the external network environment, and then load the tar file to the server without public network.

< Running easyfaas service

The main configuration is in the./scripts/docker-compose/compose-local/.env file, where

  • CONTROLLER_EXPORT_PORT: Service port exposed by the controller component
  • REGISTRY_EXPORT_PORT : Service port of mock native function code repository service component
  • FUNCTION_DATA_DIR: local function code directory
  • easyfaas_REPO : mirror warehouse repo
  • CONTROLLER_TAG : controller component image tag, the full image ID is {easyfaas_REPO}/controller:{{easyfaas_REPO}/controller:{CONTROLLER_TAG}
  • FUNCLET_TAG : funclet component image tag, full image ID is {easyfaas_REPO}/mini-funclet:{{easyfaas_REPO}/mini-funclet:{CONTROLLER_TAG}
  • RUNTIME_TAG: The runner runtime component image tag, the full image ID is {easyfaas_REPO}/runner runtime:{{easyfaas_REPO}/runner runtime:{CONTROLLER_TAG}
  • REGISTRY_TAG: Local mock function repository component tag, full image ID {easyfaas_REPO}// fun-registry :{{easyfaas_REPO}// fun-registry :{CONTROLLER_TAG}
# env file configuration example 
$ cat ./scripts/docker-compose/compose-local/.env
CONTROLLER_EXPORT_PORT=8899
REGISTRY_EXPORT_PORT=8002
FUNCTION_DATA_DIR=/tmp/funcData
easyfaas_REPO=registry.baidubce.com/easyfaas-public
CONTROLLER_TAG = demo1.0
FUNCLET_TAG = demo1.0
RUNTIME_TAG = demo1.0
REGISTRY_TAG = demo1.0 < / code > < / pre >

Start service

Run the following command to start the service and run docker ps to see if the component is running correctly: The controller component container, funclet component container and FUN-Registry component container are resident containers. Check whether the containers work properly

# Start service
$ cd ./scripts/docker-compose/compose-local/
$ sh app_control.sh start

# Check service
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5bec1b3fd3e4 controller:demo1.0 "./controller --maxproc…" 3 days ago Up 3 days minikun_minikun_1
8b6b1f6d2b1d mini-funclet:demo1.0 "./funclet --logtost…" 3 days ago Up 3 days minikun_funclet_1
5082b7249d28 func-registry:demo1.0 "/stubs --port=8002 …" 3 days ago Up 3 days minikun_registry_1

$Check whether the service is running properly

Core function

EasyFaaS is a stateless and high performance function computing service engine插图

Technical architecture

EasyFaaS is a stateless and high performance function computing service engine插图1

General view

Core Module description

controller

Responsible for traffic scheduling and container pool status management.

  • Implement the container scheduling function.
  • Supports concurrency at the configuration function level.
  • Support container status management, scheduling container status by policy.
  • Supports health check and cooldown/reborn can be determined according to runtime status.

funclet

Manage user work containers, including basic container resources and function run resources.

  • Container management: implements the init/warmup/reset process for containers.
  • Network management: realize functions related to container networks and manage network resources reasonably.
  • Mount management: Realize dynamic mount of user containers, and periodically reclaim the mount directory of user containers.
  • Process management: properly manage the child processes generated by the user container and handle the child processes that exit unexpectedly.
  • Resource capacity management: dynamically adjust the memory resources of the user’s working container.

runner-runtime

runner is responsible for managing the runtime of user functions. Runtime supports the runtime of various development languages. Currently, this component only provides container image

.

资源下载此资源为免费资源立即下载
Telegram:@John_Software

Disclaimer: This article is published by a third party and represents the views of the author only and has nothing to do with this website. This site does not make any guarantee or commitment to the authenticity, completeness and timeliness of this article and all or part of its content, please readers for reference only, and please verify the relevant content. The publication or republication of articles by this website for the purpose of conveying more information does not mean that it endorses its views or confirms its description, nor does it mean that this website is responsible for its authenticity.

Ictcoder Free source code EasyFaaS is a stateless and high performance function computing service engine https://ictcoder.com/kyym/easyfaas-is-a-stateless-and-high-performance-function-computing-service-engine.html

Share free open-source source code

Q&A
  • 1, automatic: after taking the photo, click the (download) link to download; 2. Manual: After taking the photo, contact the seller to issue it or contact the official to find the developer to ship.
View details
  • 1, the default transaction cycle of the source code: manual delivery of goods for 1-3 days, and the user payment amount will enter the platform guarantee until the completion of the transaction or 3-7 days can be issued, in case of disputes indefinitely extend the collection amount until the dispute is resolved or refunded!
View details
  • 1. Heptalon will permanently archive the process of trading between the two parties and the snapshots of the traded goods to ensure that the transaction is true, effective and safe! 2, Seven PAWS can not guarantee such as "permanent package update", "permanent technical support" and other similar transactions after the merchant commitment, please identify the buyer; 3, in the source code at the same time there is a website demonstration and picture demonstration, and the site is inconsistent with the diagram, the default according to the diagram as the dispute evaluation basis (except for special statements or agreement); 4, in the absence of "no legitimate basis for refund", the commodity written "once sold, no support for refund" and other similar statements, shall be deemed invalid; 5, before the shooting, the transaction content agreed by the two parties on QQ can also be the basis for dispute judgment (agreement and description of the conflict, the agreement shall prevail); 6, because the chat record can be used as the basis for dispute judgment, so when the two sides contact, only communicate with the other party on the QQ and mobile phone number left on the systemhere, in case the other party does not recognize self-commitment. 7, although the probability of disputes is very small, but be sure to retain such important information as chat records, mobile phone messages, etc., in case of disputes, it is convenient for seven PAWS to intervene in rapid processing.
View details
  • 1. As a third-party intermediary platform, Qichou protects the security of the transaction and the rights and interests of both buyers and sellers according to the transaction contract (commodity description, content agreed before the transaction); 2, non-platform online trading projects, any consequences have nothing to do with mutual site; No matter the seller for any reason to require offline transactions, please contact the management report.
View details

Related Article

make a comment
No comments available at the moment
Official customer service team

To solve your worries - 24 hours online professional service