Cell Janus Load Balancing Algorithms Technical Overview Introduction This application note describes the technical aspects of all load balancing algorithms in Cell Janus. Load balancing occurs in both outbound and inbound directions. By outbound load balancing, it means balancing traffic that is initiated from the LAN-side of Cell Janus to the WAN-side. What is actually balanced is downstream traffic, the result of LAN-initiated sessions. Inbound load balancing is performed on traffic that is initiated from the WAN-side of Cell Janus. What is balanced is upstream traffic generated by servers on the Cell Janus LAN network. Cell Janus performs load balancing on a per session basis. Load Balancing Algorithms Cell Janus attaches a LAN to up to 8 WAN links, providing access to the Internet over any of the links. Load-balancing Algorithm is the key technology component of the Cell Janus that smoothly integrates the capacities of multiple WAN links into your local infrastructure. This allows you to make the best use of the available technologies, replacing, for example, an expensive private/t1/e1 link with multiple slower, yet much less expensive DSL or metro-internet links. In Cell Janus, there are 11 outbound load balancing algorithms and 9 inbound load balancing algorithms supported by our latest system version 5. All algorithms are designed base on Session Switch Load Balance Technology. Sessions are distributed amongst the links according to the configured capacities of the links. Sessions are coherent exchanges between two hosts, most commonly TCP or UDP connections. All IP traffic (i.e. excluding lower level traffic, e.g. ARP or DHCP) is assigned to a session whether they form true connections or not. Sessions may also contain all the connections used by a single application, such as FTP or H.323 video conferencing that create multiple connections. Outbound Load Balancing Algorithms (1) Weighted Round Robin The distribution of sessions amongst the links begins by first assigning an initial weight for each link. Each session is then assigned to the link with the highest current weight and decrements the weight of the link. For example, if the weight of three links are configured for 7, 4 and 2. From these weights, we can see that the first three sessions will be assigned to the link with weight of 7, the next fourteen will be split between the link with weight of 7 and the link with weight of 4 until their weights reach 2. Finally, the next six sessions are distributed evenly across all three links. When the current weights on all the links are zero, the weights are reset to their initial values and the distribution cycle restarts.
(2) Downstream Equalized The bandwidth utilization of each link is calculated every second. The distribution of sessions amongst the links is base on the downstream bandwidth utilization. New session is assigned to the link with the smaller downstream utilization. If there is a new session is established, the Janus will compare the percentage of bandwidth from each WAN Link, and assign the new session to the lowest link. If an existing downstream session is using 30% of the available bandwidth of WAN link 2, then all new sessions will go out WAN link 1 until it exceeds 30% of its available bandwidth. (3) Upstream Equalized Upstream Equalized is the same as Downstream equalized, but this approach considers the upstream bandwidth utilization rather than the downstream bandwidth utilization. (4) Upstream / Downstream Equalized Upstream / Downstream Equalized is the same as Downstream equalized, but this approach considers both upstream and downstream bandwidth utilization rather than the downstream bandwidth utilization only. New session is assigned to the link with the smaller upstream and downstream utilization. If there is a new session is established, the Janus will compare the percentage of upstream and downstream bandwidth from each WAN Link, and assign the new session to the lowest link. (5) Downstream Threshold The links begins by first assigning a threshold ranging between 0 and 100. The downstream utilization is calculated link by link every second. New session will be assigned to the link with the smaller link number (WAN 1 is the link with the smallest link number) first. When the downstream bandwidth utilization of a link is larger than the pre-set threshold over last second, the next link with the smaller link number will be used. If the downstream utilization of all links larger their pre-set threshold in the last second, no link can be distributed for new session in the next one second. (6) Upstream Threshold Upstream Threshold is the same as Downstream Threshold, but this approach considers the upstream bandwidth utilization and threshold rather than the downstream bandwidth utilization and threshold.
(7) Upstream / Downstream Threshold Upstream Threshold is the same as Downstream Threshold, but this approach considers both upstream and downstream bandwidth utilization and threshold rather than the downstream bandwidth utilization and threshold only. When either the downstream bandwidth or upstream bandwidth utilization of a link is larger than the pre-set threshold over last seconds, the next link with the smaller link number will be used. (8) Inbound Session Equalized Inbound Session Equalized balances the outbound of network traffic only based on the current active session count on each WAN link. Janus will look at instantaneous inbound active session count of all WAN links. The new outbound session will be assigned to the WAN link with the smallest amount of active inbound sessions. (9) Outbound Session Equalized Outbound Session Equalized is the same as Inbound Session Equalized, but this approach considers the outbound active session count rather than the inbound active session count of all WAN links. (10) Minimum Round Trip Time Minimum Round Trip Time is the feature of Auto Path/Hop Priority that balances the outbound network traffic based on the ICMP Round Trip Time measurement. Janus compares the round trip time of ICMP packet between remote host and Janus WAN interfaces instantaneously, and assigns the new outbound session to WAN link with currently smallest round trip time.
(11) Minimum Hop Count Minimum Hop Count is the feature of Auto Path/Hop Priority balances the outbound network traffic based on the "distance" measurement. The "distance" of remote destination is measured by hop count between remote host and Janus WAN interfaces. In Janus, hop count is calculated from TTL field of IP header. New session will be assigned to the WAN links with smallest hop count. Inbound Load Balancing Algorithms (1) Weighted Round Robin (2) Downstream Equalized (3) Upstream Equalized (4) Upstream / Downstream Equalized (5) Downstream Threshold (6) Upstream Threshold (7) Upstream / Downstream Threshold (8) Round Robin Round Robin is for inbound only that alternates the answers to each DNS requests across each WAN link. Janus rotates the DNS record after each DNS request, the inbound connection is equally distributed across each available WAN link. (9) Specified Order The inbound connection can be controlled in a specified order. It is for inbound traffic only. The WAN links order is pre-defined by this mode. Janus checks the WAN link availability from the top priority to low priority on the pre-defined order. When the top priority WAN link becomes unavailable, Janus will assign the new inbound setting to the next available WAN links in the pre-defined order.
Additional Issues in Link Load Balancing NAT Effects An edge device such as the Cell Janus is connected to the Internet by its Internet Service Provider, which provides one or a few IP addresses. Hosts behind (on the LAN side) Cell Janus share the allocated addresses, using NAT. Since each link is assigned a different IP address by the ISP servicing that link, packets transmitted on one link appear to be from a different host than those transmitted on a different link. When only a single link is used, the LAN side hosts maintain a consistent identity on the Internet since the sessions are only NAT ed to a single IP address. Maintaining this consistency when load balancing over multiple links is a critical requirement. Session balancing maintains this consistency for all packets in a session, but allows different sessions to use different links, thus providing a balancing of load over the links. Super-sessions With session load balancing, a series of sessions from a LAN host can be distributed over different links to gain the most from a multi-link configuration. In general multiple sessions to a single destination via different links does not present a problem. However, in a few rare situations, a destination host retains context between one session and the next; this is occasionally used as a security measure on financial sites. In this case, a session transmitted over a different link than the previous session will be rejected. Cell Janus accommodates such hosts with the notion of Super-sessions, a grouping of sessions into a larger entity. Super-sessions are sessions between a LAN host and the same remote Internet host that occur within a small period. Such sessions are held to the same link as the first session until no further sessions between the two hosts are initiated. The Supersession times out after 30 seconds of inactivity. Note that although Super-sessions reduces the balancing effect (by sticking certain sessions to a link), new sessions that are not between the hosts in a Super-session are still distributed amongst the links. Thus while a financial session is being performed between a LAN host and a remote site, a new session from another LAN host to any remote site is free to use any link, as determined by the balancing discipline in force. Moreover, even another session from the host in a Super-session is also free to be balanced, as long as the session is not to the same remote host as the supersession. The balancing discipline with Super-sessions, thus, works quite well under nearly all circumstances. If Cell Janus is interposed between a NAT and a router (using Transparent Mode), the link balancing effect is further restricted. In this case, the NAT appears to be only a single LAN host to Cell Janus, even though hundreds of hosts may be behind the NAT. Any session between any LAN hosts behind the NAT to a remote destination will then be gathered into a supersession and not be balanced. This is a limitation of the configuration. About Cell Technology Cell Technology headquartered at Hong Kong SAR, a network & security technology provider specializes in design, develop and deliver innovative and intelligent IP packet processing platform into software and hardware appliances. Cell product solutions including Cell IPS, Janus, and icms address the business needs that optimize the IP network performance, secure the network security and resiliency, and manage the quality of IP services. For more information, please visit www.cell-technology.net. Cell Janus Application Note -EN/2013-01r2 Copyright 2010-2013 Cell Technology Limited. All rights reserved. Specifications are subject to change without notice.