0% found this document useful (0 votes)
20 views

On-Premises Serverless Computing For Event-Driven Data Processing Applications

This document introduces an open-source framework called OSCAR that enables on-premises serverless computing for event-driven data processing applications. OSCAR features automated provisioning of an elastic Kubernetes cluster, deployment of a FaaS framework and data storage backend that triggers events on file uploads, and services to orchestrate function creation and provide a GUI interface.

Uploaded by

Rejnis Spaho
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

On-Premises Serverless Computing For Event-Driven Data Processing Applications

This document introduces an open-source framework called OSCAR that enables on-premises serverless computing for event-driven data processing applications. OSCAR features automated provisioning of an elastic Kubernetes cluster, deployment of a FaaS framework and data storage backend that triggers events on file uploads, and services to orchestrate function creation and provide a GUI interface.

Uploaded by

Rejnis Spaho
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

On-premises Serverless Computing for

Event-Driven Data Processing Applications


Alfonso Pérez, Sebastián Risco, Diana Marı́a Naranjo, Miguel Caballer, Germán Moltó
Instituto de Instrumentación para Imagen Molecular (I3M).
Centro mixto CSIC - Universitat Politècnica de València
Camino de Vera s/n, 46022 Valencia, España
Email: [email protected], [email protected],{serisgal,dnaranjo,micafer1}@i3m.upv.es

Abstract—The advent of open-source serverless computing a customized execution environment provided by a Linux
frameworks has introduced the ability to bring the Functions- container. Although sometimes used interchangeably, FaaS
as-a-Service (FaaS) paradigm for applications to be executed on- typically represents a subset of Serverless computing, a trend
premises. In particular, data-driven scientific applications can
benefit from these frameworks with the ability to trigger scalable based on creating application architectures that entirely rely on
computation in response to incoming workloads of files to be Cloud services that provide automated resource provisioning
processed. This paper introduces an open-source framework to on behalf of (and transparent to) the user. Thus, by not
achieve on-premises serverless computing for event-driven data explicitly managing servers, developers can focus on the
processing applications that features: i) the automated provision- definition of the application logic instead of devoting time
ing of an elastic Kubernetes cluster that can grow and shrink, in
terms of the number of nodes, on multi-Clouds; ii) the automated to infrastructure provision, configuration and scalability. The
deployment of a FaaS framework together with a data storage SPEC Cloud Group [1] defines three key features of serverless
back-end that triggers events upon file uploads; iii) a service cloud architectures: i) granular billing: the user is only charged
that provides a REST API to orchestrate the creation of such when the application is running; ii) minimal operational logic:
functions and iv) a graphical user interface that provides a unified the Cloud provider is responsible for resource management
entry point to interact with the aforementioned services. Together,
this provides a framework to deploy a computing platform and autoscaling and iii) event-driven: short-lived execution of
to create highly-parallel event-driven file-processing serverless functions in response to events.
applications that execute on customized runtime environments Public Cloud providers include in their portfolios services to
provided by Docker containers that run on an elastic Kubernetes support FaaS. As an example, Amazon Web Services (AWS)
cluster. The usefulness of this framework is exemplified by provides AWS Lambda, a service that can run thousands of
means of the execution of a data-driven workflow for optimised
object detection on video. The workflow is tested under three parallel invocations to user-defined functions in response to
different workloads which process ten, a hundred and a thousand multiple sources of events, such as an HTTP request, a file
functions. The results show that the presented architecture is able upload to an Amazon S3 bucket (an object-based data store)
to process such workloads taking advantage of its elasticity to or a message sent to Amazon SQS, a service to create elastic
make a sensible usage of the resources. message queues. Notwithstanding the large elasticity, several
Index Terms—Cloud Computing; Scientific Computing; Dis-
tributed Infrastructures; Containers; Docker; important limitations are currently exhibited by AWS Lambda.
The maximum execution time is restricted to 15 minutes;
I. I NTRODUCTION the ephemeral storage space available to the invocations of
a Lambda function is restricted to 512 MB and, finally,
Cloud computing has introduced the ability to provide a
the runtime environments are pre-defined depending on the
wide variety of well-known service models such as Infras-
programming language used to code the Lambda functions.
tructure as a Service (IaaS), Platform as a Service (PaaS)
Previous work from the authors introduced SCAR (Server-
and Software as a Service (SaaS). The increased levels of
less Container-aware ARchitectures) [2] a framework to trans-
automation together with the advent of lightweight workload
parently execute containers out of Docker images in AWS
isolation mechanisms introduced by Linux containers paved
Lambda, in order to run generic applications on that platform
the way for the rise of the Functions as a Service (FaaS)
(for example image and video manipulation tools such as
service model. This approach involves invoking user-defined
ImageMagick and FFmpeg or deep learning frameworks such
functions, coded in certain supported programming languages
as Theano and Darknet) and code in virtually any program-
in response to events that are triggered in a computing
ming language (for example Ruby, R, Erlang and Elixir). This
and data storage infrastructure and that are typically run on
allowed to introduce a High Throughput Computing model [3]
The authors would like to thank the Spanish “Ministerio de Economı́a, to create highly-parallel event-driven file-processing serverless
Industria y Competitividad” for the project “BigCLOE” under grant reference applications that execute on customized runtime environments
TIN2016-79951-R. This development is partially funded by the EGI Strategic provided by Docker containers run on AWS Lambda. SCAR
and Innovation Fund and by the Primeros Proyectos de Investigación (PAID-
06-18), Vicerrectorado de Investigación, Innovación y Transferencia de la provided a convenient approach to run generic applications
Universitat Politècnica de València (UPV), València, Spain. on AWS Lambda and was rapidly adopted by the community
(more than 400 stars on GitHub) and it is featured in the Cloud also introduced LAmbdaPACK a domain-specific language to
Native Computing Foundation’s Serverless Landscape [4]. implement linear algebra algorithms that are highly parallel,
However, the limited ephemeral storage in AWS Lambda assessing the increased compute efficiency achieved and high-
and the rise of on-premises FaaS offerings revealed the need lighting the limitations of the Cloud provider. In fact, the work
to support scalable event-driven computing for data-processing by Spillner et al. [9] assesses the benefits of adopting server-
scientific applications in an on-premises environment. To this less computing for multiple scientific domains: mathematics,
aim, this paper introduces OSCAR (Open Source Serverless computer graphics, cryptology and meteorology, using both
Computing for Data-Processing Applications)1 a framework to public Cloud providers and self-hosted FaaS runtimes. The
efficiently support on-premises FaaS (Functions as a Service) work by Giménez-Alventosa et al. [10] uses AWS Lambda to
for general-purpose file-processing computing applications. execute highly-parallel MapReduce jobs.
The goal is to facilitate the adoption of event-driven compu- Authors such as Baldini et al. [11] address the problem
tation for scientific applications that require processing data of function composition entirely performed by serverless
files. This is achieved by providing users with the ability functions. Indeed, they demonstrate that function composition
to self-deploy an scalable integrated platform to be accessed in serverless applications is achievable but exhibit several
by simple graphical user interfaces to define and manage constraints to be considered such as avoiding double billing,
the complete life cycle of functions that will be efficiently adopting a substitution principle and treating the functions as
triggered upon users uploading files to specified folders. black boxes.
We aim to abstract away the details concerning the definition The work by Adam Eivy [12] warns about the economic
of jobs to be executed, the sources of events, the management benefits of serverless computing, which strongly depends on
of the resource contention, the management of the job outputs the usage patterns and application workloads. Even though
and, specially, the deployment of the entire platform across the pricing of services such as AWS Lambda are billed in the
multi-Clouds, including both on-premises Cloud Management fraction of 100ms of execution time, these can rapidly add
Platforms (CMP) such as OpenNebula [5] and OpenStack [6] up to surpass the cost of traditional computing approaches
and public Cloud providers as well. Users should be able to involving virtual machines or even dedicated hardware.
upload input files through the web browser which triggers the Bringing the benefits of event-driven serverless computing,
execution of the functions to process the files. Output file especially concerning FaaS, to on-premises environments has
results are made available to the user to be retrieved using paved the way for multiple open-source FaaS frameworks
the web browser. to appear. Some examples are OpenFaaS [13], Knative [14],
After the introduction, the reminder of the paper is struc- Kubeless [15], Fission [16], and Nuclio [17]. These platforms
tured as follows. First, section II introduces the related work support the definition and execution of functions in response
in the area. Next, section III provides an overview of the to events and they typically vary in the degree of support
architecture of the OSCAR framework. Then, section IV to multiple source of events, their support to programming
presents an use case related to object detection in video in languages and the usage of a certain Container Orchestration
order to test the scalability and reliability of the platform. Platform, such as Kubernetes. There can also be found in the
Section V presents the results obtained from the case-study literature works related to serverless computing with these kind
and finally, section VI summarises the main contributions of of frameworks. This is the case of the work by Hendrickson
this paper and presents the future works. et al. [18] in which the authors introduce OpenLambda,
an open-source platform for building serverless applications
II. R ELATED W ORK on-premises based on Linux containers. The authors further
Serverless computing pursues the adoption of dynamic evolve this platform to accommodate lean microservices that
elasticity handled by the Cloud provider for data-driven and depend on large libraries that start slowly and have an impact
compute-driven applications. Few works can be found in the on elasticity. For this, they introduce Pipsqueak, a package-
literature concerning the application of serverless computing aware computing platform based on OpenLambda.
in the field of scientific computing, mainly attributed to the Indeed, the work by Baldini et al. [19] identifies several
relatively young age of these computational approaches. challenges related to serverless computing that are tackled
One of the pioneer works in this area is the paper by by our proposed work. First, the ability to use declarative
Jonas et al. [7] which introduced the PyWren framework in approaches to control what is deployed and the required
order to perform Python-based distributed computing on AWS tools to support it. We use a high-level declarative lan-
Lambda. This simplifies the access to distributed computing guage to define the deployment of the OSCAR framework
by avoiding to provision and configure complex clusters and, in order to achieve reproducible deployments across multi-
instead, define stateless functions to be run on the Cloud. Clouds. Second, the support for long running jobs, by adopting
The authors extended the previous work in the contribution the Kubernetes container orchestration platform in order to
by Shankar et al. [8] in order to introduce numpywren a manage the execution of the jobs in response to the events,
system for linear algebra that runs on AWS Lambda. They but conveniently supplemented with an elasticity module to
support the horizontal elasticity of the nodes of the cluster.
1 OSCAR - https://github.com/grycap/oscar The work by Erwin van Eyk et al. [1] also identifies some
of clusters: i) based on an LRMS (Local Resource Man-
agement System), supporting SLURM and PBS/Torque;
Deployment on
ii) based on a Container Orchestration Platform, sup-
multi-Clouds IM EC3
porting Apache Mesos, Kubernetes and Nomad and iii)
based on High Throughput Computing (HTC), supporting
Elastic Container HTCondor.
Orchestration
Platform CLUES KUBERNETES • Elastic Cloud Computing Cluster (EC3) [24], [25], an
open-source tool to deploy through the IM elastic com-
pute clusters on multi-Clouds that can scale in/out in
OSCAR terms of the number of nodes according to certain elas-
Services ticity rules defined in the corresponding CLUES plugin.
OPENFAAS MINIO KANIKO
The aforementioned components are currently being used in
production in the EGI Federated Cloud [26], a federated IaaS
Fig. 1. Main components used in the OSCAR architecture. The orange dotted Cloud, composed of academic private clouds and virtualised
line marks the components that allow elasticity at the level of virtual machines
(i.e. powering on and off nodes). The blue dashed line delimits the components resources and built around open standards, whose development
that provide the functions as a service and the event programming model. is driven by the requirements of the scientific communities
[27].
In addition, the open-source software developments that are
perspectives regarding the direction of the serverless field. used by OSCAR are:
They highlight the need to support hybrid Clouds, where
an application could be composed by functions deployed on • OpenFaaS. A framework for building serverless functions
on-premises clusters, executing proprietary code, while other with Docker and Kubernetes.
parts of the application could be run on the FaaS service • Minio. An object storage server that features an Amazon
offered by a public Cloud provider. For this, the ability to S3 compatible API.
deploy on-demand an event-driven FaaS platform on top of • Kaniko. A tool to build container images from a Dock-
an elastic Kubernetes cluster dynamically provisioned from erfile, inside a Kubernetes cluster.
an on-premises Cloud represents a step forward towards this Figure 2 provides an overview of the interaction among the
aim. services deployed in the elastic Kubernetes cluster dynamically
provisioned by the OSCAR framework.
III. T HE OSCAR FRAMEWORK OSCAR Manager is the service that provides the orchestra-
This section provides an overview of the architecture of the tion of the other services. It offers a REST API that allows the
OSCAR framework, together with the open-source existing user to initialize and invoke functions. The process to create a
developments integrated in the platform, as well as the open- function is completely transparent to the user and is comprised
source developments carried out in order to produce such of the following steps: 1) Using the web interface, the user
integrated platform. generates a request to create a function that is received by the
OSCAR Manager service; 2) The required Docker image is
A. Architecture of OSCAR
created by Kaniko using as base image the user’s image, in
Figure 1 provides a high-level overview of the open-source order to inject a supervisor in charge of managing the input
components that are used in the OSCAR framework. In order data required and the output data generated by the application
to facilitate the deployment of the elastic Kubernetes cluster execution. Once the Kaniko build is finished, the image is
configured with all the services we rely on these tools: registered in the Docker registry deployed in Kubernetes; 3)
• Infrastructure Manager (IM) [20], an open-source tool The required input/output buckets are created in Minio; 4) The
to describe complex application architectures using high- function is created in OpenFaaS. OpenFaaS uses as image for
level declarative languages such as RADL (Resource the function the image created by Kaniko and retrieves it from
Application Description Language) [21] and the stan- the Docker registry.
dard specification TOSCA (Topology and Orchestration OpenFaaS is designed to process short-lived requests and,
Specification for Cloud Applications) [22] in order to de- therefore, attempting to execute several long running jobs
ploy them on multiple back-ends such as public Clouds: at the same time could end up collapsing the cluster due
AWS, Microsoft Azure, Google Cloud Platform and on- to the lack of resources for all the processes. To be able
premises Cloud Management Platforms: OpenNebula and to support long running jobs we developed a new service
OpenStack. (i.e. OSCAR worker in Fig 2) that transforms asynchronous
• CLUster Elasticity System (CLUES) [23], an open-source requests sent to OpenFaaS into Kubernetes jobs. Thus, the
modular elasticity system that supports a wide variety of steps taken when executing a function are as follows. First,
plugins in order to introduce elasticity capabilities for when the user uploads a file to a Minio bucket, an event is
cluster-based computing. Many plugins are supported in triggered and sent to OpenFaaS as an asynchronous request
order to introduce horizontal elasticity for different types which is stored in the NATS queue provided by OpenFaaS.
On-Premises SCAR (OSCAR)

Kubernetes Services Docker Container


Put / Get
Minio
Files FileWatchdog
Create
Buckets File OSCAR Supervisor
event
User Script
OSCAR Init / Invoke OSCAR

API
Create / Launch
Functions Function OpenFaaS
UI Manager
1. Stage In
2. Execute
Publish event
User App
3. Stage Out
NATS OSCAR Kubernetes Pull Docker
Read Create
Image
queue event Worker Job Job

Manage
Create Register Docker
Services Kaniko Image
Docker Image Registry

Kubernetes Cluster

Kube Kube Kube


Deploy Elastic CLUES Scale in / out
FrontEnd WN WN
Kubernetes Cluster
+
OSCAR VM VM VM

Hardware

Fig. 2. Architectural approach for supporting container-based file-processing applications on serverless platforms.

Second, the OSCAR worker (that is subscribed to the NATS


queue) reads the asynchronous request and then creates and
submits a new job to Kubernetes. Submitting a job to Ku-
bernetes allows OSCAR to delegate the resource management
to both Kubernetes and the CLUES elasticity system. CLUES
detects when the Kubernetes cluster needs more resources and
provisions new nodes accordingly. Likewise, if CLUES detects
that Kubernetes has spare nodes that are no longer needed, it Fig. 3. OSCAR graphical user interface. The functions tab shows the user
terminates them. the functions created and the function status.
For the development of the OSCAR UI (User Interface),
VueJS and Vuetify were used. Both are accessible and versatile edit or delete functions and Figure 4 shows the Storage tab
frameworks for building user interfaces. VueJS is a progressive where the information of the buckets is shown, as well as the
JavaScript framework, with intuitive, modern and easy to stored files. In the Storage tab users can upload the files to
use features, and has a very active community. Vuetify is a be processed, remove them from the buckets or download the
semantic component framework for VueJS. It aims to provide output files generated by a function.
clean, semantic, and reusable components. All the aforementioned components are dynamically pro-
The graphical user interface is deployed inside the Ku- visioned inside the Kubernetes cluster via the corresponding
bernetes cluster, so it is necessary to externally expose the Ansible Roles made available as open-source contributions in
application through a port. Since VueJS is a frontend frame- GitHub2
work, and the application is executed on the client side, it
was necessary to create a Node.js application that interacts IV. C ASE STUDY - V IDEO P ROCESSING S ERVICE
with other internal services of the Kubernetes cluster such In order to assess the OSCAR framework we are going to
as OSCAR Manager, Minio, and OpenFaaS. The application deploy a serverless video processing service in an on-premises
was created using Express which is a robust, fast and flexible OpenNebula-based Cloud. This service is comprised of two
framework for Node.js applications.
Figure 3 depicts the Functions tab where you can create, 2 GRyCAP GitHub organization: https://github.com/grycap
Kubernetes

OpenFaaS
Fig. 4. OSCAR graphical user interface. The storage tab shows the user the Image
Minio buckets automatically created when the function is deployed in the processing K8s
infrastructure and the stored files inside those buckets. K8s
Job
functions K8s
JobK8s
Job
K8s K8s
Job
K8s
JobK8s K8s
Job
K8s JobK8s K8s
Job
functions linked by means of an storage bucket, so when JobK8s K8s
Job
Job JobK8s Job
the first function finishes, the second function is triggered Trigger JobK8s
function FaaS JobK8s
automatically. The goal of this architecture is to apply object supervisor
Job
Job
recognition to the frames of the video uploaded by the user
as input. Figure 5 shows the workflow of the architecture Minio
proposed. The files needed to reproduce the case study are Store
open-source and available in GitHub3 . analyzed
The video processing function uses the ffmpeg library to images
extract the keyframes from the input video. To be able to Store Download
create different workloads, the keyframe extraction rate has video results
been changed to generate different amounts of images. The images
image processing function uses the darknet framework in
Video
combination with the YOLOv3 library [28] to detect the processing K8s
objects in the image. All the libraries and frameworks have function Job
been compiled to support CPU-based executions. FaaS
supervisor
The following points explain the steps taken during the
experiment execution:
1) Using the OSCAR UI the user creates the video process- OpenFaaS Minio
ing and the image processing functions. By defining the
output bucket of the video processing function as the Trigger
input bucket of the image processing function the user function
is creating the workflow that is going to be triggered
when a file is uploaded into the input bucket. Bear in
Upload
mind that the creation of the required containers, the video
container registration in the internal Docker registry, the OSCAR UI
creation of the needed Minio buckets, and the creation
of the OpenFaaS function is automatically performed
Create
without any user interaction. functions
2) Through the OSCAR UI, the user uploads to the input
bucket of the video function the video to process. After
this step the user interaction is not required anymore
until the retrieval of the output data.
3) After the video upload finishes, Minio creates an event
that is pushed to OpenFaaS which stores the event
received in the NATS queue. Afterwards, the OSCAR
worker reads the NATS queue and launches the function
as a Kubernetes job. During the function execution, the
OSCAR supervisor library that is deployed inside the Fig. 5. Simplified workflow of the video processing service. Two OpenFaaS
functions are used to process the video. First, a function to extract the video
function retrieves the video from the Minio bucket and keyframes, and second, a function to analyze the generated keyframes. One
stores it inside the pod. Then, the user script is executed function with the image processing functionality is triggered automatically for
and the generated output is stored in an specified output each keyframe created by the video processing function.
folder. As a last step in the execution of the video
3 https://github.com/grycap/oscar/tree/master/examples/video-process
function, the OSCAR supervisor uploads all the files This process can be seen in the first grey area in minute 12.
present in the output folder to the output bucket defined, The nodes in power on state take 3 minutes to deploy which is
thus triggering the image processing function. enough time for the already deployed working node to process
4) Minio detects the new files in the input bucket and starts the 10 jobs in the queue. Therefore, the new nodes that are
the process again but this time triggering the image deployed are in idle state and after a couple of minutes are
processing function. Minio is going to generate an event powered off to save resources (this is represented by the gold
for each file uploaded to the bucket, so we automatically area in minutes 14-16).
end up with a function being launched for each image The second workload starts in minute 17. As in the first
stored in the input bucket. The invocation and execution workload, the available working node is enough to process
process of the function is the same as in the previous the uploaded video. This time 100 functions are generated,
step but changing the container and the script executed. so the CLUES system powers on all the available nodes to
After the image processing function finishes, the output attend the requests (this is represented by the second grey area
files generated are stored in the output bucket linked to between the minutes 18 and 26). The new nodes powered on
the function. start executing the functions just after being initialized so no
5) The last step involves the user downloading the files idle nodes are seen until the functions allocated in those nodes
generated by all the executed functions. are finished. The execution of the second workload finishes in
minute 36 and it is represented by the highest peak of the idle
V. R ESULTS area (i.e. the blue area).
To test the scalability and reliability of the infrastructure With the third workload we wanted to test the reliability of
proposed we used three different workloads based on the the infrastructure under a high load. As stated at the beginning
number of images extracted from each video. Thus, for the of the section, 1001 function invocations were launched and
first workload we extracted 10 images, 100 for the second processed. In Figure 6 it can be seen that this was carried
workload and 1000 for the third. These workloads involved out between the minutes 37 and 78. In minute 37 all the
the invocation of 11, 101 and 1001 functions respectively working nodes that were idle receive new function invocations
in the OSCAR cluster, one for the video processing and the to process and the cluster continues processing them until
remaining for the image processing. minute 73 where the first working nodes start to be idle.
The specifications for the virtual cluster used in the case After being idle for 5 minutes and not receiving new function
study are the following: the front-end has 8 virtual CPUs and invocations, CLUES started to power off nodes until only one
16 GiB of RAM. The working nodes have 4 virtual CPUs and working node is left.
8 GiB of RAM. The specifications were selected to simulate Figure 7 shows the RAM memory and CPU usage of the
two of the most common instances used to process compute- nodes along the execution of the three workloads tested. The
intensive workloads in Amazon Web Services. The front-end graph represent the stacked resources for each node and the
is equivalent to a c5.2xlarge and the nodes are equivalent to green line represents the total amount of resources reserved in
a c5.xlarge. The complete virtual cluster is composed by 1 the cluster infrastructure. Since each function invocation has
front-end and a maximum of 10 nodes which will be powered the same resource requirements and all the functions use the
on on-demand. All the machines used are virtual machines maximum resources available in each execution,the graphs of
deployed in an OpenNebula-based on-premises cloud. RAM and CPU usage can be combined. It is also important
Figure 6 shows the state of the nodes during the execution of to know that no more than three functions per node could be
the three proposed workloads. The colors of the areas represent deployed due to the image function requirements (i.e. 1 CPU
the following: the blue area represents the nodes that are idle and 2 GiB of RAM) and that Kubernetes also needs to deploy
(i.e. waiting for jobs); the dark orange area represents the their own pods to control each node (those pods also use CPU
nodes that are busy processing Kubernetes jobs; the grey area and RAM resources). This behaviour caused that several GiB
shows the number of nodes that are powering on and the gold of RAM and CPUs were unused because the unused space in
area shows the number of nodes that are powering off. The each node was less than the minimum space required by the
data in the graph is stacked, thus the areas that have no color functions and that is represented by the white area under the
represent nodes that are powered off and are not consuming green line which is the total amount of resources.
resources in the infrastructure. As Figure 6, Figure 7 clearly depicts the execution of the
In order to immediately process small workloads, the de- three workloads. From minutes 10 to 12 there is a peak in
ployed cluster always has a working node available. This is resources consumption in the available working node. After the
represented by the orange area along the first 10 minutes in cluster finishes deploying new nodes this peak has disappeared
Figure 6. Afterwards, the first workload starts (i.e. process (i.e. the execution of the functions has finished) and the
a video and ten extracted images). In the minute 10, the new reserved resources (the working nodes) are freed again
video is processed by the available node and the images to (terminated). The second workload starts in minute 17 and has
analyze are generated. CLUES realizes that it does not have the its maximum peak of RAM and CPU consumption in minute
required resources to process the new function invocations and 26 after all the nodes have been deployed. As the functions
provisions additional nodes to process the incoming workload. are processed, the usage of the resources of the working nodes
Fig. 6. State of the nodes during the execution of the three different workloads.

Fig. 7. RAM and CPU usage during the execution of the three different workloads (11, 101 and 1001 functions executed respectively).

decreases but the nodes are not terminated, thus not releasing finish (including the deployment time of nodes which is 3
the reserved infrastructure resources. The third workload starts minutes). The third workload, processing 1001 functions, also
in minute 37, then the maximum number of functions per node fills all the available processing slots of the infrastructure’s
are deployed again and this behaviour continues until the 1000 nodes. The third workload finishes in 41 minutes. This time
images are processed in the minute 78. Once CLUES detects could be improved by deploying a bigger cluster (e.g. 20 nodes
that the working nodes are idle for 5 minutes, it terminates instead of 10). Thanks to the elasticity of the cluster, these
them. The green line (total amount of resources reserved) at nodes would only be used when a high amount of function
the end of the graph going down represents this release of invocations are needed to be processed, being powered off
resources. the remaining time. To deploy a bigger cluster, the user only
As a summary of the results, the framework was able to has to change the maximum number of nodes available when
process three different workloads, executing 11, 101 and 1001 deploying a new cluster. The OSCAR framework will manage
functions. The first 11 function invocations were processed everything else to use those new resources.
in 3 minutes and no extra nodes were needed (two new
VI. C ONCLUSIONS AND F UTURE W ORK
nodes were powered on but were never used). Processing
the 101 function invocations made the cluster reach its top This paper has introduced a framework to support serverless
performance as seen in Figure 7 and it took 19 minutes to computing in on-premises platforms for event-driven data-
processing applications. First of all, a plugin to enable hor- [8] V. Shankar, K. Krauth, Q. Pu, E. Jonas, S. Venkataraman, I. Stoica,
izontal scalability of a Kubernetes cluster has been created, B. Recht, and J. Ragan-Kelley, “numpywren: serverless linear algebra,”
oct 2018. [Online]. Available: https://arxiv.org/abs/1810.09679
in order to cope with incoming workloads by provisioning [9] J. Spillner, C. Mateos, and D. A. Monge, “Faaster, better, cheaper:
additional virtual machines from the underlying Cloud com- the prospect of serverless scientific computing and HPC,” in
puting platform employed. Second, the automated deployment Communications in Computer and Information Science, vol. 796.
Springer, Cham, 2018, pp. 154–168. [Online]. Available: http:
and orchestration of the multiple services required to support //link.springer.com/10.1007/978-3-319-73353-1 11
this framework is performed with the help of the EC3 and IM [10] V. Giménez-Alventosa, G. Moltó, and M. Caballer, “A framework and
tools, including a FaaS framework, an event-aware data storage a performance assessment for serverless MapReduce on AWS Lambda,”
Future Generation Computer Systems, mar 2019. [Online]. Available:
back-end, and support for building and storing Docker images. https://linkinghub.elsevier.com/retrieve/pii/S0167739X18325172
Third, an integrated web-based graphical user interface is pro- [11] I. Baldini, P. Cheng, S. J. Fink, N. Mitchell, V. Muthusamy,
vided in order to simplify the interaction with the computing R. Rabbah, P. Suter, and O. Tardieu, “The serverless trilemma: function
composition for serverless computing,” in Proceedings of the 2017 ACM
platform and that interacts with the services deployed inside SIGPLAN International Symposium on New Ideas, New Paradigms,
the Kubernetes cluster. and Reflections on Programming and Software - Onward! 2017. New
Users are provided with an open-source platform offered York, New York, USA: ACM Press, 2017, pp. 89–103. [Online].
Available: http://dl.acm.org/citation.cfm?doid=3133850.3133855
via a convenient web interface that simplifies the creation [12] A. Eivy, “Be Wary of the Economics of Serverless Cloud Computing,”
and execution of the functions. The users just need to upload IEEE Cloud Computing, vol. 4, no. 2, pp. 6–12, mar 2017. [Online].
their files in order to trigger the concurrent execution of the Available: http://ieeexplore.ieee.org/document/7912239/
[13] “OpenFaaS.” [Online]. Available: https://www.openfaas.com/
application. The application will process the uploaded file and [14] “Knative.” [Online]. Available: https://cloud.google.com/knative/
leave the output data files in the corresponding folder for the [15] “Kubeless.” [Online]. Available: https://kubeless.io/
users to retrieve them. Being able to interact with a computing [16] “Fission.” [Online]. Available: https://fission.io/
[17] “Nuclio.” [Online]. Available: https://nuclio.io/
platform without requiring the definition of jobs using com- [18] S. Hendrickson, S. Sturdevant, T. Harter, V. Venkataramani, A. C.
plex domain specific languages (DSLs), and by means of a Arpaci-Dusseau, and R. H. Arpaci-Dusseau, “Serverless Computation
web browser represents a step forward towards simplifying with openLambda,” in Proceedings of the 8th USENIX Conference on
Hot Topics in Cloud Computing. USENIX Association, 2016, pp. 33–
application execution for data-processing applications. 39. [Online]. Available: https://dl.acm.org/citation.cfm?id=3027047http:
Finally, due to the resource requirements of the Kubernetes //dl.acm.org/citation.cfm?id=3027041.3027047
infrastructure, the RAM memory and CPU resources of the [19] I. Baldini, P. Castro, K. Chang, P. Cheng, S. Fink, V. Ishakian,
N. Mitchell, V. Muthusamy, R. Rabbah, A. Slominski, and P. Suter,
working nodes could not be completely used. Further work in “Serverless computing: Current trends and open problems,” in Research
the infrastructure refining the requirements and the behaviour Advances in Cloud Computing. Singapore: Springer Singapore,
of the required pods could lead to a better usage of the cluster 2017, pp. 1–20. [Online]. Available: http://link.springer.com/10.1007/
978-981-10-5026-8{ }1
resources and thus to a higher throughput when processing [20] M. Caballer, I. Blanquer, G. Moltó, and C. de Alfonso,
functions. Also future work involves integrating additional “Dynamic Management of Virtual Infrastructures,” Journal of Grid
sources of events for multiple scientific storage back-ends Computing, vol. 13, no. 1, pp. 53–70, mar 2015. [Online]. Avail-
able: http://link.springer.com/article/10.1007/s10723-014-9296-5http:
such as Onedata or dCache. In addition, we plan to integrate //link.springer.com/10.1007/s10723-014-9296-5
OSCAR with SCAR in order to achieve event-driven hybrid [21] “RADL.” [Online]. Available: https://imdocs.readthedocs.io/en/latest/
serverless workloads across on-premises and public Clouds. radl.html
[22] D. Palma, M. Rutkowski, and T. Spatzier, “TOSCA Simple
Profile in YAML Version 1.1,” Tech. Rep., 2016. [Online]. Avail-
R EFERENCES able: http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/
[1] E. van Eyk, A. Iosup, S. Seif, and M. Thömmes, “The SPEC v1.1/TOSCA-Simple-Profile-YAML-v1.1.html
cloud group’s research vision on FaaS and serverless architectures,” [23] C. de Alfonso, M. Caballer, A. Calatrava, G. Moltó, and
in Proceedings of the 2nd International Workshop on Serverless I. Blanquer, “Multi-elastic Datacenters: Auto-scaled Virtual Clusters
Computing - WoSC ’17. New York, New York, USA: ACM Press, on Energy-Aware Physical Infrastructures,” Journal of Grid
2017, pp. 1–4. [Online]. Available: http://dl.acm.org/citation.cfm?doid= Computing, jul 2018. [Online]. Available: http://link.springer.com/
3154847.3154848 10.1007/s10723-018-9449-z
[2] A. Pérez, G. Moltó, M. Caballer, and A. Calatrava, “Serverless [24] M. Caballer, C. de Alfonso, F. Alvarruiz, and G. Moltó, “EC3:
computing for container-based architectures,” Future Generation Elastic Cloud Computing Cluster,” Journal of Computer and System
Computer Systems, vol. 83, pp. 50–59, jun 2018. [Online]. Available: Sciences, vol. 79, no. 8, pp. 1341–1351, dec 2013. [Online]. Avail-
http://linkinghub.elsevier.com/retrieve/pii/S0167739X17316485 able: http://authors.elsevier.com/sd/article/S0022000013001141http://
[3] A. Pérez, G. Moltó, M. Caballer, and A. Calatrava, “A programming linkinghub.elsevier.com/retrieve/pii/S0022000013001141
model and middleware for high throughput serverless computing [25] A. Calatrava, E. Romero, G. Moltó, M. Caballer, and J. M. Alonso,
applications,” in Proceedings of the 34th ACM/SIGAPP Symposium on “Self-managed cost-efficient virtual elastic clusters on hybrid Cloud
Applied Computing, ser. SAC ’19. New York, NY, USA: ACM, 2019, infrastructures,” Future Generation Computer Systems, vol. 61, pp.
pp. 106–113. [Online]. Available: http://doi.acm.org/10.1145/3297280. 13–25, aug 2016. [Online]. Available: http://authors.elsevier.com/sd/
3297292 article/S0167739X16300024
[4] “CNCF Cloud Native Computing Foundation Interactive Landscape.” [26] E. Fernández-Del-Castillo, D. Scardaci, and Á. L. Garcı́a, “The EGI
[Online]. Available: http://s.cncf.io Federated Cloud e-Infrastructure,” in Procedia Computer Science,
[5] OpenNebula, “OpenNebula.” [Online]. Available: https://opennebula.org vol. 68. Elsevier, jan 2015, pp. 196–205. [Online]. Available:
[6] OpenStack, “OpenStack.” [Online]. Available: http://openstack.org https://www.sciencedirect.com/science/article/pii/S187705091503080X
[7] E. Jonas, Q. Pu, S. Venkataraman, I. Stoica, and B. Recht, “Occupy [27] E. Foundation, “EGI Federated Cloud.” [Online]. Available: https:
the cloud: distributed computing for the 99%,” in Proceedings of //www.egi.eu/federation/egi-federated-cloud/
the 2017 Symposium on Cloud Computing - SoCC ’17. New York, [28] J. Redmon and A. Farhadi, “Yolov3: An incremental improvement,”
New York, USA: ACM Press, 2017, pp. 445–451. [Online]. Available: arXiv, 2018.
http://dl.acm.org/citation.cfm?doid=3127479.3128601

You might also like