# Enabling Role-Based Orchestration for Cloud Applications
## 4 Experimental Evaluation
### TOSCA Model Conversion Cost
However, auto-scaling may interfere with progressive delivery. For example, with incoming requests decreasing, an auto-scaling decision may shut down newly-created replicas of the new version, which is probably not what is expected to happen. Therefore, before initiating progressive delivery, operators should lock the total number of replicas in the step _lock_autoscaling_. In the following step of _config_rollout_, operators assign proper values to the rollout parameters, such as rolling interval and batch size of each increment, according to which the workflow engine creates and attaches a rollout capability node template to the target component node. As the only step belonging to developers, _rolling_update_ accepts a new version of the application as the input parameter. Once the configuration is complete, the workflow engine packs the new configuration of components as well as newly added rollout capability, and applies it to the cluster. The _rollout_ controller can detect any modification on target components and trigger a batch of rolling update according to the rule defined in the step _config_rollout_. In each round of the rolling update, a certain portion of replicas are replaced with the new version. When all replicas are upgraded to a new version successfully, operators deactivate the rollout capability of the component. Finally, the auto-scaling gets unlocked to allow it to resume its normal operation. \begin{table}
\begin{tabular}{l l} \hline \hline \multicolumn{3}{c}{**Related Underlying Resource Configuration Fields**} \\ \hline metadata & **services(.core)/v1 (Prometheus component)** \\ \hline spec.ports.* & apiVersion/kind \\ \hline.spec.selector &.metadata \\ \hline
**scaledobjects.keda/v1 alpha1** &.spec.ports.* \\ \hline apiVersion/kind &.spec.selector \\ \hline metadata & **configmap(.core)/v1 (Prometheus component)** \\ \hline.spec.scaleTargetRef.deploymentName & apiVersion/kind \\ \hline.spec.minReplicaCount &.metadata \\ \hline spec.maxReplicaCount &.spec.data \\ \hline.spec.triggers[0].type & \\ \hline.spec.triggers[0].serverAddress & \\ \hline.spec.triggers[0].metricName & \\ \hline.spec.triggers[0].query & \\ \hline.spec.triggers[0].threshold & \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Cont. ```
1 workflows:
2 progressive_delivery:
3 steps:
4 lock_autoscaling:
5 target: auto-scaling
6 activities: [...]
7 on_success:
8-config_rollout
9 config_rollout:
10 target: rollout
11 activities: [...]
12 on_success:
13-rolling_update
```

Listing 7: Orchestration workflow of progressive delivery. The experiment considers upgrading the WordPress application from version v1 to version v2. For the sake of observation, we developed a service endpoint for WordPress server, observe/rollout/version, which returns the version name of the component. The progress of rolling update can be estimated by looking at accumulated response time from each version. Since incoming requests are evenly distributed across the replica set, elapsed times of each version would represent its share of the total processing capacity. Figure 12 illustrates the progress of the rolling update in terms of the response time, as its update round performs repeatedly. In addition, 10,000 requests are generated by using Apache server benchmarking tool (ab -n 10,000 -c 1 <service-host/observe/rollout/version>). As shown in the graph, all traffic is initially handled by v1 replicas. According to the rollout strategy batch: 20% that we use, every round, one fifth of the replicas are being replaced with a new version, which can be observed from the correspondingly increasing response time of the new replicas. ### Discussion

To the best of the authors' knowledge, we are the first ones to explore the possibility of the integration of two prominent orchestration technologies of TOSCA and OAM. Unlike other approaches, TOSCA application components are mapped to underlying OAM entities in our orchestration scheme.