cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1348
Views
0
Helpful
7
Replies

Load Balance

hs08
VIP
VIP

HI..

 

What different between Load Balance and Load Sharing? For my OSFP we can see there are 2 path to the destination, is this load balance or load sharing?

7 Replies 7

Hello,

OSPF does equal cost load balancing. The terms 'load-balancing' and 'load-sharing', as far as I recall, mean the same thing.

Have a look at the link below, which explains it quite well, I think:

https://study-ccna.com/ospf-load-balancing/#:~:text=Like%20other%20dynamic%20routing%20protocols,do%20unequal%20cost%20load%20balancing.

Giuseppe Larosa
Hall of Fame
Hall of Fame

Hello @hs08 ,

in the case of OSPF we have flow based load balancing that is actually implemented by CEF.

Each flow is identified by source IP address, destination IP address. The router or multilayer switch will perform an EXOR of last significant bits of IP SA and IP DA and it will also use a seed value chosen at device startup ( device specific to avoid polarization in a network).

The result will give an index that will be used to choice one exit link for a given flow.

Different flows can be associated to the two different links and this is flow based load balancing. All packets of a specific flow will use the same link. This avoids out of order issues.

Load sharing in some cases can be considered the same thing or it can mean a different scenario like it was for example with BGP before the introduction of multipath:  Load sharing per prefix was a way to make an attempt to load share between two different remote iBGP peers both advertising the same set of prefixes by acting on local preference for example.

Hope to help

Giuseppe

 

there is thin line between two 
load sharing 
load balance 
so when I read CEF years ago I ask myself same Q you ask, and I could not find right answer, 
the cisco use both statement to describe the CEF.


Per-Destination Load Balancing

Per-destination load balancing allows the router to use multiple paths to achieve load sharing across multiple source-destination host pairs. Packets for a given source-destination host pair are guaranteed to take the same path, even if multiple paths are available. Traffic streams destined for different pairs tend to take different paths.

IP Switching Cisco Express Forwarding Configuration Guide, Cisco IOS Release 15M&T - Configuring a Load-Balancing Scheme [Cisco IOS 15.4M&T] - Cisco

Untitghjghjghjhgjjhhjled.png
the thin line I found it in one of ciscolive slide

Joseph W. Doherty
Hall of Fame
Hall of Fame

Although the two terms are often used to mean the same, if you go beyond Cisco's documentation, often a distinction is used between the two.  Load balancing is often considered more "dynamic" in insuring multiple paths/links are carrying equal or proportional loads, while load sharing often just means multiple paths/links are used, but without insuring some kind of parity, or proportional, path/link usage.  Load balancing encompasses load sharing but load sharing does not encompass load balancing.

You mention OSFP.  Assuming you have two equal cost paths, what happens when you send just one flow to the router supporting ECMP?

Fast path routing or CEF (default), both, do per flow load balancing.  This means they either round-robin or hash individual flows across the multiple paths (i.e. per destination), accomplishing load sharing (as multiple paths will share the load), but for one flow, it will only be sent across one path/link, i.e. no load balancing.

In the same situation, if you send a second flow, it may, or may not, be directed to a different link.  If it's sent to the link already being used, clearly there's still no load balancing (and, it appears, no load sharing).  However, even if sent to another link, consider if this flow only has 1/10 the traffic of the other flow.  You have load sharing, but link usage isn't balanced, so no (true) load balancing.

Before considering load balancing, assume we have lots of flows, either concurrently, or over some "longer" period.  For such, your multiple paths/links will likely show an "average" equal load usage, so then it appears we do have load balancing.

Going back to just a single flow, if routing is now done per packet, often you'll get a very equal load across your multiple paths.  This also holds true adding additional flows.  So, now it appears we have real load balancing.

But we don't.  Why not?  Well consider there's no active analysis being done on actual path/link loading.  Suppose one single flow is comprised of packets that have been fragmented, i.e. MTU sized packet followed by a small (what was the excess of the MTU) prior packet.  If doing packet-by-packet, all the MTU sized packets are sent down one path/link and the other small packets are sent down another path/link, path/link loading will not be equal.

The closest Cisco technology, of which I'm familiar, which does (dynamic based on load analysis) path/link load balancing is PfR, although it's done across flows. (I.e. it will redirect flows, to different paths/links, balance loading as much as possible, including proportionally.)

I agree with Joseph that this question is about semantics. In most discussion/documentation the terms are used interchangeably. But if you get into the details there is a difference. Load balance describes equal amount of traffic on each link and load share describes some traffic on each link. With the possible exception of ppp multilink Cisco does not do balancing but does do sharing.

HTH

Rick

Rick, wonderful mention of MLPPP!  Forgot all about it, and, indeed, it's a great example of load balancing.

(Not to distract from Rick suggesting it [it's a fantastic example]) one major "issue" of MLPPP, it generally couldn't be used with "higher" (beyond, say a couple of T1s/E1s) bandwidths because it was so CPU intensive (of a least it used to be).

I also vaguely recall (?) it had a few "quirks" that might preclude it from actually achieving exactly balanced link usage.  (Possible [?] "quirks",  might have included special MLPPP control info only using one link and/or not splitting too small packets or some corner cases of splitting packets across the links [any of these, if in fact if they were "issues", usually had very little impact against almost perfect load balancing].)

Rick mentioning MLPPP also reminds me of another Cisco technology we used at the same time along side MLPPP, Cisco multi  (8?) serial port (T1/E1) ATM imux cards.  These, I recall, round-robin ATM cells across the links, achieving very nice load balancing without taxing the CPU of the router.