IEEE Access (Jan 2022)
TppFaaS: Modeling Serverless Functions Invocations via Temporal Point Processes
Abstract
Serverless computing is a cloud computing paradigm that allows developers to focus exclusively on business logic as cloud service providers manage resource management tasks. Serverless applications based on this model are often composed of several fine-grained and ephemeral Function-as-a-Service (FaaS) functions that implement complex business processes via mutual interaction and interaction with Backend-as-a-Services (BaaS) such as databases. FaaS functions suffer from the cold start problem because of the scale to zero instances feature. In this work, we use neural Temporal Point Processes (TPPs) to model function invocations in FaaS compositions. A probability distribution over the time and class of the following invocations for a given history of invocations is predicted using these probabilistic models. The prediction can avoid cold starts by scaling functions in advance and reduce network load by optimizing the function-server assignment. In this regard, we developed a python-based tool called TppFaaS on top of OpenWhisk open-source serverless platform. TppFaaS uses the neural TPPs LogNormMix for modeling the time using a log-normal mixture distribution and TruncNorm for predicting a single value for the time. Furthermore, we built a custom trace data collector for OpenWhisk embedded into TppFaaS and created datasets for multiple FaaS compositions to train and test our models. For datasets without cold starts, the models achieved for most compositions a mean absolute error below 22ms and a percentage of correctly predicted function classes above 94%.
Keywords