How edgerun/faas-sim works
Project type and purpose
• faas-sim is an open-source, trace-driven Function-as-a-Service (FaaS) simulation framework written in Python.
• It lets researchers and engineers model container-based serverless platforms, swap in custom scheduling, autoscaling, and load-balancing strategies, and collect detailed metrics on system behavior.
File structure
• Top‐level packaging:
• setup.py, requirements*.txt
• sim/ (core simulation engine)
• ext/raith21/ (optional Raith21 plugin modules: generators, resource monitors, oracles, function sims)
• examples/ (CLI‐driven usage examples)
• notebooks/ (Jupyter notebooks for interactive analysis)
• doc/ (Sphinx docs, high‐level architecture figure)
• sim/faas: implements the FaaS layer (function execution, scaling, watchdogs).
• sim/core: wraps SimPy, drives event loop, collects metrics, logs.
• sim/oracle: “ground truth” predictors and data generators for function durations.
• sim/net, sim/docker, sim/resource, sim/topology: model network, container runtime, hardware resources, and cluster topology via Ether.
README for additional insights
• High-level architecture:
• SimPy (discrete-event core)
• Ether (network simulation & topology builder)
• Skippy (default scheduler)
• Trace & profiling-data ingestion
• Plug-in points for scheduler/autoscaler/load-balancer