Elasticity is fundamental to cloud computing, as it enables quickly allocating resources to match the demand of each workload as it arrives, rather than pre-provisioning resources to meet performance objectives. However, even serverless platforms -- which boot sandboxes in 10s to 100s of milliseconds -- are not sufficiently elastic to avoid over-provisioning expensive resources. Today's FaaS platforms rely on pre-provisioning many idle sandboxes in memory to reduce the occurrence of slow, cold starts. A key obstacle for high elasticity is booting a guest OS and configuring features like networking in sandboxes, which are required to expose an isolated POSIX-like interface to user functions. Our key insight is that redesigning the interface for applications in the cloud-native era enables co-designing a much more efficient and elastic execution system. Now is a good time to rethink cloud abstractions as developers are building applications to be cloud-native. Cloud-native applications typically consist of user-provided compute logic interacting with cloud services (for storage, AI inference, query processing, etc) exposed over REST APIs. Hence, we propose Dandelion, an elastic cloud platform with a declarative programming model that expresses applications as DAGs of pure compute functions and higher-level communication functions. Dandelion can securely execute untrusted user compute functions in lightweight sandboxes that cold start in hundreds of microseconds, since pure functions do not rely on extra software environments such as a guest OS. Dandelion makes it practical to boot a sandbox on-demand for each request, decreasing performance variability by two to three orders of magnitude compared to Firecracker and reducing committed memory by 96% on average when running the Azure Functions trace.
翻译:弹性是云计算的基础,它使得能够快速分配资源以匹配每个工作负载到达时的需求,而非预先配置资源来满足性能目标。然而,即使是能在数十到数百毫秒内启动沙箱的无服务器平台,其弹性也不足以避免过度配置昂贵资源。当今的FaaS平台依赖于在内存中预先配置大量空闲沙箱,以减少缓慢冷启动的发生。实现高弹性的一个关键障碍在于启动客户操作系统并在沙箱中配置网络等功能,这些是向用户函数提供隔离的类POSIX接口所必需的。我们的核心见解是:为云原生时代的应用程序重新设计接口,使得能够协同设计一个更高效、更具弹性的执行系统。随着开发者正构建云原生应用,现在是重新思考云抽象的良好时机。云原生应用通常由用户提供的计算逻辑与通过REST API暴露的云服务(用于存储、AI推理、查询处理等)交互构成。因此,我们提出了Dandelion,这是一个具有声明式编程模型的弹性云平台,它将应用程序表达为纯计算函数和高级通信函数的有向无环图。由于纯函数不依赖于额外的软件环境(如客户操作系统),Dandelion能够在数百微秒内冷启动的轻量级沙箱中安全执行不可信的用户计算函数。Dandelion使得为每个请求按需启动沙箱变得切实可行,与Firecracker相比,其性能波动降低了二到三个数量级,并且在运行Azure Functions跟踪时,平均减少了96%的承诺内存。