Presentation is loading. Please wait.

Presentation is loading. Please wait.

OpenFlow-Based Server Load Balancing GoneWild

Similar presentations


Presentation on theme: "OpenFlow-Based Server Load Balancing GoneWild"— Presentation transcript:

1 OpenFlow-Based Server Load Balancing GoneWild
Author: Richard Wang, Dana Butnariu, and Jennifer Rexford Publisher: Hot-ICE'11 Proceedings of the 11th USENIX conference Presenter: Sih-An Pan Date: 2013/10/16

2 Introduction A dedicated load balancer using consistent hashing is a popular solution today. But it suffers from being an expensive additional piece of hardware and has limited customizability. Our load-balancing solution avoids the cost and complexity of separate load-balancer devices, and allows flexibility of network topology while working with unmodified server replicas. Our scalable in-network load balancer proactively installs wildcard rules in the switches to direct requests for large groups of clients without involving the controller. Consistent Hashing 是一種 hash 演算法, 簡單的說在移除/新增一個伺服器時, 它能盡可能不要去改變已存在的 key 的mapping關係, Load balancer直接在switch中加入一些wildcard rule,這些wildcard rule就來處理一群client的request,不用經過controller

3 Into the Wild: Core Ideas
Reㄆ卡 多個副本的伺服器提供相同的服務和網路交換器,讓用戶端可以順利的連接進來,每個伺服器Rj有一個唯一的IP位址和一個完整的權重⍺j來決定分享的需求,例如R2需要接收50%(4/8)的需求;另外,用戶透過一個Public IP可經由一個Gateway Switch到達負載平衡的交換器,而在負載平衡交換器中,則會修改packet進來到副本伺服器的目的地位址,去分配每個server的load

4 Relevant OpenFlow Features
The controller can install rules that match on certain packet-header fields and perform actions on the matching packets. A microflow rule matches on all fields, whereas a wildcard rule can have “don’t care” bits in some fields. Rules can be installed with a timeout that triggers the switch to delete the rule after a fixed time interval (hard timeout) or a specified period of inactivity (soft timeout) 另外也談到了OpenFlow的一些特色,OpenFlow定義了一個API的控制程序,方便 和在底層的switch溝通,而此控制器加入一些rule 如果某些packet match packet-header的欄位(例如:MAC addresses、IP addresses和TCP/UDP ports),並且在符合的packet中可以執行特定的動作(例如:forward、 drop、 rewrite或是“send to the controller”)。而在規則中可以安裝一個timeout的開關機制,讓Switch在每隔一個固定時間(hard timeout)或一個特定的閒置週期(soft timeout)來刪除規則 每條rule可以指定他的hard timeout和soft timeout

5 Relevant OpenFlow Features
the switch performs an action of (i) rewriting the server IP address and (ii) forwarding the packet to the output port associated with the chosen replica. OpenFlow does not currently support hash-based routing We rely on wildcard rules that match on the client IP addresses. OpenFlow does not support matching on TCP flags (e.g., SYN, FIN, and RST) that would help us differentiate between new and ongoing connections 在他的方法中switch執行這2件事 這邊應該是修改packet的destination IP,根據選擇server轉送packet到output port。 OpenFlow有一些限制侷限了他的方法 也就是透過多條路徑分散traffic的方法 取而代之的是,我們必須依靠Wildcard規則來匹配客戶端的IP address來進行轉送 這點在我們要轉換一個wildcard rule從一個server到另一個server的時候很重要 之後會講更清楚

6 Partitioning the Client Traffic
The partitioning algorithm must divide client traffic in proportion to the load-balancing weights, while relying only on features available in the OpenFlow switches. We initially assume that traffic volume is uniform across client IP addresses Our goal is to generate a small set of wildcard rules that divide the entire client IP address space. 我們按他的權重去分散client的traffic,所以一開始必須假設經過用戶端IP address的traffic大小是一致的,而最終的目的地是要產生一個Wildcard規則的小型集合來分散全部的用戶端IP address空間。

7 Minimizing the Number of Wildcard Rules
因此透過權重的二進位來表示如何以最佳方式分配leaf node ⍺j的二進位制bits數設定為1時,則代表的是副本Rj Wildcard rule的最小數量 R1的⍺j權重為3 (二進位表示為011),這代表在同一規則上有兩個樹葉和另一個規則有一個樹葉, 另外分配樹葉節點是依照所有的 ⍺ 值中最高bit設定為1排序下來

8 Minimizing the Number of Wildcard Rules
⍺j的二進位制bits數設定為1時,則代表的是副本Rj Wildcard rule的最小數量 R1的⍺j權重為3 (二進位表示為011),這代表在同一規則上有兩個樹葉和另一個規則有一個樹葉, 另外分配樹葉節點是依照所有的 ⍺ 值中最高bit設定為1排序下來

9 Minimizing Churn During Re-Partitioning
The weights { α 𝑗 } may change over time to take replicas down for maintenance, save energy, or to alleviate congestion. If the number of leaf nodes for a particular replica remains unchanged, the rule(s) for that replica may not need to change. 如果特定副本的葉節點數量不變,該副本的規則(S)可能不需要改變 In Figure 2(b) 如果R3要停機維護,他的laod要轉移到R1 就是a3=0 a1=4,那R2的rule就不用動了 在這種情況下,只有111 *的IP地址,將需要過渡到一個新的副本,變成只有2個wildcard rule

10 Transitioning With Connection Affinity
The controller cannot abruptly change the rules installed on the switch without disrupting ongoing TCP connections. Fortunately, we can distinguish between new and existing connections because the TCP SYN flag is set in the first packet of a new connection. The first solution directs some packets to the controller, in exchange for a faster transition. The second solution allows the switch to handle all packets, at the expense of a slower transition. 原先存在的connection要做完阿,譬如說原本client跟一台server建立連線 但是事情還沒做完,就修改rule,這樣中間的packet不就被傳到其他server了 While Open-Flow switches cannot match on TCP flags, the controller can check the SYN bit in a packet, and install new rules accordingly.

11 Transitioning Quickly With Microflow Rules
這個方用是利用controller去加入marcoflow rule去完成transition,譬如說match 0*的這個packet要從R1轉移到R2,controller會看接下來match到0*的packet來決定是否要把這個packet送到R1或R2,一開始packet近來都是match這條old rule 這些mircoflow rule也都有60秒的soft timeout Transition過程是60秒 因為沒有packet會match到old rule

12 Transitioning With No Packets to Controller
The controller could instead divide the address space for 0* into several smaller pieces, each represented by a high priority wildcard rule (e.g., 000*, 001*, 010*, and 011*) directing traffic to the old replica R1. In addition, the controller installs a single lower-priority rule directing 0* to the new replica R2, that handles client requests that have completed their transition. The transition proceeds more slowly because some new flows are directed to the old replica R1. As the switch deletes some rules, the controller can install additional rules that further subdivide the remaining address space. 把0*切成幾個範圍較小的rule 如果這幾個rule在60秒之內沒有packet去match到他 它自然就被刪掉了 為了加快transittion的速度

13 Implementation and Evaluation
We have built a prototype using OpenVswitch (a software OpenFlow switch) and NOX (an OpenFlow controller platform), running in Mininet. Our prototype runs the partitioning algorithm and our transitioning algorithm. We use Mininet to build the topology in Figure 1 with a set of 3 replica servers, 2 switches, and a number of clients. 第一種transition

14 Adapting to new load-balancing weights
Our three replica servers host the same 16MB file For this experiment, we have 36 clients with randomly-chosen IP addresses in the range of valid unicast addresses. Each client issues wget requests for the file We assign α 1 =3, α 2 = 4, and α 3 = 1

15 Adapting to new load-balancing weights
3:4: 秒的時候 server2的權重就從原本的4變成0 新的connection就移到R1和R3

16 Overhead of transitions
To evaluate the overhead and delay on the controller during transitions, we have ten clients simultaneously download a 512MB file from two server replicas. We start with all traffic directed to R1, and then (in the middle of the ten downloads) start a transition to replica R2. In our experiments, we did not see any noticeable degradation in throughput during the transition period 評估在transition的過程中controller造成的overhead,在transition的過程中,controller就出來add microflow rule,要保證之前從R1那邊下載的file要能夠完成下載

17 Non-Uniform Client Traffic
原本我們在討論的都是只有2台switch而且uniform traffic Overload underload

18 Non-Uniform Client Traffic
the algorithm should be able to identify severely overloaded and underloaded replicas and then identify the set of rules to shift. This may involve splitting a wildcard rule into several smaller ones to collect finer-grain measurements The result of these operations may not achieve the minimal set of wildcard rules. Ideally, the algorithm needs to strike a balance between minimizing the number of wildcard rules and dividing load accurately.

19 Network of Multiple Switches
The simplest approach is to treat server load balancing and network routing separately. After the controller partitions client IP addresses based on the load-balancing weights and computes the shortest path to each replica 除了non-uniform traffic之外,他也希望演算法能夠處理更大的topo,最簡單的方法就是將load balance和network routing分別處理,controller根據權重去

20 Network of Multiple Switches

21 Network of Multiple Switches

22 Conclusion Our “partitioning” algorithm determines a minimal set of wildcard rules to install, while our “transitioning” algorithm changes these rules to adapt the new load balancing weights. Our evaluation shows that our system can indeed adapt to changes in target traffic distribution and that the few packets directed to the controller have minimal impact on throughput.


Download ppt "OpenFlow-Based Server Load Balancing GoneWild"

Similar presentations


Ads by Google