摘要: | 近年來,新型網路架構蓬勃發展,為了解決單一伺服器處理龐大資料時超出負荷問題,分散式伺服器架構與伺服器之間的負載平衡問題逐漸成為探討核心。傳統實驗環境使用軟體定義網路(Software Define Network, SDN),透過SDN,交換機的控制平面可被分離出來,提供一個由軟體定義的集中式控制平台。然而,SDN在資料平面靈活性不足,使得SDN無法處理未定義的封包。於此同時,Programming Protocol-independent Packet Processors(P4)被提出來,使網路管理者能夠自行定義封包標頭以及根據不同演算法決定封包如何處理及轉發,從而實現真正的軟體定義網路。 為了改善一致性雜湊演算法(Consistent Hashing Algorithm)使其具有壅塞感知(Congestion Awareness)能力,本論文提出了Consistent Hashing with Congestion Awareness (CHCA)的機制,透過CHCA來做網路負載平衡(Network Load Balance)的導引演算法,改善其演算法使其具有一致性雜湊在伺服器增加或減少時只有少量資料搬移,並具有最少連接法能夠避免熱點伺服器持續接收封包導致某些伺服器超載,透過P4交換機新增兩個自定義標頭Forward標頭與MRI標頭,Forward標頭使P4交換機無須維護路由表,可以在Run-time期間根據最佳路徑來做封包轉發決策,以及MRI標頭記錄所有經過P4交換機負載資訊即時改變負載平衡的轉發策略。在實驗中,引入CHCA機制後,與Oriented-hash相比平均RTT只上升0.296ms,因此一致性雜湊演算法所造成額外運算幾乎是可以忽略的。此外與Shell相比平均RTT下降18%,對於controller的平均使用率低了7%。 ;In recent years, new network architectures have been booming. To address the issue of a single server being overwhelmed by processing massive amounts of data, distributed server architectures and load balancing between servers have gradually become core topics of discussion. Traditional experimental environments use Software Defined Networks (SDN). Through SDN, the control plane of the switch is separated, providing a centralized control platform defined by software. However, SDN has insufficient flexibility in the data plane, making it unable to handle undefined packets. At the same time, Programming Protocol-independent Packet Processors (P4) has been proposed. P4 allows network administrators to customize packet headers and determine packet processing and forwarding based on different algorithms, thereby achieving a truly software-defined network. To improve the congestion awareness capability of the consistent hashing algorithm, this paper proposes the Consistent Hashing with Congestion Awareness (CHCA) mechanism. Through CHCA, a load balancing guiding algorithm for the network is implemented. This algorithm improves consistent hashing by ensuring that only a small amount of data is relocated when servers are added or removed and by incorporating the least connection method to prevent hot servers from continuously receiving packets, thereby avoiding server overload. The P4 switch introduces two custom headers: the Forward header and the MRI header. The Forward header allows the P4 switch to make packet forwarding decisions based on the optimal path during runtime without maintaining a routing table. The MRI header records load information from all traversed P4 switches, enabling real-time changes in load balancing forwarding strategies. In the experiments, the introduction of the CHCA mechanism increased the average RTT by only 0.296ms compared to the Oriented-hash, making the additional computation caused by the consistent hashing algorithm negligible. Additionally, compared to Shell, the average RTT decreased by 18%, and the average controller utilization was reduced by 7%. |