## 6 Experiment and Result
### Core Services and Specialized Services  
The objective of these experiments was to analyze the performance and scalability of core services and specialized services through various workload tests. For this, we experimented with individual microservices that manage the elderly people table in the MongoDB database through the following operations: saving a document, the individual or group reading of documents, the updating of a document, and the deletion of a document. Flexible access to microservices was implemented through K8s Ingress's single IP address. Figure 14 shows the experimental scenario with the Apache JMeter test plans as XML files that include the configuration parameters for accessing the microservices. A K8s cluster was used to deploy Apache JMeter in distributed mode on which these test plans were executed. The execution of the first test plan called \"Plan-microserviceforsave-1m3s.jmx\" is essential since it creates records on the database. The identifiers of the documents created on MongoDB were used to create CSV files that were necessary for the execution of the test plans for the other microservices. Apache JMeter used the RESTful API of system services to call microservices. An example of the data size of the input and output of each operation can be found in Appendix H.  
Figure 13: Simulator of the sensing process of the patient’s vital sign data. The simulation data are sent to a real smartphone via Bluetooth. To study the performance and scaling of the services, the test plans were executed independently, simulating the requests of n users during t ramp-up periods. In each of the cases, the e-Health-System-K8s-cluster nodepool-1 was configured so that the application scales from one to two instances of pods of the services and obtains the performance based on the number of requests that arrive to be processed. Since the end users are the ones who will use the operations through a graphical interface of the associated microservice, it was necessary to establish a limit as the response timeout value. The approximate value as the response timeout for web applications is estimated to be 10 s, and if this value is exceeded, end users may feel frustrated and are likely to abandon the operation [77]. In this way, in the experiments, the response timeout and the connect timeout of the requests simulated with JMeter were configured as 10 and 5 s, respectively. Table 3 shows a summary of the tests carried out, where the configuration parameters of the JMeter test plans are indicated, as well as the results obtained when one and two pods are active. The metrics used for performance and scalability analysis were throughput and response time. We performed several tests for each operation to find the maximum throughput that included the first failed requests. The workloads were simulated through a certain number of threads (virtual concurrent users) executed with a ramp-up period of 180 s. In the specific case of the \"Save\" operation, Table 3 shows the information of the tests with which it was possible to reach an approximate maximum limit of the workloads with 0% requests with errors (Test 1 and Test 3). Additionally, Table 3 also provides the information of the tests with the approximate workloads where some failed requests appeared (Test 2, Test 4). Failed requests occurred because the response timeout and connect timeout limits were exceeded, and they had no direct relationship with the service capacity of the database or the network bandwidth. Figure 14: The simulation environment for microservice testing. First, when analyzing the results of the tests with 0% requests with errors, we observed that the \"Save\" operation and the \"Update\" operation reached a lower average throughput than the rest of the operations. The \"Save\" and \"Update\" operations require more processing time by requiring transformations to the database. Second, we observed that the \"Delete\" operation and the \"Read\" operation achieved higher average throughput than the rest of the operations.