# Fog Computing Architecture for Load Balancing in Parallel Production with a Distributed MES
## 4 Analysis of Results  
Next, we will highlight the behavior of the two types of 4.0 architectures implemented for the scaling of Industry 3.0 manufacturing processes. That is, the first corresponds to the base study of this article, in which the MES communicates with the cloud to manage plant processes through cloud computing. Therefore, according to the proposed framework, the initial architecture serves as a basis, and a second production line is implemented in the plant, resulting in the integration of an FC node that acts as an intermediary between the MESs and the cloud. In this context, the performance points of the distributed network system will be analyzed, including communication delay times between layers, the processing percentage and response time of the manufacturing management system's hardware, and the effectiveness of the load balancing system during the orchestration of order requests. Knowing that the base architecture of this study took RAMI 4.0 as a reference framework, more advanced technologies were adapted. In this regard, it was identified that the integration layer (connection: MES-legacy integration devices with PLCs) did not undergo any performance changes; instead, the functional layer (MES with AI) and the communication layer (MES-cloud connection) experienced improvements. This is mentioned because the approximate time taken for bidirectional data flow between the MES and the cloud for order requests and downloads was 1.7 [s], according to the initial study. Given this information but now measured with the integration of an FC node in the architecture, the time taken by the MESs to request the exact requirements is reduced to only approximately 22 [ms]. Table 2 presents a comparison of the data transfer and connection times between the initial and extended architectures, as measured during the order request and download processes. The experimental validation results demonstrate that the FC system ensures an efficient workflow and, due to its location near the edge, also facilitates smooth operation even in the presence of network interruption problems. It is also mentioned that these results were submitted under the following internet speed parameters: Upload 30.62 [Mbps] and Download 69.48 [Mbps]. To rule out any ambiguity in the results in Table 2, the time taken for two-way communication between the fog node and the cloud is independent of the MES connection and fog node. In the event of a loss of connectivity, the MESs continue to manage orders to their respective MPSs. At this point, the FC node continually sends a request to the cloud-based MQTT broker to download orders, allowing it also to verify the connection status. To assess the system's resilience, the internet service was intentionally interrupted several times to determine the approximate average reconnection time. On the other hand, the averaged performance metrics were monitored from the Raspberry Pi 4 (RPi4) hardware with 4 GB of RAM from the FC node. The data were collected as order requests were made, meaning that the tasks to be performed by the FC node were concurrent, involving the following: downloading requests, storing them in a local database, orchestrating orders, and processing data published from the MESs. Considering the aforementioned tasks as a global process performed on an FC node, the following average performance metrics were recorded during the orchestration of 10 orders (see Figure 5), with an average CPU consumption of 36% and an average temperature of