Freyr implementation on top of OpenWhisk: Accelerating Serverless Computing by Harvesting Idle Resources.
Serverless computing automates fine-grained resource scaling and simplifies the development and deployment of online services with stateless functions. However, it is still non-trivial for users to allocate appropriate resources due to various function types, dependencies, and input sizes. Misconfiguration of resource allocations leaves functions either under-provisioned or over-provisioned and leads to continuous low resource utilization. This paper presents Freyr, a new resource manager (RM) for serverless platforms that maximizes resource efficiency by dynamically harvesting idle resources from over-provisioned functions to under-provisioned functions. Freyr monitors each function’s resource utilization in real-time, detects over-provisioning and under-provisioning, and learns to harvest idle resources safely and accelerates functions efficiently by applying deep reinforcement learning algorithms along with a safeguard mechanism. We have implemented and deployed a Freyr prototype in a 13-node Apache OpenWhisk cluster. Experimental results show that 38.8% of function invocations have idle resources harvested by Freyr, and 39.2% of invocations are accelerated by the harvested resources. Freyr reduces the 99th-percentile function response latency by 32.1% compared to the baseline RMs.
OpenWhisk is a serverless functions platform for building cloud applications. OpenWhisk offers a rich programming model for creating serverless APIs from functions, composing functions into serverless workflows, and connecting events to functions using rules and triggers. Learn more at http://openwhisk.apache.org.
- Quick Start (Deploy and Use OpenWhisk on your machine)
- Deploy to Kubernetes (For development and production)
- For project contributors and Docker deployments:
- Learn Concepts and Commands
- OpenWhisk Community and Support
- Project Repository Structure
The easiest way to start using OpenWhisk is to install the "Standalone" OpenWhisk stack. This is a full-featured OpenWhisk stack running as a Java process for convenience. Serverless functions run within Docker containers. You will need Docker, Java and Node.js available on your machine.
To get started:
git clone https://github.com/apache/openwhisk.git
cd openwhisk
./gradlew core:standalone:bootRun
-
When the OpenWhisk stack is up, it will open your browser to a functions Playground, typically served from http://localhost:3232. The Playground allows you create and run functions directly from your browser.
-
To make use of all OpenWhisk features, you will need the OpenWhisk command line tool called
wsk
which you can download from https://s.apache.org/openwhisk-cli-download. Please refer to the CLI configuration for additional details. Typically you configure the CLI for Standalone OpenWhisk as follows:
wsk property set \
--apihost 'http://localhost:3233' \
--auth '23bc46b1-71f6-4ed5-8c54-816aa4f8c502:123zO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP'
- Standalone OpenWhisk can be configured to deploy additional capabilities when that is desirable. Additional resources are available here.
OpenWhisk can also be installed on a Kubernetes cluster. You can use a managed Kubernetes cluster provisioned from a public cloud provider (e.g., AKS, EKS, IKS, GKE), or a cluster you manage yourself. Additionally for local development, OpenWhisk is compatible with Minikube, and Kubernetes for Mac using the support built into Docker 18.06 (or higher).
To get started:
git clone https://github.com/apache/openwhisk-deploy-kube.git
Then follow the instructions in the OpenWhisk on Kubernetes README.md.
Browse the documentation to learn more. Here are some topics you may be interested in:
- System overview
- Getting Started
- Create and invoke actions
- Create triggers and rules
- Use and create packages
- Browse and use the catalog
- OpenWhisk system details
- Implementing feeds
- Developing a runtime for a new language
Report bugs, ask questions and request features here on GitHub.
You can also join the OpenWhisk Team on Slack https://openwhisk-team.slack.com and chat with developers. To get access to our public Slack team, request an invite https://openwhisk.apache.org/slack.html.
The OpenWhisk system is built from a number of components. The picture below groups the components by their GitHub repos. Please open issues for a component against the appropriate repo (if in doubt just open against the main openwhisk repo).