# The FaaS-Based Cloud Agnostic Architecture of Medical Services--Polish Case Study
## 4 Results
### Results For Experiments with Continuous and Variable Load Profile  
In experiment (B), the following load profile (trapezoid shape) was used:  
\[\text{NoR}(t)= \begin{cases}0&0\leq t<t_{1}\\ \frac{\text{NoR}_{max}}{t_{2}-t_{1}}(t-t_{1})&t_{1}\leq t<t_{2}\\ \text{NoR}_{max}&t_{2}\leq t<t_{3}\\ \frac{\text{NoR}_{max}}{t_{3}-t_{4}}(t-t_{4})&t_{3}\leq t<t_{4}\\ 0&t_{4}\leq t\leq t_{5}\end{cases} \]  
describing the dependency between the number of requests per second (NoR) and time. To generate the defined load profile, the Gatling ([[https://gatling.io/](https://gatling.io/)]([https://gatling.io/](https://gatling.io/)), accessed on 17 May 2022) tool was applied. A sample generated load for the following parameter values--\(\text{NoR}_{max}=50\) rps, \(t_{1}=15\) min, \(t_{2}=t_{1}+10\) min, \(t_{3}=t_{2}+10\) min, \(t_{4}=t_{3}+10\) min and \(t_{5}=t_{4}+15\) min = 1 h--is presented in Figure 3.  
The trapezoid test profile was used for load testing either classic Pods or FaaS ones. In the described solution, a classic ACS _Pod_ has a value of RAM limit set to 1 GB. A FaaS ACS _Pod_ has a value of RAM limit set to 64 MB. The classic solution is not scaled-in to 0. Moreover, it supports a high availability property (fault tolerance) so there are at least two _Pods_ of ASC in a namespace. In the current version of the cloud healthcare service, 10 was taken (inherited assumption) as a value of the maximum number of classic _Pods_ that can be instantiated by HPA during autoscaling. That means that the number of classic _Pods_ may change from 2 to 10. That also means that the maximum for the sum of the RAM limits of running classic _Pods_ is equal to \(10\times 1\) GB = 10 GB. Maintaining the assumption that the maximum memory limit for classic ACS _Pods_ is 10 GB RAM, the maximum (for HPA) number of FaaS ASC _Pods_ is 10 GB / 64 MB = 160. Figure 3: Sample trapezoid load profile—the course of the number of requests per minute. The classic and FaaS solutions were compared using some quality indicator (QI) based on a total size of allocated memory measured as a sum of the limits of instantiated \(Pods\). QI is an integrated sum of memory limits (SML) for all instantiated \(Pods\) along the time of the experiment divided by the time of the whole experiment (\(T_{max}\)):  
\[\text{QI}=\frac{1}{T_{max}}\int_{0}^{T_{max}}\text{SML}(t)\,dt\]  
A similar quality indicator for estimating the cost of a system (but based on the integration of the number of processing units such as virtual machines or \(Pods\)) is used in [33]. The experiment consists of a series of one-hour loads defined by the described trapezoid test profile (\(\text{NoR}_{max}=50\) rps, \(t_{5}=1\) h). \(T_{max}\) was assumed to be 10 h, which means 10 times the usage of the one-hour load test profile. In the following part of this subsection, the results of the load testing of authorization functionality based on the introduced quality indicator are presented. The proposed method of evaluation used some constraints according to the assumed service level agreement (SLA). For the considered system, the SLA was based on a high order of quantile for the times of request execution. In accordance with the business clients of cloud healthcare services, it was assumed that the 95 th-order quantile of execution times for an authentication request should be less than 200 ms. The resulting time statistics are presented in Figure 4(a) (FaaS solution) and Figure 4(b) (classic one). In addition, the distributions of the times of an execution are shown as histograms for both solutions in Figure 5(a) (FaaS solution) and Figure 5(b) (classic one). We can confirm satisfying the mentioned SLA criterion by both solutions--both values of 95 th columns are less than 200 ms in Figure 4.  
Statistics such as means, medians and other quantiles are smaller for FaaS. In addition, the dispersion of the values of times (measured by standard deviation--Figure 4--or by the length of the support of the domain of histograms--Figure 5) is smaller for FaaS.