# An Adaptive Symmetrical Load Balancing Scheme for Next Generation Wireless Networks
## 3 Methodology
### Algorithm 1
#### 3.1.2 Clustering  
Two types of traffic are taken into account when examining the prioritization of data: active time traffic (AT) and passive time traffic (PT). It is important to note that the method proposed here can be extended to multiple types of traffic streams with minor adjustments. AT streams could be VoIP sessions, live video streaming sessions, online gaming, video conferencing and so on. These types of streams are given high priority because they are sensitive to delays. PT streams could be file transfer sessions, email, web browsing and so on, which can tolerate delays, and thus they can be processed with lower priorities. The queue for AT streams hold the high priority requests, and the queue for PT streams hold the low priority requests. Let \(L_{i}\) indicate the limit of flow. \(PC\) represents the packet category for flow, which can be either 0 (PT) or 1 (AT). The flow request with the lowest \(L_{i}\) and \(PC=1\) will be given the top precedence for processing by the UC. If a flow appeals a higher \(L_{i}\) than other requests and the \(PC=0\), the precedence for processing will be low.  
The UC oversees the RCs and is responsible for making decisions regarding sending the flow and relocating them. The UC creates three distinct clusters: such as the OUC, UUC, and NUC. The OUC controllers are tasked with processing a larger number of flows. The UUC controllers have fewer flows, meaning they can process any new incoming flow and the NUC controllers do not have any flows to process. The load of a RC \(\eta\) is determined based on 5 parameters: central processor usage X\(\eta\), memory usage Y\(\eta\), hard drive usage Z\(\eta\), the amount of packets being processed AP\({}_{p}\) and the number of packets waiting in the buffer Pb. Among these parameters the first three are the system-based parameters and the rest two are client-based parameters.  
The RC constantly updates its load status to the UC. The load status is refreshed at regular intervals (i.e., every 5 s).  
\[B_{\eta}=(S_{\eta},C_{\eta}). \tag{2}\]  
The current load status of the regional controller \(B\) is directly dependent on S\({}_{\eta}\) and C\(\eta\), where S\(\eta\) represents the system parameters and C\(\eta\) represents the client parameters of  
\begin{table}
\begin{tabular}{c c} \hline
**Priority Level** & **Packets Status** \\ \hline Low Priority & 0 \\ \hline Equal Priority & 1 \\ \hline Small Priority & 2 \\ \hline Medium Priority & 3 \\ \hline Large Priority & 4 \\ \hline \end{tabular}
\end{table}
Table 3: Priority Preferences.  
controller \(\eta\). The modifications in the measurements may influence the load status of the RCs. The measurements are expressed as Equations (2) and (3).  
\[S_{\eta}=(X_{\eta}+Y_{\eta}+Z_{\eta}). \tag{3}\]  
By looking at Equation (3), S\(\eta\) is determined by sum of triads, where X\(\eta\) indicates how much processor memory is occupied, Y\(\eta\) indicates how much RAM is being used and Z\(\eta\) denotes how much hard drive is utilized. Equation (4) represents the C\(\eta\) which calculate the load due to forwarding devices, where Pp\({}_{\eta}\) indicates packets in processing phase and Pb\({}_{\eta}\) indicates packets in the buffer. The measurement is dependent on the current WDs connected to the APs. With an increase in the number of WDs, the load contribution from client-based measurements also proportionately increase.  
\[C_{\eta}=(Pp_{\eta}+Pb_{\eta}). \tag{4}\]  
Using the load information provided by each RC, the UC assigns each RC to an appropriate cluster. The data packets from the OUC are then directed to the corresponding UTC, reducing the processing load on the RC and minimizing the waiting times of the packets in the queue. Based on the regular updates of the load, the clustering of RCs is enhanced and the workload is evenly distributed, ensuring efficient processing of incoming data packets.