[Paper Review] Snafu: Function-as-a-Service (FaaS) Runtime Design and Implementation
Snafu is an open-source, modular Function-as-a-Service (FaaS) runtime designed to host and execute Python and multi-language functions with low overhead and high performance. It enables rapid prototyping by supporting in-process execution and containerized deployment, achieving better cost-performance than AWS Lambda at high invocation rates, with utility scores up to 40.39 compared to AWS Lambda’s 5.02.
Snafu, or Snake Functions, is a modular system to host, execute and manage language-level functions offered as stateless (micro-)services to diverse external triggers. The system interfaces resemble those of commercial FaaS providers but its implementation provides distinct features which make it overall useful to research on FaaS and prototyping of FaaS-based applications. This paper argues about the system motivation in the presence of already existing alternatives, its design and architecture, the open source implementation and collected metrics which characterise the system.
Motivation & Objective
- To address the lack of flexible, easy-to-deploy FaaS runtimes for research and prototyping that are not constrained by commercial provider limitations.
- To design a modular, open-source FaaS system that supports both in-process and containerized execution with minimal configuration.
- To enable rapid prototyping and experimentation by reducing setup time to under ten minutes for basic functionality.
- To provide a competitive alternative to existing open-source and commercial FaaS runtimes with better performance-to-cost ratios at high workloads.
- To support the transition from monolithic to fine-grained function-based architectures in cloud-native and scientific computing workloads.
Proposed method
- Snafu uses a modular architecture to host functions as stateless units, supporting both in-process Python execution and external language functions via containers.
- It dynamically extracts callable functions from source code, enabling quick conversion of legacy codebases without explicit function registration.
- The system supports two deployment modes: in-process (Snafu IP) and Docker-based containerization (Snafu Docker), each with configurable authentication and isolation levels.
- Performance and cost metrics are collected using a benchmark function (fib(20)) across different configurations and cloud regions (us-west-1).
- A utility index is computed as cpm / (ppm × 1,000,000) to compare performance relative to cost, with ppm derived from either hourly or per-million-call pricing.
- Experiments compare Snafu’s cost and performance against AWS Lambda using real-world pricing and measured invocation rates.
Experimental results
Research questions
- RQ1Can a lightweight, open-source FaaS runtime be designed to support rapid prototyping with minimal setup overhead?
- RQ2How does the performance and cost efficiency of a self-hosted FaaS runtime compare to commercial offerings like AWS Lambda at varying invocation frequencies?
- RQ3To what extent can in-process execution improve performance and reduce cost compared to containerized execution in FaaS workloads?
- RQ4What are the trade-offs between isolation, authentication, and raw execution speed in a modular FaaS architecture?
- RQ5Can a FaaS system be built that supports both Python and multi-language functions with flexible deployment options while remaining competitive with commercial and open-source alternatives?
Key findings
- Snafu IP achieved a utility index of 40.39, significantly outperforming AWS Lambda’s 5.02, indicating superior performance-to-cost efficiency for high-frequency workloads.
- At over 260 million invocations per minute, Snafu deployments on EC2 surpassed AWS Lambda in cost efficiency, with the performance advantage growing at higher loads.
- The in-process execution mode of Snafu delivered the highest utility (40.39), while always-authenticated containerized execution had the lowest (16.07), highlighting the cost impact of authentication overhead.
- Snafu’s minimal setup time—achieving operational status within ten minutes after dependency installation—demonstrates its low-effort suitability for prototyping and research.
- The system supports dynamic function extraction from source code, enabling quick migration of legacy codebases into FaaS without explicit configuration.
- Despite its advantages, Snafu’s performance plateaus at high loads due to internal scalability constraints, and costs become prohibitive beyond ~600 million invocations per minute.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.