# Stochastic Model Driven Performance and Availability Planning for a Mobile Edge Computing System
## 5 Evaluation of MEC Availability
### Extended Proposal--Architecture
#### 5.2.1 Extended Proposal--SPN Model  
Figure 15 presents an extended SPN model for the MEC architecture, with _2 slave servers_ and a _master server_. The extended SPN model presents a change in the _slave server_, while the _master server_ maintains the same components. As mentioned earlier, this new model features a hybrid mechanism between warm-standby (HW and OS components) and cold-standby (DD and CTS components). If any of the software components of _slave server 01_ fail, other components will be started in _slave server 02_. Two new transitions were added to satisfy these conditions, HWSF_MTTF and OSSF_MTTF (in the _slave server 02_ block), which represent the MTTF for HW and OS when Docker is down, that is, HW and OS are idle.  
It is enough to observe the state of the upper layers of the architecture to calculate availability due to components dependency. Thus, the system will be working when both containers and the load balancer are working. The NCT is the parameter that represents the maximum number of containers that the system can run. In other words, the sum of the number of active containers on the two redundant servers cannot exceed the value of NCT. The SWITCH_TIME transition is triggered when the _slave server 01_ fails, and this time corresponds to the time it takes for the _slave server 02_ Docker to start up. Firing SWITCH_TIME also puts the number of containers corresponding to NCT in place CTS2_D, that is, the containers are created with inactive status on the _slave server 02_, and they will take some time to be instantiated, corresponding to transition CTS2_MTTR. Therefore, the availability of the second model is given by \(A~{}=~{}P\{(\#CTS1\_U+\#CTS2\_U)~{}=~{}NCT)AND(\#LBM\_U>0)\}\). It is worth mentioning that the MTTF transitions are infinite server type (parallel), and the MTTR transitions are single server type (concurrent).  
Figure 14: Layered architecture with redundancy under the slave server.  
Table 6 shows the guard conditions used for the operation of the system in the extended model. In this case, using guard conditions avoids visual pollution in the model since several connections should be made, and this would make the model difficult to understand.  
\begin{table}
\begin{tabular}{l c c} \hline \hline
**Transition** & **Expression** & **Description** \\ \hline OSS2\_MTTR & HWS2\_U \textgreater{} 0 & Enabled when HW is up. \\ \hline DDS2\_MTTR & OSS2\_U \textgreater{} 0 & Enabled when OS is up. \\ \hline CTS2\_MTTR & (DDS2\_U \textgreater{} 0) AND (CTS2\_U \textless{} CTS1\_D) & Enabled when Docker of _slave server 02_ is up and _slave server 01_ has more containers down than containers enabled on _slave server 02_. \\ \hline HWSF\_MTTF & S2\_OFF = 1 & Activated when _slave server 02_ is idle. \\ \hline OSSF\_MTTF & S2\_OFF = 1 & Activated when _slave server 02_ is idle. \\ \hline HWS2\_MTTF & S2\_OFF = 0 & Activated when _slave server 02_ is up. \\ \hline OSS2\_MTTF & S2\_OFF = 0 & Activated when _slave server 02_ is up. \\ \hline T91 & ((\#CTS1\_U = NCT) OR (\#OSS2\_U = 0)) & Activated when the _slave server 01_ is up or when the dependent component (OS) is down. \\ \hline T101 & ((\#CTS1\_U = NCT) OR (\#DDS2\_U = 0) OR (\#CTS2\_U \textgreater{} 0 \textless{}1 \textgreater{}D)) & Activated when _slave server 01_ is up or Docker has crashed, or the number of up containers on _slave server 01_ has become greater than on _slave server 02_. \\ \hline T0 & \#CTS1\_U = NCT & Activated when _slave server 01_ is up. \\ \hline SWITCH\_TIME & \#CTS1\_D \textgreater{} 0 & Activated when _slave server 01_ fails. \\ \hline \hline \end{tabular}
\end{table}
Table 6: Guard conditions to the extended model.  
Figure 15: Extended SPN model for an MEC architecture with redundant slave server.