GithubHelp home page GithubHelp logo

baidu / easyfaas Goto Github PK

View Code? Open in Web Editor NEW
617.0 22.0 68.0 1.26 MB

EasyFaaS是一个依赖轻、适配性强、资源占用少、无状态且高性能的函数计算服务引擎

License: Apache License 2.0

Makefile 0.25% Shell 5.91% Go 93.77% Dockerfile 0.08%

easyfaas's Introduction

EasyFaaS

License

简介

EasyFaaS是一个依赖轻、适配性强、资源占用少、无状态且高性能的函数计算服务引擎。它有以下几个特点:

  • 依赖轻:EasyFaaS只依赖Linux内核,不强制依赖Docker、Kubernetes等外部服务

  • 适配性强:EasyFaaS可以运行在多种系统环境,包括Docker、Kubernetes及裸机等

  • 资源占用少:模块少,服务系统模块占用更小

  • 无状态:每个EasyFaaS Pod本身无状态且内部自治

  • 高性能:调度链路更短,更小的系统开销和更优的性能

适用于:

  • 边缘计算-Edge

  • 物联网-IoT

  • CICD

  • 私有化

  • CDN

使用手册

快速开始

开发手册

质量测试

引擎测评

核心功能

easyfaas_func

  • 提供基于事件机制,按需弹性伸缩的计算能力。

  • 支持多种语言运行时,开发者只需使用适合的语言编写自定义函数,无需管理底层基础设施。

  • 负责用户容器的全生命周期管理。

  • 支持用户配置函数的容器资源容量,提供动态的容器容量调度。

  • 支持同步和异步两种调用模式,支持多种可扩展的事件触发器。

  • 支持可自定义的函数管理服务。

  • 支持自定义语言运行时。

  • 支持多种运行平台,包括Docker、Kubernetes及裸机等。

技术架构

架构图

faaster_arch EasyFaaS以单Pod为最小服务单位,每个Pod中包含3个容器,分别为controller、funclet和runner-runtime。其中runner-runtime仅为init容器,准备必要的资源后即退出。

模块说明

1. 核心组件

1.1 controller

负责流量调度及容器池状态管理。

  • 实现容器调度功能。
  • 支持配置函数级别的并发。
  • 支持容器状态管理,按策略调度容器状态。
  • 支持健康检查,可以根据runtime的状态决定cooldown/reborn。

1.2 funclet

负责管理用户工作容器,包括基础容器资源及函数运行资源。

  • 容器管理:实现容器的init/warmup/reset流程。
  • 网络管理:实现容器网络相关功能,合理管理网络资源。
  • 挂载管理:实现用户容器的动态挂载,并定期回收用户容器的挂载目录。
  • 进程管理:需妥善管理用户容器产生的子进程,处理异常退出的子进程。
  • 资源容量管理:实现用户工作容器的内存资源动态调整。

1.3 runner-runtime

runner负责管理用户函数运行时,runtime支持各开发语言运行时,目前该组件当前仅提供容器镜像。

2. 可插拔组件

2.1 httptrigger组件 核心功能:扩展函数触发方式,支持HTTP请求触发函数调用 HTTP触发器实现了将某个函数关联到一个 URL 上,它可以接收 HTTP 请求,根据 HTTP 方法、URL,找到匹配的函数将 HTTP 相关信息传入并执行函数,获取执行结果,将函数执行结果包装为 HTTP 返回响应。

2.2 stubs组件 核心功能: 提供本地函数代码存储服务

  • 存储用户函数到本地工作目录

  • 支持直接调用本地函数代码

贡献

issues贡献: 如在使用中遇到问题,请在 https://github.com/baidu/EasyFaaS/issues 新建 issues 反馈问题。

维护者

版本更新

  • 1.0.0 EasyFaaS第一版发布,具备常用的函数管控、容器管理和调度、事件机制等功能;

讨论

如果您有任何意见或问题都可以提issue到github或gitee,我们将及时为您解答。

如在使用中遇到问题,快速沟通,可微信扫描二维码,加入EasyFaaS技术交流群,添加下列管理员微信,并备注“EasyFaaS”,管理员邀您入群

easyfaas's People

Contributors

davaddi avatar flyingfang avatar sns1988 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

easyfaas's Issues

demo run error Invalid caller id

system:
Centos7 Linux kernel 5.14
Docker 20.10.7
EasyFaas tag demo1.0

error log:

 curl -X "POST" "http://127.0.0.1:8001/v1/functions/brn:cloud:faas:bj:8f6e5a28c663957ea0452tion:testHelloWorld:1/invocations"   -H 'X-easyfaas-Account-Id: df391b08c64c426a81645468c75163a5'      -H 'Content-Type: application/json; charset=utf-8'      -d $'{}'
{"Code":"InvalidInvokeCallerException","Cause":"owner id df391b08c64c426a81645468c75163a5 caller id ","Message":"Invalid caller id","Status":403,"Type":"User"}

Pod 如何水平扩缩容?

image
架构图里画的是一个Pod 有两个疑问,辛苦帮忙答疑一下:
1、Pod 是如何水平扩缩的呢?流量增高,一个Pod 不足以处理请求时,Pod 是如何水平扩容的呢?
2、Pod 内部funclet container 里创建的多个runtime container 虽然是动态扩缩的,但是,Pod 资源大小已经占用了,不论里面的runtime container 是增加还是减少 Pod 占用的资源好像是一样的。是怎么节省资源的呢?

多谢答疑。

Run as docker-compose by use sample but failed for "manifest unknown"

Thank you for your feedback. I have resolved the problem. Please try it again.

Originally posted by @flyingfang in #4 (comment)
I just want to use the sample image to run EasyFaas, still not work.
What is the correct image tag?
"registry.baidubce.com/easyfaas-public/mini-funclet:demo1.0" is not correct/exist.

[root@KSSHUAT00850 /opt/EasyFaaS/scripts/docker-compose/compose-local]# sh app_control.sh start
Pulling funclet (registry.baidubce.com/easyfaas-public/mini-funclet:demo1.0)...
ERROR: manifest for registry.baidubce.com/easyfaas-public/mini-funclet:demo1.0 not found: manifest unknown: manifest unknown

pull access denied for registry.baidubce.com/easyfaas-public/runner-runtime

According to "getting-started-docker-compose.md",
When I use the command "sh app_control.sh start"
I get the information as:
Pulling runtime (registry.baidubce.com/easyfaas-public/runner-runtime:demo1.0)...
ERROR: The image for the service you're trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing.

Continue with the new image? [yN]y
Pulling runtime (registry.baidubce.com/easyfaas-public/runner-runtime:demo1.0)...
ERROR: pull access denied for registry.baidubce.com/easyfaas-public/runner-runtime, repository does not exist or may require 'docker login': denied: requested accessto the resource is denied

A new WebAssembly runtime

Would you consider supporting the WebAssembly runtime, eg SSVM, on the EasyFaaS platform? WebAssembly runtime is a good match for running Rust functions. The primary use cases for server-side WebAssembly and Rust functions are high-performance applications and untrusted code in the cloud.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.