ClassiFaaS is a deployment and benchmarking tool for serverless functions across multiple cloud providers (AWS, Azure, GCP, and Alibaba Cloud). It enables performance evaluations of serverless functions and analysis of heterogeneous hardware impacts on function execution.
cmd: Main command-line applications for deployment and benchmarking.configs: Configuration files for deployment and benchmarking.configs/deployment.yaml: Main deployment configuration file.configs/generated.yaml: Auto-generated benchmark configuration file.- This file contains the same parameters as
deployment.yamland is used for benchmarking. - only the memory sizes specified in
deployment.yamlare included here. - Input sizes for benchmarks are added to the function URLs in this file. (serves as the benchmark config)
- This file contains the same parameters as
internal: Internal packages for deployment and benchmarking logic.credentials: Credential files for cloud provider access (GCP only).deployment: Cloud provider-specific deployment scripts and function code.deployment/shared: Benchmarks shared across all cloud providers.deployment/{provider}: Provider-specific deployment scripts and function implementations.deployment/{provider}/manage-deployment.sh: Interface between Go deployment code and provider-specific deployment commands. Start here if you need to modify deployment logic.
Install the following tools before getting started:
- Azure CLI and Azure Functions Core Tools
- Serverless Framework (AWS):
npm install -g serverless - gcloud CLI (GCP)
- Serverless Devs (Alibaba):
npm install -g @serverless-devs/s
Navigate to each cloud provider's deployment/{provider} directory and run:
npm installFor Alibaba Cloud, run npm install inside deployment/alibaba/code instead.
Ensure you have set up your cloud accounts and logged in via their respective CLIs.
- GCP: Place a service account key at
credentials/gcp_service_account.jsonwith permissions for function deployment and management. The benchmark uses this to obtain access tokens for invoking deployed functions. - Azure: Run
az loginand select the correct subscription.
Update configs/deployment.yaml to match your desired deployment configuration. This file will also containe the parameters for the generated benchmark config.
go run ./cmd/deploy deploygo run ./cmd/deploy generateThis creates configs/generated.yaml with parameters based on the deployment config.
Use the same configuration file used for deployment when removing resources:
go run ./cmd/deploy removeRun the benchmark with either the generated config or a custom file:
go run ./cmd/bench --config configs/generated.yamlWe recommend scheduling runs with cron. For example, to run every 6 hours:
0 */6 * * * /path/to/go run /path/to/ClassiFaaS/cmd/bench --config /path/to/ClassiFaaS/configs/generated.yamlAdjust paths as needed for your environment.