*3.3. Software Aging and Rejuvenation*

For urban air mobility (UAM), it is necessary to create a vehicle digital twin (DT) that uses a precise, physics-based emulator to characterise a vehicle's statics and dynamics. As a result, the UAM operational digital twin infrastructures need the deployment of the digital twin in vehicle operations and control (UAM-ODT). The problems are, (i) the absence of digital twin engines for the digitalization (twinization) of dynamics and control of UAM vehicles running at the core of UAM-ODT systems; (ii) the absence of back-end system engineering in the development of UAM vehicles; and (iii) the absence of fault-tolerant mechanisms for the DT cloud back-end systems running 24/7 uninterrupted operations. Unmanned vehicles, also known as drones, are a relatively new technology and there are still many challenges and limitations associated with their use. One of the main causes of errors in the management of unmanned vehicles is the lack of a reliable and robust communication system. This can make it difficult for the operator to control the drone and receive accurate information about its location and status. Additionally, the complex algorithms used to control the drone's movements can sometimes produce unexpected or unpredictable behavior, leading to errors in the management of the vehicle. Other potential causes of errors in the management of unmanned vehicles include software bugs, hardware malfunctions, and interference from external sources such as radio waves or other electromagnetic signals. Software aging refers to the gradual degradation of a software system's performance over time. In the context of unmanned vehicles, software aging can be caused by a number of factors, including the accumulation of data, changes in the operating environment, and the introduction of new features or updates. As the software continues to be used, it may become slower, less reliable, and more prone to errors. This can affect the performance of the unmanned vehicle and make it more difficult to manage. Other potential causes of software aging in the management of unmanned vehicles include the use of outdated or inefficient algorithms, inadequate testing and debugging, and the lack of proper maintenance and support.

Software aging and rejuvenation has been an active line of research since 1995 when it was proposed by Huang et al., then at AT&T Bell Labs [22]. The reasons that lead to software aging include data loss, accumulated operating system error, resource consumption, and sudden crashes, for example. These phenomena, which accumulate gradually over time, can lead to software performance degradation, which can lead to a sudden crash or shutdown of software systems [23]. A fault tolerance prevention strategy, called software rejuvenation, aims at circumventing the negative effects of software aging, thus making it an important issue for systems reliability by avoiding sudden system failures caused by software aging, providing security and availability [24,25]. Companies such as Amazon and Google have increased interest in adopting technology architecture based on microservices (which usually rely on containerization) [26]. The reason for such an adoption is that application systems based on microservices architecture have the advantage of being easier to develop, deploy, and scale compared to monolithic architecture systems [27]. Containerization systems allow the configuration of the environment for software deployment in the shortest possible time, solving problems of integration of the most diverse applications [28].

When using containers, the application code in any offered service is involved in containerization along with its libraries, all dependencies, and configuration files necessary for its execution in the most diverse types of environments. This containerization becomes autonomous and portable, as it is abstracted from the host OS and can be executed on any computing platform [29]. This approach has been widely applied in the computing industry and demonstrated in several studies. Refs. [12,17] report overall cost reduction and overall application performance optimization in containers. The applications' microservices are generated by dividing them into small units and independently, increasing the scalability and portability of the services and the containers [10]. Nonetheless, the increase in the use of containers implies the need for tools capable of managing, through the control of tasks such as the operation of applications in containers throughout the infrastructure, scaling, and automation of application deployment [30]. An example of a container orchestration tool that is increasingly needed and widespread is Kubernetes, open-source and made available by Google. Container management tools are at the peak of expectations in the Hype Cycle for Cloud Computing from Gartner [31].

Such expectations give signs that the field in container orchestration technologies is on the rise, attractive, and very competitive, and should continue at an increasing pace as several organizations consider adopting the container-based approach [9,32,33]. A fair amount of tools as solutions for the execution and orchestration of containers emerged and quickly became solution standards in this context, among them Docker and Kubernetes. They enable the creation of new containers and pods (a computational unit in Kubernetes comprising one or more containers) with their deployments in an agile way when an increase in application workload is detected, or even a pod drops due to excessive consumption of its resources, such as memory or CPU (Central Processing Unit), through monitoring [34]. However, its various components and related complexity have a very costly learning curve, which may not be easy to manage even with its proven efficiency in scaling, configuring, and maintaining services. Therefore, managing a Kubernetes infrastructure is a complex task. This has given rise to a new market for managing Containers, such as hosted Kubernetes solutions.

#### **4. Methodology**

The methodology adopted in this work followed the flow shown in Figure 7, which in summary is based on an experimental evaluation applied by measuring the use of system resources and performance in a container-based environment with a Kubernetes cluster. The evaluation was carried out in different scenarios using the Nginx or K3S tool to manage the cluster.

**Figure 7.** Methodology of the software aging measurement and assessment in Kubernetes environment.

Kubernetes is an open-source platform for managing and orchestrating containerized applications. It allows you to deploy and manage multiple containers, such as those created with Docker, across a cluster of machines, and it provides many features and tools to help you automate, scale, and manage applications and their dependencies. One of the main benefits of Kubernetes is that it helps to simplify and automate the process of deploying and managing applications in a distributed environment. This can save time and effort, and it can help to improve the reliability and scalability of applications. Additionally, Kubernetes provides many features and tools that can help you manage and monitor applications, such as: (i) Service discovery and load balancing: Kubernetes can automatically assign unique IP addresses to each of containers, and it can automatically

distribute incoming traffic across the containers in cluster. (ii) Configuration management: Kubernetes allows you to define application's configuration in a declarative manner, using YAML files or other configuration formats. This can make it easier to manage and update the configuration of applications. (iii) Health checking: Kubernetes can monitor the health of containers and applications, and it can automatically restart or replace containers that are not functioning properly. (iv) Self-healing: Kubernetes can automatically detect and recover from failures in application, such as when a container crashes or when a node in cluster goes down. Therefore, he benefits of Kubernetes include improved automation, scalability, and reliability for applications, as well as a rich set of features and tools for managing and monitoring applications in a distributed environment [35].

In this research, the experiments were carried out using scripts developed for these scenarios to simulate a service's distribution using a Kubernetes cluster, which can be accessed externally through the Internet, receiving a high-stress load by performing requests. We have also developed scripts to monitor software aging metrics, such as CPU utilization, memory consumption, and disk utilization, among others, in order to measure the performance of a service hosted in Kubernetes by checking the time of requests correctly fulfilled.

The environments of Nginx and K3S adopted in this experimental evaluation are composed of a cluster containing 5 Pods and 1 Service—that allows communication between the Pods. One of the Pods was configured as a Deployment of an Nginx web server, which enabled testing the performance of an application hosted in Kubernetes, responding to user requests from anywhere connected to the Internet.

CPU utilization, memory consumption, disk utilization, and total response time were some of the metrics used for this study, based on the metrics used in [10,14]. The results of these measures were captured by scripts developed for this purpose and, finally, evaluated through analysis of their behavior.

The proposed methodology actually can be applied for typical operational digital twin version of heterogeneous UAM vehicles including rotary aircrafts such as drones or helicopters, fixed-wing aircrafts or hybrid aircrafts such as eVTOL vehicles. Since the UAM-ODT platform is designed to run on a private cloud computing system based on cloud-in-the-loop simulation paradigm with heterogeneous digital twin modules of dynamics and controls as shown in Figure 4.

#### **5. Experimental Planning**
