Elastic scaling is one of the central benefits provided by serverless platforms, and requires that they scale resource up and down in response to changing workloads. Serverless platforms scale-down resources by terminating previously launched instances (which are containers or processes). The serverless programming model ensures that terminating instances is safe assuming all application code running on the instance has either completed or timed out. Safety thus depends on the serverless platform's correctly determining that application processing is complete. In this paper, we start with the observation that current serverless platforms do not account for pending asynchronous I/O operations when determining whether application processing is complete. These platforms are thus unsafe when executing programs that use asynchronous I/O, and incorrectly deciding that application processing has terminated can result in data inconsistency when these platforms are used. We show that the reason for this problem is that current serverless semantics couple termination and response generation in serverless applications. We address this problem by proposing an extension to current semantics that decouples response generation and termination, and demonstrate the efficacy and benefits of our proposal by extending OpenWhisk, an open source serverless platform.
翻译:无服务器的升级是无服务器平台提供的核心好处之一, 要求它们根据工作量的变化, 向上和向下推广资源。 无服务器的平台通过终止先前发射的事件( 集装箱或流程) 缩小资源规模。 无服务器的编程模式确保终止事件是安全的, 假设所有运行于此实例的应用程序代码已经完成或超时。 因此, 安全取决于无服务器的平台正确确定应用程序处理完成。 在本文中, 我们首先指出, 在确定应用程序处理是否完成时, 目前的无服务器平台不会说明未完成的不同步 I/ O 操作。 因此, 这些平台在执行使用不同步 I/ O 程序时不安全, 错误地确定应用程序处理已经终止, 可能会在使用这些平台时造成数据不一致。 我们表明, 这一问题的原因是, 目前无服务器的断语式组合终止和响应生成在无服务器应用程序中。 我们通过提议扩展当前断层响应生成和终止的语系, 并通过扩展开放源服务器平台 OpenWhisk 来显示我们提案的效力和效益。