Cost-efficient Auto-scaling of Container-based Elastic Processes

In business process landscapes, a common challenge is to provide the necessary computational resources to enact the single process steps. One well-known approach to solve this issue in a cost-efficient way is to use the notion of elasticity, i.e., to provide cloud-based computational resources in a rapid fashion and to enact the single process steps on these resources. Existing approaches to provide elastic processes are mostly based on Virtual Machines (VMs). Utilizing container technologies could enable a more fine-grained allocation of process steps to computational resources, leading to a better resource utilization and improved cost efficiency. In this paper, we propose an approach to optimize resource allocation for elastic processes by applying a four-fold auto-scaling approach. The main goal is to minimize the cost of process enactments by using containers. To this end, we formulate and implement a multi-objective optimization problem applying Mixed-Integer Linear Programming and use a transformation step to allocate software services to containers. We thoroughly evaluate the optimization problem and show that it can lead to significant cost savings while maintaining Service Lev


Introduction
Today 1 , cloud-based computational resources are used in many different application areas, e.g., banking [1] or healthcare [2]. One particular use case for cloud computing in these areas is the utilization of cloud-based computational resources for the enactment of business processes [3], i.e., the actual execution and invocation of according software services delivering process functionalities on provisioned computational resources.
Today's business process landscapes are highly volatile and ever-changing, e.g., in terms of the number of arriving process requests or the varying amount of data to be processed [4]. To ensure that these characteristics of business process landscapes are taken into account, Business Process Management Systems (BPMS) need to make sure that a sufficient amount of computational resources is provided for process enactment, to also fulfill the Quality of Service (QoS) requirements of process owners [3].
The utilization of cloud-based computational resources for process enactment leads to the notion of elastic processes. For the realization of elastic processes, it is necessary to provide elastic BPMS (eBPMS), i.e., BPMS which control a process landscape and cloud-based computational resources. eBPMS need to be able to analyze the cost, quality, and resource constraints of a process landscape as well as to monitor the computational resources in use. Based on this information, an eBPMS Email address: stefan.schulte@tuhh.de (Stefan Schulte) 1 The accepted manuscript is available at https://doi.org/10.1016/j. future.2022.09.001. is capable to scale the computational resources up or down, in or out, based on the current demands of a process landscape [5].
So far, eBPMS have mostly aimed at the utilization of cloudbased computational resources available as Virtual Machines (VMs), e.g., [6,7,8]. However, with the advent of container technologies like Docker [9], there is today an alternative approach to utilize cloud-based computational resources for business processes. In fact, containers provide a number of benefits for scheduling and resource allocation, compared to VMs [10]: First, containers do not virtualize a full operating system and are therefore relatively lightweight. Accordingly, containers can be created significantly quicker than VMs. Second, containers do not need a full, time-consuming reboot, when being reconfigured. Again, this saves time. Third, containers offer flexible configuration possibilities. While cloud providers mostly offer a predefined set of VM instance types, this is not the case for containers. This allows a more fine-grained control over computational resources, which may lead to less wasted cost because of unused computational resources.
When taking into account container-based elastic processes, existing solutions for resource allocation and task scheduling for VM-based elastic processes are not an option any longer: While existing approaches VM-based elastic processes solely rely on horizontal scaling, i.e., leasing and releasing VM instances, e.g., [11], container-based elastic processes also allow to do vertical scaling, i.e., to change the amount of computing power of individual system components [12]. Hence, task scheduling and resource allocation need to be considered both between the containers and the software services used to enact process steps, and between the containers and VMs. Therefore, in this paper, we propose an approach for the cost-efficient auto-scaling of container-based elastic processes which is able to take into account these requirements. Since elastic processes are part of potentially very large process landscapes, optimal resource allocation and process scheduling is a complex task. Finding an optimal solution requires defining and solving a formal optimization model. For this, we conceptualize an optimization model using Mixed-Integer Linear Programming (MILP). The aim of the model is to find a cost-efficient enactment plan in terms of process step (i.e., task) scheduling and allocation of cloud-based computational resources. A subsequent transformation step is then used to allocate software services to containers. In brief, the contributions of this paper can be summarized as follows: • We define a system model for elastic processes, including processes, VMs, containers, and services.
• We present the Four-fold Service Instance Placement Problem (FFSIPP), an optimization model aiming at minimizing the total cost arising from enacting elastic processes on containers. The optimization model takes into account vertical and horizontal scaling of both VMs and containers in a system landscape.
• We evaluate the prototypical implementation. The evaluation assesses the cost efficiency of the proposed approach as well as the adherence to user-defined Service Level Agreements (SLAs).
The remainder of this paper is organized as follows: In Section 2, we provide background information about elastic processes and some preliminaries for the subsequent sections. In Section 3, we define the system model necessary to conduct the optimization, while in Section 4, we formulate the multiobjective optimization problem and present a transformation step. We thoroughly evaluate the proposed solution in Section 5 and discuss related work in Section 6. Finally, we conclude this paper in Section 7.

Elastic Processes
In brief, an elastic process is a business process that is carried out using elastic cloud infrastructures and resources [5]. Hence, elastic processes combine concepts from the field of Business Process Management (BPM) with those of cloud computing, while especially taking advantage of the elasticity features enabled by the resource allocation and virtualization capabilities of the cloud.
With regard to elastic processes, different elasticity properties can be regarded [3]: resource elasticity, which describes the change in the amount of used resources (e.g., CPU, RAM, network bandwidth) based on the incoming demand, cost elasticity, which refers to the change of cost with the changing amount, duration, and type of provisioned resources, and quality elasticity, which describes the change in the delivered QoS in response to fluctuations in the current load of a system. Naturally, the three discussed elasticity properties are highly interdependent and changes to one of the properties come with trade-offs for the other properties. For instance, the achieved QoS is often in direct relationship to the utilized resources, which again have an effect on the cost. However, these relationships are not necessarily linear. If these trade-offs are not regarded, the behavior of a business process landscape can lead to unexpected cost or inefficient resource utilization [13]. It is the task of an eBPMS to circumvent such issues and to make sure that elastic processes are enacted in an efficient way while taking into account the QoS demands of the process owners.

Preliminaries
In the following paragraphs, we discuss the terminology and basic assumptions used within the work at hand.
In elastic process scenarios, process owners are able to define a process model. Process models are composed out of different process steps, i.e., single tasks. Each process step can be enacted by a single software service. A service can be used in multiple different process models. We explicitly only regard software-based services in our work, i.e., human-provided process steps are not taken into account.
A process model can be requested by a process owner, leading to an executable process instance, which features an SLA. Process models can comprise different workflow patterns [14], e.g., sequences, AND-splits, AND-joins, XOR-splits, XORjoins, and loops. We assume that the next step of a process instance is known as soon as the preceding step is scheduled.
In the SLA, non-functional requirements are defined, which need to be taken into account during process enactment, i.e., the invocation of the single software services representing the process steps. Most importantly, an SLA defines the deadline of a process and therefore the priority of the process. If the eBPMS is not able to consider an SLA for a process request, penalty cost accrue, i.e., the process owner gets a penalty fee for the delay.
When a service is deployed on a cloud-based infrastructure, we obtain a service instance. Service instances are hosted in the cloud in an isolated way, and more than one instance of the same service may exist at the same time on different cloud resources. A service invocation is the unique invocation of a service instance to serve a requested process instance. A service instance can serve multiple incoming service invocations concurrently, as long as it has sufficient computational resources. Thus, multiple process instances of the same or different process models may share service instances for single process steps.
Since the enactment of a varying number of process instances can be requested at any time, a business process landscape can become highly dynamic. An ever-changing process landscape requires different amounts and types of computational resources during different time periods [3]. In the work at hand, we investigate the usage of cloud-based software containers for the provisioning of these computational resources. We focus on the actual process enactment time, i.e., the execution time for the single services, and assume that communication times, e.g., between the public and the private cloud, as well as data transfer times, are negligible. In addition, we assume that the services are primarily computing-intensive.
In order to take care of the dynamics in a process landscape, the leased cloud-based computational resources need to be optimized for obtaining a cost-and resource-efficient system landscape. For this, we aim at controlling cloud-based computational resources both at the container and VM level in order to avoid a waste of resources and therefore unnecessary cost.
The cloud-based computational resources can be leased from both private and public cloud providers. We assume that both private and public clouds offer different VM types. Once leased, the resources of a running VM instance of a certain type cannot be extended during a particular Billing Time Unit (BTU). A BTU defines the minimum leasing duration of a VM instance. An arbitrary number of VM instances with arbitrary resource configurations can be leased at any time. Multiple containers can be deployed on different leased VM instances. These containers host the software services necessary to enact a business process in terms of the single process steps. Since we use Docker as container technology, it is possible to create a Docker container hosting a particular service by deploying a Docker image on leased VM instances. The Docker image is downloaded from an according Docker registry. Once an image has been downloaded, it stays available on a VM instance, i.e., does not need to be downloaded again. Docker containers for the same software service can be deployed on arbitrary many VM instances, but each VM instance can only run Docker containers of different service types. Each container can be assigned with a varying amount of computational resources in terms of CPU and RAM. The assigned resources of a container can be adapted on demand and are only limited by the available resources of the underlying VM instance.
In order to provide these functionalities, an eBPMS needs to manage cloud-based computational resources (i.e., lease and release VM instances), to deploy the necessary amount and types of containers with invokable software services on the leased resources, and to schedule incoming process requests (in terms of service invocations) on the available service instances. This has to be done in a dynamic fashion, as new process requests arrive, the process landscape may change, and new process steps have to be scheduled. Since an eBPMS needs to control both the cloud and process landscape, it acts as a middleware, which provides Platform-as-a-Service (PaaS) functionalities to process owners. At the same time, the eBPMS acts as the allocator and controller of cloud-based computational resources. This means that the entity controlling the process execution at the same time needs to be able to control services, and utilize cloud resources. Therefore, we do not take into account services offered in a Software-as-a-Service (SaaS) manner. Instead, the eBPMS controls the deployment and invocation of the service instances.
In this paper, we present an approach to compute an optimal resource allocation and task scheduling plan, by providing a solution based on MILP. In theory, each eBPMS that is able to provide the functionalities discussed in the last paragraph can be used together with the proposed solution. Within the presented work, we make use of an extended version of the Vienna Platform for Elastic Processes (ViePEP), which is a fullyfledged research eBPMS [11,15].

Basic Approach
As outlined in Section 1, we provide a four-fold auto-scaling approach for elastic processes. This means that both VMs and containers are adjusted horizontally and vertically.
Horizontal scaling of VMs is accomplished by changing the number of leased VM instances of the system, while horizontal scaling of containers is realized by changing the number of deployed container instances offering a certain software service.
Vertical scaling of VMs refers to the change of computational resources of a system, while the number of deployed VM instances remains unchanged. It has to be noted that vertical scaling in this context does not refer to single VM instances, but to the system landscape as a whole, as we do not address problems related to reassigning computational resources to running VM instances, but allow to exchange running VM instances by VM instances of different types offering different resources.
Vertical scaling of containers is realized by resizing deployed container instances so that they offer more or less computational resources of the underlying VM instance. This resizing is achieved by changing the assigned CPU and memory shares to container instances.

System Model
In order to define our system model, we first describe the variables used to define the processes in Section 3.2.1. Afterwards, we present the necessary time variables in Section 3.2.2 and formally define VMs (Section 3.2.3), as well as containers and services (Section 3.2.4). Finally, we introduce further variables of the system model in Section 3.2.5. An overview of all applied variables is given in Tables 1-7.

Process Variables
Set of process models p ∈ P I p = 1, . . . , i # p Set of process instances i p ∈ I p , with p ∈ P indicating which model is used for a particular process instance J ip = 1, . . . , j # ip Set of process steps j ip ∈ i p not yet enacted, with i p indicating the process instance of the step J * ip ⊆ J ip Set of next process steps j * ip ∈ J * ip to be enacted J run ip J ip Set of currently enacted (i.e., running) process steps j run ip ∈ J run ip DL ip Deadline for the enactment of i p DL j * ip Deadline for starting the enactment of a next process step j * ip r C j ip , r R j ip Resource demands of a process step j ∈ i p in terms of CPU (r C j ip ) and RAM (r R j ip ) Business process landscapes are made up from a potentially very large amount of process instances, which stem from different process models. Therefore, we consider multiple process models, with P = 1, . . . , p # representing the set of process models, and p ∈ P indicating a specific process model. In order to differentiate between different process models, p (as well as the other variables used in order to describe processes, VMs, containers, etc.) take sequential integer values. The set of process instances of a specific process model p is represented by I p , while i p ∈ I p indicates a specific process instance of the process model p.
Process models (and accordingly process instances) are composed of different process steps. The set of process steps not yet enacted (and not yet started) to realize a specific process instance i p is represented by J i p , while j i p ∈ J i p refers to a specific process step of a process instance i p . The set of next process steps (i.e., the immediately next steps in a particular process instance) that have to be scheduled for enactment to realize a specific process instance i p is represented by J * i p , while j * i p ∈ J * i p ⊆ J i p refers to a specific next process step of the process instance i p . j run i p ∈ J run i p J i p is a specific currently running process step of the process instance i p , with the set of currently running and not yet finished process steps of a specific process instance i p being represented by J run i p . As written above, process owners are able to define a deadline until when a particular requested process instance needs to be finished. The deadline for the enactment of the process instance i p is defined by DL i p and refers to a certain point in time. The deadline for starting the enactment of a next process step j * i p such that the process instance still meets its process deadline DL i p , while performing a worst-case analysis considering all subsequent steps, is defined by DL j * ip , and refers also to a certain point in time. The overall starting time of a process instance is defined by its first process step. We discuss the according computations in Section 4.2.
Finally, the resource demands of a process step j of the process instance i p in terms of CPU and RAM are indicated by the respective terms r C j ip (CPU) and r R j ip (RAM). The planned optimization of resource allocation and task (i.e., process step) scheduling is done for a particular time period τ t , i.e., the optimization is carried out for this time period and subsequently repeated for each new time period. τ t+1 refers to the next time period starting at t +1. At the beginning of each time period, the optimization model is calculated based on all currently available information and its results are enacted. How often the optimization is carried out depends on the volatility of a business process landscape as well as the demands of the BPMS operator (see Section 4).

Time Variables
The point in time at which a specific service invocation j i p is scheduled is referred to as t j ip . Finally, describes (in milliseconds) the minimum time period that is at least needed between two optimization runs, e.g., in order to cater for the amount of time the optimization itself needs, or in order to avoid too frequent changes. This parameter can be set manually by a system operator.

Virtual Machine Variables
leasable BTUs for any k v c v Leasing cost for VM instances of type v for one full BTU β (kv,t) ∈ {0, 1} Indicates if k v is/was already running at the beginning of τ t g (kv,t) ∈ {0, 1} Indicates if k v was already running at the beginning of τ t or is leased during τ t d (kv,t) Remaining leasing duration of k v at the begin- The presented approach allows the utilization of VMs from multiple public and private cloud providers, which both may provide VMs in different configurations and at different cost. The set of VM types is represented by V, while v ∈ V indicates a specific VM type. We assume that the number of leasable VM instances in the public cloud is virtually unlimited [16], but a private cloud provider may only possess limited computational resources which can be leased. The set of leasable VM instances of type v is represented by K v , while k v ∈ K v is the k th VM instance of type v.
The BTU of a VM instance k v of VM type v is indicated by BT U v . A BTU is a billing cycle and the minimum leasing duration for a VM instance k v . c v represents the leasing cost for VM instances of type v for one full BTU. Especially if the BTU defined by a cloud provider is relatively short, one BTU will not be enough to cover a complete optimization time period τ t . Therefore, we define the decision variable γ (v,t) ∈ N + 0 , which indicates the total number of BTUs to lease any VMs of type v in the time period τ t . An arbitrary large upper bound of possible leasable BTUs for any VM instance k v is expressed by the helper variable BT U max . This upper bound is needed in order for the computation of the optimization problem to not getting stuck in a loop.
The helper variable β (k v ,t) ∈ {0, 1} contributes to calculating g (k v ,t) ∈ {0, 1}. g (k v ,t) indicates if the VM instance k v has already been running at the beginning of time period τ t or is leased dur-ing τ t . g (k v ,t) therefore helps identifying the VM instances k v that are either already running or are being newly leased in τ t . This is important in order to reuse already running k v instead of spawning new ones. d (k v ,t) indicates the remaining leasing duration of the VM instance k v at the beginning of the time period τ t . These variables are important in order for the optimization model to be able to calculate how many computational resources are available for how long.
Finally, the resource supplies of a VM type v in terms of CPU and RAM are indicated by s C v (CPU) and s R v (RAM). In addition, the unused resources of a VM instance k v are indicated by f C k v (CPU) and f R k v (RAM).  Following the four-fold auto-scaling approach discussed in Section 3.1, containers are deployed on leased VMs. Therefore, in addition to the VM variables described in the last subsection, we also need to formally define the containers which are used to host and invoke the actual software services.

Container and Service Variables
The set of all container types mapping all possible service types is represented by S T , while st ∈ S T indicates a specific container type for a certain service type. Notably, the container type defines which service types (i.e., images) can be offered by a container instance. The service type of a certain process step j is indicated by st j , i.e., a process step can only be executed by the according service type.
The set of container instances mapping specific service instances of type st is represented by C st , while c st ∈ C st is the c th instance of type st. A container instance of a certain service type st that can run a process step j is given by c st j .
The variable z (st,k v ,t) ∈ {0, 1} indicates if any containers of service type st have already been deployed on a VM instance k v (and hence the container image for starting new container instances of service type st has been downloaded on k v ) until t. This information is needed, since downloading an image takes time and should therefore be avoided (see Section 3.2.5).
Finally, two variables are introduced in order to make sure that the optimization is not getting stuck in a loop: An arbitrary large upper bound of possible container deployments for any VM instance k v is expressed by the helper variable M, and an arbitrary large upper bound of possible service invocations for any container instance c st is expressed by the helper variable N. Again, these parameters are predefined.  Finally, some variables need to be introduced as part of the system model in order to cater for start, deployment, enactment, and penalty times of VMs, containers, and services.

Further Variables
To start with, the time in milliseconds to start a new VM of type v is indicated by ∆ v . The maximum VM-startup time of any type, i.e., max v∈V (∆ v ) is expressed by ∆. This variable is later on needed for the worst-case estimation we perform during optimization (see Section 4.2). The time for pulling a container image for a service type st on a VM instance for the first time is expressed by ∆ st . The time for starting a container instance from an existing image for a service type st on a VM instance is expressed by ∆ c st The remaining enactment time of a process instance i p is expressed by e i p . e i p does not include the enactment and deployment time of the process steps that will be scheduled for the current optimization period τ t , nor the remaining enactment time of the currently already running steps.
To calculate e i p , we need to separately calculate the remaining enactment time of sequences, AND-blocks, XOR-blocks, and repeat loops in a process model. These are given by e seq i p (sequences), e L a i p (AND-blocks), e L x i p (XOR-blocks), and e RL i p (repeat loops). These terms do not include the remaining enactment time of the currently running steps nor the enactment and deployment times for process steps that will be scheduled for Weighting factors for controlling the effect of free resources in terms of CPU (ω C f ) and RAM (ω R f ) ω z Weighting factor for controlling the effect of existing images on VM instances the current optimization period τ t .
To calculate the remaining enactment times for the mentioned workflow patterns, it is necessary to know the potential paths (i.e., process steps) in a process instance. The set of all paths is represented by L = 1 . . . l # , while l ∈ L indicates a specific path within a process. The set of possible paths for AND-blocks L a , XOR-blocks L x and repeat loop constructs RL are expressed by the respective terms, with L a ∪L x ∪RL ⊆ L. For the repeat loops, again, we have to introduce a helper variable, which provides an upper limit. Accordingly, the maximum repetitions of a repeat loop are indicated by re.
As written above, the remaining enactment duration of a process instance (e i p ) is limited to the actual service enactment times. The remaining combined service enactment duration, time for pulling needed container images, container deployment and VM startup time for all not yet scheduled service invocations of sequences or repeat loop blocks (ê s i p ) and paths in ANDor XOR-blocks (ê l i p ) that still need to be invoked to finalize the enactment of the process instance i p are expressed by the respective terms. Still, those values do not include the remaining enactment time of already running process steps ( j run i p ) or process steps that are being scheduled in the current optimization period τ t . These are provided separately by ex j run ip . The combined enactment duration, container deployment and VM-startup time of the next to be scheduled process step j * i p is expressed by ex j * ip . To take into account penalty cost which may accrue if a process instance does not meet its specified deadline, two further parameters are introduced. First, the penalty time of a process instance i p measured in time units, i.e., the enactment duration of i p that occurs beyond the deadline DL i p of i p , is expressed by e p i p . This variable is used by the optimization model in order to calculate if it is cheaper to pay the penalty fee than to lease further computational resources. We assume linear penalty fees, i.e., the fees grow with the delay of process enactment. The penalty cost per time unit of delay of the process instance i p are represented by c p i p . We allow a system operator to weight the different parts of the objective function presented in Section 4, e.g., to give a higher importance to the utilization of leased computational resources. This allows to control the effects of different constraints on the optimization outcome. These weighting factors are shown in Table 6. Their application is explained in more detail in Section 4.1.
Finally, Table 7 provides an overview of the decision vari- Number of BTUs to lease k v in τ t ables needed in our decision model. γ primarily acts as a helper variable and has already been mentioned in Section 3.2.3. a, x and y are the core decision variables of our objective function and accordingly further discussed in the next section.

Multi-Objective Problem Formulation
Based on the system model introduced in the last section, we are now able to formulate our task scheduling and resource allocation problem FFSIPP as a MILP optimization problem. The multi-objective optimization problem represents the scheduling problem for one optimization round starting at time t. An optimization round is triggered whenever new process steps should be scheduled, for example, whenever new process requests arrive or when previously running steps of process instances are finished. Furthermore, the optimization is triggered when SLA violations can be foreseen.
Our optimization problem takes complex workflow patterns, penalty cost, container-based metrics, different pricing models, and BTUs for VMs into consideration. The optimization problem focuses on minimizing the cost that arise from enacting elastic process landscapes on container-based cloud infrastructures while taking into account process SLAs, i.e., QoS in terms of deadlines. Solutions for the problem describe when and on which containers and service instances to schedule service invocations, on which VMs to place containers and service instances, and which VM to lease or release.

Objective Function
The equation above presents the objective function of our multiobjective optimization problem FFSIPP. As we are aiming at cost efficiency, the objective function is subject to minimization under the constraints introduced in Section 4.2.
The objective function considers six terms for calculating a scheduling plan, indicated by the decision variable x ( j ip ,k v ,t) , which decides on which VM instance k v to schedule a service invocation for process step j of process instance i p in the time period τ t . In the following paragraphs, the single terms of the objective function are explained in more detail: • Term 1minimize total VM leasing cost: The first term calculates the total cost for leasing VM instances of each VM type v at time t, by considering the leasing cost c v for the VM types and the total number of leased BTUs γ (v,t) that VM instances of the corresponding type v are leased at t. The aim is to minimize the total cost for leasing VMs.
• Term 2minimize penalty cost: The second term calculates the total penalty cost that arise from scheduling decisions that lead to enactment times for process instances beyond their defined deadlines. The penalty time e p i p of a process instance i p is calculated according to a worst-case analysis. The aim is to minimize such penalty cost and therefore make sure that incoming process requests are enacted in time, as defined in their SLAs. However, it might in some cases be more cost-efficient to pay the penalty fee than to lease additional computational resources.
• Term 3minimize container deployment time: The third term minimizes the sum of time needed for deploying new container instances on VM instances k v . Notably, we do not consider directly the scheduling of container instances in the optimization problem (see Section 4.3). Instead, we consider the placement of service steps on the VM instances and use the service types of the scheduled process steps to indirectly calculate the potential deployment time for container instances. The subterm (1 − z (st j ,k v ,t) ) makes sure that the weighting factor ω z is only considered when the cache for container deployment does not exist on the VM instance k v . As the full term is minimized, the system prefers choosing VM instances for assigning service invocations where the cache for deploying the needed container instance already exists. This term accordingly describes a trade-off between the time for deployment and cost.
• Term 4maximize future resource supply of already leased VMs: The fourth term aims at maximizing the future resource supply of already leased VM instances, by giving a preference to directly scheduling service invocations on VMs with a shorter remaining leasing duration d (k v ,t) compared to other VMs with already existing longer leasing durations. Although at time t this preference does not lead to any cost-based advantages, it assures that the already leased resources offer more long-running resources for future optimization periods, which can then be used by services. This reduces the amount of wasted computational resources. The term calculates the remaining leasing duration of all VMs using the weighting factor ω d .
As we want to give a preference to deploying containers on VM instances with a small leasing duration, we minimize the term to maximize the future remaining leasing durations of available resources.
• Term 5minimize sum of unused present VM resources: The fifth term minimizes the sum of all leased but unused computational resource capacities in terms of CPU ( f C k v ) and RAM ( f R k v ) of all leased VM instances. Due to this term, our approach makes sure to not only schedule all service invocations that cannot be delayed any further without leading to penalty cost, but to also pre-schedule service invocations that may already be enacted but have a distant deadline. Again, this leads to a minimization of wasted computational resources, and therefore contributes indirectly to the cost optimization. We consider this term using weighting factors for CPU (ω C f ) and RAM (ω R f ) resources. • Term 6maximize the importance of scheduled service invocations: The last term calculates the difference between the last possible scheduling deadline of the next schedulable steps when performing a worst-case analysis based on the current time. The term considers all process instances and aims at giving a scheduling preference to process steps with closer deadlines. The rationale behind this is that process steps with such deadlines could lead to an SLA breach and according penalty cost. The term is responsible for defining the importance of schedulable process steps that do not necessarily have a pressing process deadline on remaining free resources. We consider the actual enactment deadline for the next schedulable steps based on the worst-case analysis instead of simply comparing the overall process deadlines. We also define the term such that past process deadlines can be considered and steps that are past their deadline receive a higher scheduling importance. We consider a weighting factor ω DL to assign a weight to the term.
In general, the mentioned weighting factors for the single terms of the objective function allow the user (e.g., an eBPMS operator) to control the effect of the respective terms on the overall optimization outcome. For instance, in some settings, ω DL might be weighted very high in order to support that all process instances are carried out in time. In other settings, this might not be very important, but a system operator might increase ω C f to minimize unused CPU resources (Term 5) in order to save energy.

Constraints
Apart from the objective function, it is also necessary to define constraints for the FFSIPP. To start with, Constraint (1) makes sure that deadlines are considered for each process instance i p . The constraint does not guarantee that deadlines are not violated, but it defines the penalty times e p i p of process instances which are subject to minimization in the presented Term 2 of the objective function. The constraint demands that the current time τ t plus the remaining worst-case enactment time of process instances ex run j ip + ex * j ip + e i p is smaller or equal to the defined deadline DL i p plus the potential penalty time e p i p which occurs when process instances finish after their deadline. This constraint considers the remaining enactment time including the time of process steps that are being scheduled during the current time period and process steps that have already been scheduled in previous periods and are still running. Naturally, the starting time for a complete process instance is defined by the computed starting time of the very first process step within the process model. For this, different workflow patterns are taken into account (see below).
Constraint (2) helps to define the start of the next optimization period τ t+1 , by demanding that the start of the next optimization period τ t+1 plus the remaining worst-case enactment time of process instances e i p is smaller or equal to the respectively defined process deadlines DL i p plus the possible penalty times e p i p . At this stage, the approach explicitly does not consider the enactment time of currently running process steps or process steps that are scheduled for enactment in τ t , as the earliest possible time when the next steps of a process instance can be scheduled is when the previous steps, already running or scheduled in τ t , are finished. Adding the remaining time of the currently running or scheduled steps to the left side of Constraint (2) can potentially lead to triggering premature optimization rounds at t + 1 when predecessor steps of the next schedulable steps are not finished yet (and hence no new steps can be scheduled).
Constraint (3) makes sure that the next optimization time period τ t+1 is defined to be in the future. We use the value > 0 to avoid optimization deadlocks arising from a too small value for τ t+1 . The start of the next optimization period is directly calculated as a result of the previous optimization rounds. Nevertheless, the optimization can also be triggered by other events, like newly incoming requests or finalized process steps and run earlier than the calculated time t + 1. In this case, a potentially still ongoing computation of an optimal task scheduling and resource allocation is canceled.
Constraint (4) calculates the remaining enactment duration e i p of a process instance. The remaining enactment duration does not include the enactment and deployment time of the process steps that will be scheduled for the current optimization period τ t , nor the remaining enactment time of the currently already running steps. The overall remaining enactment duration e i p of a process instance i p is the sum of the enactment times of the different workflow patterns that the process instance is composed of. We aggregate the upper-bound enactment times of the different workflow patterns, following the approach by [17].
The worst-case enactment times for sequences are defined in Constraint (5), for AND-blocks in Constraint (6), for XORblocks in Constraint (7), and for repeat loop blocks in Constraint (8). For AND-blocks, the longest remaining enactment time of all paths within the block has to be considered. As we are using a worst-case analysis, we also consider the longest path for the calculation of the remaining enactment time of XOR-blocks. For repeat loop blocks, the subpath enactment time is multiplied by the maximum possible amount of repetitions re. Constraints (5)-(8) consider the overall remaining enactment time of all not yet running process steps for each process instance i p as defined by the two helper variablesê s i p for sequences andê l i p for XOR-and AND-blocks in Constraints (10) and (11), respectively. Since we perform a worst-case analysis, both equations consider the worst-case VM startup time ∆, i.e., including the time for pulling the respective Docker image onto a running VM instance ∆ st , and the time for starting a new container instance ∆ c st j for each remaining process step j i p . If a process step j * i p is being scheduled in the current time period τ t , Constraints (5)-(8) subtract the worst-case enactment time of the scheduled steps ex j * ip as defined in Constraint (9), from the overall remaining enactment time.
Constraints (12) and (13) consider for each VM instance k v the sum of CPU and RAM resources required by all service invocations that either already run or are scheduled to run in any container on the VM instance in τ t . These resources need to be smaller or equal to the resource supply in terms of CPU (s C v ) and RAM (s R v ) that is offered by VM instances of type v.
Constraints (14) and (15) define for each VM instance v ∈ V, k v ∈ K v the remaining free capacities in terms of CPU and RAM that are not directly allocated to service instances. As expressed by the variable g (k v ,t) ∈ {0, 1}, which is further defined in Constraints (16) and (17), we only consider VM instances that are either already running or are being leased in τ t .
Constraints (16) and (17) define the value of the helper variable g (k v ,t) ∈ {0, 1} which takes the value of 1 if a VM instance is either already running (β k v = 1) or being leased for at least one BTU (y (k v ,t) ≥ 1) in τ t . g (k v ,t) is restricted to be a boolean variable in Constraint (28).
Constraint (18) ensures that for all VM instances v ∈ V, k v ∈ K v a VM instance k v will be leased or is running if service invocations are to be placed on it. Therefore, we calculate the number of process steps that are scheduled or already running on k v and make use of our helper variable g (k v ,t) as defined in Constraints (16) and (17), as well as a helper variable (M × N) that presents an arbitrarily large number, e.g., 100 × 10,000, as an upper bound of possible container deployments per VM instance times possible parallel service invocations per container instance. Notably, this upper bound does not imply that an according number of service invocations are actually carried out. Instead, the goal of this variable is to avoid that the optimization gets stuck in a loop.
Constraint (19) makes sure that for all VM instances v ∈ V, k v ∈ K v and all running or schedulable process steps j i p ∈ (J * i p J run i p ), the scheduled service invocations j i p will not be moved to other VM instances. First, we consider the remaining enactment time of a process step j i p for each process step scheduled on a VM instance (x ( j ip ,k v ,t) = 1). In case that the process step j i p is not running yet, we also have to consider the time to pull a new image ∆ st j and to start the needed container ∆ c st j , if the image does not exist and the container is not running on the scheduled VM instance (z (st j ,k v ,t) = 0). Furthermore, if the required VM instance k v is not up and running yet (β (k v ,t) = 0), we also need to add the time ∆ for starting the new VM instance k v to our calculation of the remaining enactment time. We demand the calculated remaining enactment time to be smaller or equal to the remaining leasing duration d (k v ,t) of the allocated VM instance k v . If the currently remaining leasing duration is smaller, the corresponding VM instance k v needs to be leased for y (k v ,t) ∈ N + 0 additional BTUs in the time period τ t to satisfy the constraint.
Similar to Constraint (19), Constraint (20) together with Constraint (23) ensures that all service invocations that are already running in a container on a certain VM instance at the start of τ t , will not be migrated to another VM instance (or container) during their invocation. We explicitly reference the already assigned VM instance k v by the additional indices in Constraint (20) and do not need to consider additional times for pulling container images or starting VM instances.
Constraint (21) defines the variable γ (v,t) for all VM types v ∈ V. γ (v,t) indicates the total number of BTUs to lease VM instances of type v, meaning it includes the decisions which VM instances k v to lease and for how long. To define γ (v,t) , we build the sum over all leased BTUs for each VM instance of type v.
Constraint (22) demands for all next schedulable process steps j i p ∈ J * i p that each service invocation is scheduled on only one VM instance (and later enacted within only one container instance) or postponed for a later optimization period.
Constraint (23) makes sure that all steps currently running on a VM instance k v remain on the same VM instance. This is achieved by setting the decision variable x ( j ip ,k v ,t) for each already running service invocation j run i p on a VM instance k v to 1. This constraint corresponds to inheriting the scheduling decision already made in a previous period.
The remaining Constraints (24)-(28) restrict the values particular variables can adopt. Constraint (24) restricts the decision variable x ( j ip ,k v ,t) that decides whether or not to schedule a service invocation j i p on a certain VM instance k v for all p ∈ P, i p ∈ I p , j i p ∈ J * i p to be a boolean.
Constraint (25) restricts the decision variable y (k v ,t) that decides for how many additional BTUs to lease a VM instance k v at time t for all v ∈ V, k v ∈ K v to be a positive integer ≥ 0. Constraint (26) does the same for γ (v,t) that decides for how many total BTUs to lease any VM instances Constraint (27) restricts the variable that indicates the penalty enactment time e p i p to be a positive real number.
Constraint (28) restricts the variable g (k v ,t) to be a boolean. The variable has been defined in Constraints (16) and (17) and takes the value of 1 if a VM instance is either already running (β k v = 1) or being leased for at least one BTU (y (k v ,t) ≥ 1) in τ t .

Transformation
Step Counterintuitively, the problem discussed so far partly disregards the container allocation: it schedules process steps directly on VM instances, while considering the current information about deployed containers. More formally, the output of the model is a task scheduling and resource allocation decision stating for all VM instances v ∈ V, k v ∈ K v what VM instances to lease for how many BTUs y (k v ,t) and for all next schedulable or running process steps j i p ∈J * ip J run This means that the actual container instances are not yet part of the scheduling plan after the optimization. While this information could also be derived from an extended version of the presented MILP problem, this would make the FFSIPP even more complex.
We opted against this for several reasons: Most importantly, the extended optimization model would have to handle a very large number of decision variables: First, a MILP solver has to decide for each VM instance in the set of leasable instances whether or not to lease the VM instance. Second, the solver would need to decide for each container instance whether or not to deploy a container with a certain configuration on a certain VM instance. Third, the solver would need to decide on which deployed container instance to schedule the service requests. When doing so, the computational complexity grows exponentially with the number of incoming process requests and also with the number of VM instances and container instances.
Related work in the field of MILP-based optimization problems has shown that solutions struggle with increasing problem sizes [18]. In order to avoid this, we introduce a so-called transformation step. This step wraps each scheduled process step of a certain service type in a container instance of the same service type, which is to be deployed on the respective VM as per the optimization (see Section 3.2.4). This guarantees the exact resources, as needed by the scheduled service invocations on the VM. Generally speaking, the transformation step described in Algorithm 1 decreases the problem size by avoiding that a MILP solver has to decide which containers with which configurations to deploy on the VM instances.
To transform the result of the optimization model to a result which takes into account container instances, Algorithm 1 iterates over all VM instances k v of the scheduling plan (line 1) and extracts all process steps that are scheduled for enactment on a VM instance (line 2). For all process steps j i p of the same for all j ip in V MS erviceMap.getValues(st) do 10: coS ize ← (coS ize + j ip .getResS ize()); 11: x ( j ip ,cst,t) ← 1; 12: end for 13: c st .setS ize(coS ize); 14: a (cst,kvt) ← 1; 15: end for 16: end for service type st (lines 3-5), a container instance c st is defined (line 7) with a configuration that makes sure that the containers minimum resource supply coSize is set to be exactly as large as the sum of scheduled service invocations of type st on k v (line 13). We can then exchange the variable x ( j ip ,k v ,t) from the MILP solution for the introduced variables x ( j ip ,c st ,t) and a (c st ,k v t) (indicating if the container c with the service type st should be deployed on VM k v in the time period τ t ), which we set to 1 (lines 11,14). This means, our scheduling plan schedules all service invocations j i p of service type st that were scheduled on k v on the newly defined container instance c st , while the container instance c st is scheduled on k v .

Enacting the Transformed Scheduling Plan
When enacting the transformed scheduling plan, the main tasks of the eBPMS are to lease or release VM instances, to deploy, stop, or adjust containers, and to place the service invocations. For each task, different rules have to be considered: First, whenever the decision variable y (k v ,t) takes a value > 0, the corresponding VM instance k v needs to be leased or the lease of the VM instance needs to be extended by more BTUs. If during an optimization round no containers are scheduled on a VM instance k v , the instance will still continue to be running until the end of its leasing duration.
Second, whenever the reasoner delivers the solution a (c st ,k v ,t) = 1 for a container instance c st , either the deployment of the instance is initiated by the eBPMS if a container of type st is not running on k v at time t, or a currently running container of type st on k v is potentially resized to match the defined container configuration. If a container instance of service type st on a VM instance k v is currently running during τ t , but the scheduling plan does not define a corresponding container scheduling of the form a (c st ,k v ,t) = 1, the running container is immediately shut down to free up resources for other containers.
Third, all scheduled service invocations x ( j ip ,c st ,t) = 1 that are not yet running are invoked by the eBPMS on the defined container c st . As the scheduling plan also contains running steps, the enactment of those service invocations that have al-ready been scheduled for the first time in a previous optimization round remains unchanged.  In this section, we conduct a quantitative analysis of the implementation of the FFSIPP as presented in Section 4. As testbed, we use an extended version of the eBPMS ViePEP [11,15], which also provides the performance metrics needed in our optimizations. For the predictions of CPU demands, we apply the values mentioned in Tables 10 and 12. However, we could also apply a prediction approach for this, e.g., [19].

Evaluation
All evaluation runs have been executed on a MacBook Pro with an i5 quad core CPU with 2.50 GHz, 8 GB of RAM, running Ubuntu 16.04 with Linux kernel 4.8.0. As MILP solver, IBM CPLEX is used. Internally, CPLEX makes use of different (simplex) algorithms.

Process Models
We perform our evaluation using a subset of the SAP reference model [20], which has been used for multiple scientific papers, e.g., [21], and provides a solid foundation for our evaluations. From the around 600 process models in the reference model, we select ten models with different process patterns and varying levels of complexity, including sequences, XOR-blocks, AND-blocks, and repeat loops. All XOR-and AND-blocks start with a split and end with a merge pattern. The merge for AND-blocks is blocking, while the merge for XOR-blocks continues the process enactment as soon as the last process step of one optional branch is finished. Our chosen process models range from simple sequences to complex process models (see Table 8).
For the single services providing the needed software functionalities of process steps, we take into account two different settings in order to evaluate the performance of our approach: In Section 5.5.1, we use resource-intensive services for the single process steps. In Section 5.5.2, we apply less resourceintensive services in order to evaluate whether this aspect leads to significant differences in the evaluation results. We assume that the service makespans are rather long, i.e., that the services cover long-running computational tasks.

Applied SLAs
We evaluate our approach using two different process deadline scenarios. In the first scenario, we use strict deadlines and demand the latest point in time when the enactment of process instances has to be finished to be 1.5 times the process model's average makespan from the point in time when the request is sent. The second scenario allows more lenient SLA values and we demand 2.5 times of the process model's average makespan as the maximum enactment duration. These values were chosen based on preliminary evaluation runs and to account for the startup time of VM instances and the time to pull Docker images and deploy container instances.
For calculating penalty cost, we apply a linear cost model which assigns one unit of penalty cost per 10% of time units of delay.

Process Request Arrival Patterns
Our experimental design accounts for two different process request arrival patterns. In one scenario, we design a constant arrival pattern. Specifically, we choose to request two process instances every two minutes, alternating process instance requests for process models 1 to 5 and 6 to 10 until 50 process instance requests have been sent. In a second scenario, we follow a pyramid-like function for designing our arrival pattern. We send a total of 100 randomly shuffled process instance requests in different batch sizes, ranging from one to five instances at a time in an interval of one minute. Equation (29) represents the pyramid pattern, n representing the time in minutes since the start of the experiment, and a representing the number of new process requests.
These two different arrival patterns have been chosen in order to evaluate the presented approach in a rather stable environment, with process requests coming in constantly, and a more volatile environment, where the requests do not follow such a constant pattern. This may lead to different results, since our optimization model does not regard process request arrivals. However, it might be interesting to integrate such knowledge in the future (see Section 7).
Notably, we have also tested other arrival patterns and settings in preliminary evaluation runs. The presented settings have been chosen, since they are representative for the observations we have made in our preliminary tests.

Test Environment
For allowing reproducible test scenarios over multiple hours and with different pricing models, we perform the optimization runs using the simulation mode of ViePEP. This means that a complete process landscape is modeled and requested using the eBPMS, and the optimization model is able to operate with these values. However, the actual leasing of resources is not activated. Instead, the utilization of VMs is calculated based on the characteristics of the evaluation services (see Sections 5.5.1 and 5.5.2).
Our system considers seven VM types with the characteristics listed in Table 9. As it can be seen, we allow both privately hosted and publicly hosted VMs. Regarding the pricing model, we assume that leasing a VM instance with x cores is cheaper than leasing two VM instances with x/2 cores, i.e., the marginal costs are decreasing. We apply a BTU of five minutes for both private and public cloud resources. Also, we assume that VMs from the private cloud are cheaper to lease than equally sized VMs from the public cloud.
As it can be seen in the table, we do not further regard RAM utilization, even though RAM is explicitly foreseen in the problem formulation presented in Section 4. The reason for this is that preliminary results have shown that since both RAM and CPU are additive resources, the RAM utilization does not impact the overall cost too much. So, in order to keep the evaluation section concise, we opted to not further discuss it here.
In the evaluation, we assume a VM startup time of 60 seconds, a time to pull Docker images from the central registry onto a VM instance of 30 seconds, and a time to start a new Docker container and the contained service from an existing image of two seconds. These values have been chosen based on recommendations in the related work [22,23,24].

Metrics
We assess the outcome of our experiments by using different metrics: Minimizing the total cost is the core goal of FF-SIPP. Accordingly, we measure the cost arising for enacting a complete business process landscape over time. These cost include the VM leasing and penalty cost over all process enactments during an experiment's runtime.
In addition, we measure two secondary metrics in order to assess if FFSIPP also contributes to achieving them: SLA adherence calculates the percentage of process requests which meet their SLAs, i.e., the process instances that finish their enactment before the defined deadline. As described in Section 4.1, SLA adherence is not a hard constraint in our optimization model, but is indirectly achieved by taking into account that penalty cost accrue if an SLA is violated.
In addition, we also measure the makespan, i.e., the total duration for enacting all incoming process requests in a particular experiment, from the first-received request to the last finished process step. Since the arrival of a process request is not needed in our system model, this value is monitored by our evaluation environment, i.e., ViePEP.
Experiments are repeated three times in order to take into account that the duration of a service invocation may have some spread, as described in Section 5.5.1. Accordingly, we calculate the standard deviations σ for all metrics.

Baseline
As the baseline for the evaluation of FFSIPP, we apply a slightly modified state-of-the-art approach for VM-based resource allocation and task scheduling by Hoenisch et al. [11], called Service Instance Placement Problem (SIPP). The SIPP approach uses an optimization model that directly schedules process requests on VM instances, while each leased VM instance is only able to enact process requests of one specific service type. Containers are not regarded.
The modifications of the originally presented baseline are made with regard to the utilized time constraints which we define according to the time constraints also used by our approach as presented in Constraints (1) and (2). Furthermore, we allow the change of the offered service type of a VM instance during an uninterrupted leasing duration whenever no more service requests are being enacted by a VM instance. When changing the offered service type, a service deployment time of another 30 seconds is considered and again only one service type is offered at any point in time by a VM instance in the baseline. As mentioned in Section 5.1.1, we apply two different types of services in our evaluation. First, we discuss rather resourceintensive services, while services with smaller resource demands are covered in Section 5.5.2.

Resource-intensive Services
The characteristics of the services for the scenario at hand are presented in Table 10. The values in Table 10 represent mean values of general normal distributions with σ cpu = µ cpu /10 and σ dur = µ dur /10. This is done in order to reflect that in realworld settings, services will not always have the same makespan, e.g., since the base loads of a container or VM may differ. A services' CPU load refers to the required amount of CPU resources in percent of a single core, meaning all services with a CPU requirement of more than 100%, cannot be scheduled on a single-core VM and the corresponding containers will need to be placed on a multi-core VM instance. We assume that services are fully parallelizable. Constant Arrival of Resource-Intensive Processes. First, we compare the results for resource-intensive services for the constant arrival pattern. Figure 1a shows the results for process requests with a strict deadline, while Figure 1b depicts the results for the lenient SLA. The charts plot the leased CPU cores over time and also show the corresponding process request arrival patterns. The horizontal axes show the time in minutes. The left vertical axes display the number of leased CPU cores while the right vertical axes represent the number of parallel process requests. An overview of the results is shown in Table 11. The table presents the numerical average values of the evaluation runs and the standard deviations. It is important to distinguish between the total makespan in minutes as discussed in Table 11, which refers to the time for enacting all incoming process requests, and the times shown in Figure 1 which refer to time slots when VM instances (cores) were leased. As can be seen from Table 11, our optimization approach yields a high SLA adherence of 98.67% with a very small standard deviation of only 1.15 percentage points (pp) and only 1 unit of penalty cost for process requests with strict enactment deadlines. Compared to the baseline which only yields an SLA adherence of 86.00% with a standard deviation of 2.00 pp, and on average 15 units of penalty cost, the FFSIPP approach is significantly improving the detection of potential SLA violations and also able to rapidly calculate a good scheduling strategy. Furthermore, regarding the leasing cost, our approach leads to only about half the cost of the baseline with also a lower associated standard deviation.
When comparing the result for more lenient deadlines, we can observe a much better SLA adherence of 98.67% for the SIPP baseline (as compared to strict deadlines), but again a better SLA adherence of 100.00% for all performed runs using the FFSIPP approach. This means our approach is able to finish all incoming process requests within the defined deadline constraints for all evaluation runs. The leasing cost are again nearly half as high compared to those of the baseline. The low leasing cost of our approach are a result of the near-optimal resource utilization that is realized through the dynamic assignment and reassignment of Docker containers for the enactment of different service types that only reserve as much space from the underlying VM instances as they actually require.
Notably, the enactment of process requests using our approach with lenient process deadlines leads to a longer total makespan and lower total leasing cost compared to the enactment of process requests with a strict deadline. When looking at the number of leased resources in Figure 1b, we can clearly observe that our approach leases a smaller amount of computational resources in terms of CPU cores than the SIPP baseline at most points in time, and that our approach is able to postpone the enactment of process steps with a distant deadline for as long as possible, if that is beneficial in terms of cost. This explains why after 33 minutes the number of leased resources increases after it had already declined. The baseline approach does not make use of the more distant deadline constraints in a similarly efficient way, and also does not utilize the existing resources to the same degree as it is possible with containers. Here, the shortcoming that the baseline assumes that only one service can be deployed on one VM at the same time, is one major cost driver. The reason why the makespan for the baseline is similar for both the strict and the lenient process deadlines is that there are already sufficient computational resources leased at earlier points in time. These resources were not fully utilized and were able to perform the enactment of process steps ahead of their scheduling deadlines.
Pyramid Arrival of Resource-Intensive Processes. Next, we compare the enactment results for resource-intensive services for the pyramid arrival pattern as introduced in Equation (29). An overview of the results is again given in Table 11. Figure 2a shows the results for process requests with a strict deadline, while Figure 2b depicts the results for lenient process requests.
Again, when compared to the baseline, our approach results in a better SLA adherence and lower associated penalty cost as well as leasing cost that are approximately half as high. This time, the difference between the enactment of process requests with a strict or a lenient deadline is relatively small. The explanation for the large saving of leasing cost of our approach is the same as for the constant arrival pattern and can be attributed to the more fine-grained resource utilization which can be accomplished through FFSIPP. Once again, our approach was also able to postpone steps into the future, leading to a longer total makespan for process requests with lenient deadlines, when compared to the baseline.
It should be noted that lenient deadlines lead to better results in both our approach as well as the baseline, but an important observation can be made when looking at the evaluation more closely. The performance benefit, especially in terms of cost is much higher when considering lenient deadlines for the baseline approach.
Our approach also yields a slightly better result for lenient deadlines, but in comparison, this difference is rather small. For the baseline, a large number of requests that have to be enacted in close temporal proximity result in having to lease individual VMs for almost all service types. Some service types might only occupy a small part of a leased machine while for other types multiple machines need to be leased. More lenient deadlines allow the use of already leased machines when computational resources are freed up in the near future, leading to the observed performance benefit. Depending on the defined preferences and cost considering penalties, the system can accept higher penalties for lower leasing cost. The higher the accepted penalties are, the more leasing cost could be saved.
In contrast to SIPP, our approach is able to use free resources from any leased VM to deploy a container of any type with only as many assigned resources as the invocation of service requests requires. In contrast, the SIPP assumes that there is one service per VM running concurrently. This flexible of FFSIPP resource utilization leads to comparable leasing cost for strict and lenient deadlines, as the number of leased but unused resources is not increased as easily as for the baseline.
The results clearly show the main strength of FFSIPP, which is the better resource utilization due to a fine-grained scheduling leading to overall lower leasing cost. We show this main strength while comparing our approach to an already strong baseline, which delivers considerably better results in terms of cost and SLA adherence than simple threshold-based ad-hoc scheduling strategies [11]. The baseline approach already delivers a good SLA adherence as it detects potential violations in time and optimizes the scheduling decision accordingly. Nevertheless, FFSIPP leads to even less SLA violations. Both approaches allow SLA violations if the associated penalty fee leads to lower total cost than leasing additional resources to finish process enactments in time. As our approach allows a more flexible scheduling of containers on VMs, it can perform cheaper scheduling decisions and make better use of already leased resources, resulting in lower SLA violations to leasing cost conflicts.
Generally, the results do not only depend on the number and type of process request arrivals and the available resources, but also on the attributes of the process steps. In particular, service types with larger resource requirements will lead to large containers taking up a great amount of the offered resources of a VM instance and, therefore, fewer resources remaining available for other service requests of different service types. This consideration leads to the assumption that our approach is capable of outperforming the baseline even more when service instances with smaller resource requirements are considered.

Less Resource-intensive Services
To evaluate this assumption, we perform the same evaluation runs as discussed before. However, we are now using the less resource-intensive service types introduced in Table 12, instead of the previously used more resource-intensive service types from Table 10.
Constant Arrival of Less Resource-Intensive Processes. The results for the constant arrival pattern and the less resourceintensive processes are presented in Table 13. Figure 3a shows the results for process requests with a strict deadline, while Figure 3b depicts the results for lenient process requests.
As expected, the results for process requests composed of less resource-intensive process steps show even higher savings in terms of leasing cost when comparing our approach to the  baseline, with around 2.5 times lower cost. The SLA adherence of our approach for less resource-intensive processes is comparable to the evaluation of the more resource-intensive processes as presented above, but the SIPP baseline shows a higher SLA adherence with the less resource-intensive service types. The improved SLA adherence for the baseline is easy to explain when considering that with smaller service types more service invocations of the same type can be enacted on a VM instance, leading to a lower number of penalty cost versus leasing cost conflicts for the baseline approach. As FFSIPP is able to place requests on any already leased VM instance, there already exists a relatively large amount of scheduling flexibility for the more resource-intensive service types, leading to similar SLA adherence values, independent of the required resources for process steps.
All other observations already discussed for more resourceintensive process steps can also be observed in the evaluation runs discussed in this section, e.g., the consequences of more lenient deadlines.
Pyramid Arrival of Less Resource-Intensive Processes. Finally, we compare the results for less resource-intensive processes for the pyramid arrival pattern as introduced in Equation (29). Table 13 again gives an overview of the results. Figure 4a shows the results for process requests with a strict deadline while ure 4b depicts the results for lenient process requests. Again, we can observe that our approach leads to about 2.5 times lower leasing cost for process requests composed of less resource-intensive process steps when compared to the baseline. We can also make the same observations for SLA adherences as we have already done for the constant arrival of less resource-intensive processes, as well as the other observations discussed above for more resource-intensive process steps. However, there is one notable exception: For the strict deadlines, the baseline provides a better SLA adherence of 98.67% compared to FFSIPP's 97.33%. However, this comes at the price of a cost increase of 156.37%.

Summary and Discussion
In this section, we presented an extensive evaluation of the FFSIPP approach. In the evaluation, we considered a number of evaluation process models, different process request arrival patterns and system settings, and presented the associated enactment results. We evaluated the results of the MILP-based FFSIPP combined with the transformation step, comparing it to a state-of-the-art approach which does not take into account containers. We showed that due to the overall more efficient use of leased computational resources, our approach calculates scheduling results with 2 to 2.5 times lower leasing cost if compared to the baseline. FFSIPP also outperforms the baseline with regard to SLA adherence, achieving adherence levels of at least 97% for all evaluated scenarios.
Despite the promising results, it should be taken into account that the evaluation could of course be further extended. For instance, the evaluation setting is relatively small, with 50 and 100 process requests, respectively. As mentioned in Section 4.3, MILP-based optimization becomes difficult to achieve if the problem sizes increase. The reason for this is that the scheduling of services is an NP-hard problem [11], i.e., it is unknown if a solution to the optimization problem can be found in polynomial time. Given the large number of variables, the optimization problem shows scalability issues if too many process requests have to be handled at the same time. This could be solved by applying a heuristic algorithm to solve the optimization problem, e.g., genetic algorithms [25].

Related Work
Elastic processes have gained quite a lot of attention by the cloud computing and BPM research communities in recent years. In the following paragraphs, we discuss relevant concepts for optimized scheduling and resource allocation for elastic processes.
To start with, a multitude of solutions for task scheduling and resource allocation have been proposed for single services and applications and aiming at the VM level, e.g., [26,27].
In addition, some approaches regard resource allocation and task scheduling on the container level: [10] propose a gametheoretic model, aiming to find a solution which reduces the response times while improving the resource utilization of cloud providers. [28] formulate a multi-objective optimization problem for finding an optimal resource allocation and task scheduling. Importantly, the presented solution aims at both the VM level and the container level, i.e., the authors combine horizontal and vertical scaling, as it is also the foundation for the work at hand. [29] propose an Integer Linear Programming problem that considers heterogeneous container requirements and VM resources when calculating an optimal allocation as well as a runtime reallocation of containers on a set of leased VMs.
The discussed approaches focus on cost measures based on the actual utilization of cloud-based computational resources as well as breaches of negotiated SLAs, but generally do not consider the process perspective. Therefore, findings from resource allocation and task scheduling for single services can not be directly mapped to elastic processes. [30] propose an auto-scaling mechanism for the orchestration of containers. For this, the authors present a number of bioinspired algorithms which are used to scale the computational resources. [31] presents a survey and a reference architecture for container orchestration. It should be noted that container orchestration is usually not based on complex process patterns as we have applied in the work at hand.
For the realization of elastic processes, it is especially necessary to account for the data and control flows that come with the enactment of processes [5]. Again, a number of resource allocation and task scheduling solutions which aim at VMs (instead of containers) have already been proposed: [6] present a solution for scheduling multiple workflows with QoS constraints in the cloud. The proposed scheduling algorithm considers factors that affect the total makespan and cost of workflows, and aims at improving the mean enactment time and enactment cost of all workflows in a process landscape, while taking into account QoS constraints. A multi-objective genetic scheduling algorithm for BPEL workflows in distributed cloud environments is presented by [7]. Their approach considers data dependencies between BPEL workflow steps and uses workflow enactment times as well as cost for the needed computational resources. By using weights, the Pareto-optimal solution of the multi-objective heuristic can be transformed into a unique solution. A number of strategies that are based on similar assumptions have also been proposed by [32]. The authors aim at scheduling process steps of business processes using elastic cloud-based resources, while optimizing enactment time and cost. Both the approaches of [7] and [32] provide solutions that allow for a parallel enactment of processes, but in contrast to our work, do not account for SLAs.
SLAs like deadlines for single tasks and processes have been considered for sequential processes by [33]. The authors introduce an adaptive configuration algorithm for dynamically managing VMs for service-based workflows in the cloud. [8,34] discuss an ILP-based solution and a genetic algorithm that aim at finding an efficient resource allocation for elastic processes while reducing the number of migrations from one VM to another VM. In contrast to the work at hand, processes are not divided into steps. Hence, in our work, we aim at providing computational resources on a more fine-grained level.
None of the so-far mentioned solutions makes use of containers. Hence, in the work at hand, we propose an approach to exploit the advantages of container-based virtualization approaches, allowing a more fine-grained model for resource allocation and task scheduling for elastic processes. To the best of our knowledge, the related work explicitly aiming at the optimization on the container-level is still very limited.
Most existing approaches have been proposed in the area of scientific workflows (SWFs), e.g., [35,36]. The main limitation of these approaches is that they do not consider concurrent processes, which are the norm in the area of BPM. Furthermore, SWFs are generally more data flow-oriented, while business process scheduling is used in complex landscapes with concurrent process requests. Business processes often share the same services and tend to be more control flow-driven than SWFs [37]. Hence, solutions from the field of SWFs give some interesting ideas, but cannot be directly applied to BPM.
In our former work [15,25], we discuss an updated version of ViePEP, which is able to use containers instead of VMs for service deployment. We also extend our optimization models for resource allocation and task scheduling by allowing optimization both on the VM and on the container level. For this, we apply genetic algorithms, but have so far not provided an optimal solution on the VM level as we do in the work at hand by formulating a MILP problem.
The idea of using microservices for realizing business process steps is discussed by [38]. The authors make use of a distributed, actor-based approach, where actors are connected to each other. This allows high scalability, but makes it necessary that the actors are aware of each other and of the underlying process models. [39,40] also make use of containers for process enactment. Similar to the work at hand, the goal is to find a cost-optimal solution to the resource allocation and task scheduling problem. Notably, the authors allow scaling on the level of VMs and a subsequent allocation of containers, i.e., also combine horizontal and vertical scaling. For this, the authors apply linear programming and genetic algorithms. However, optimization is only done for single processes instead of complete process landscapes, and containers (respectively the underlying computational resources) cannot be shared between processes. Process deadlines are not regarded. In contrast to the work at hand, [39,40] do not allow a trade-off between SLA breaches and cost through the integration of penalty fees. Nevertheless, the approach by [39,40] comes closest to our work presented here.
Last but not least, it should be noted that our work makes use of worst-case assumptions for chosen paths in a process model, startup times of containers, etc. While this is a very common approach in business process and service research, it could of course also be interesting to take into account some predictions about process behavior in order to avoid the complex and conservative worst-case analyses applied in our work. Most importantly, predicting the next process step, as proposed by [41] for implicitly defined process models, is necessary for the work at hand. Going one step further by incorporating approaches to predict the chosen process path, e.g., [42], would allow us to decrease the search space of the optimization, which could result in faster results which fit the actual process enactments even better.

Conclusion
Elastic processes, i.e., business processes enacted on elastic cloud infrastructure, have so far been primarily regarded on a rather coarse-grained level, with VMs being used as computational resources. The utilization of container technologies in order to provide more fine-grained control over cloud-based computational resources has the potential to save cost and to benefit from startup times that are significantly smaller. One particular research question in this area is how to make sure that the process steps are carried out in a cost-efficient way while taking into account the QoS requirements of the process owners.
In this paper, we introduced a multidimensional optimization approach, which is combined with a transformation step in order to realize cost-efficient auto-scaling of container-based elastic processes. Our approach enables fine-grained resource allocation and task scheduling for elastic processes. Scaling is achieved over four dimensions, i.e., horizontally and vertically, both for VM resources and Docker containers. The approach focuses on the minimization of VM leasing cost as well as penalty cost for SLA violations. As the evaluation has shown, this leads to significant cost reductions in the enactment of business process landscapes, up to a factor of 2 to 2.5 compared to a state-of-the-art approach. Also, our solution further improves the already very good SLA adherence of the state-of-the-art.
In our future work, we want to integrate approaches which predict the process request arrival patterns based on historical data. This way, the FFSIPP could be enhanced from a reactive into a predictive approach. Also, we want to take into account that process makespans may also include communication and data transfer overhead, by extending our system and optimization model accordingly. Last but not least, applying serverless approaches could lead to an even higher level of flexibility, and is therefore an interesting option for the future.