Network Dictionary – Stochastic

You will often hear the term stochastic used in research papers on network architectures.

The Dictionary on my Mac defines it as:

> having a random probability distribution or pattern that may be analysed statistically but may not be predicted precisely.

Wikipedia –

> A stochastic process is one whose behavior is non-deterministic, in that a system’s subsequent state is determined both by the process’s predictable actions and by a random element.

In Networking Design the usage of “stochastic” refers to the load balancing mechanisms in a network hardware. The first time a given flow passes through a device, it will be allocated a given path. That path will continue to be used for all following packets/frames in the flow. For example, EtherChannel, LACP or other L2MP protocols.

The *random* nature is that you cannot predict the path of a flow in a multipath network and the path selection is, more or less, random. The action is *predictable* since load balancing will be repeatedly achieved across the available links in the bundle.

In networking, the “stochastic nature of load balancing” is that once a flow path is determined then this is the **only** path that can be used thus limiting the effective bandwidth to a single path.

And that can be problem for large flows that have repeatable characteristics. Thus, a SRC-DST MAC flow doesn’t change path once the first frame is switched. And the Forwarding Entry in the TCAM will have only one output interface for a given route even if it’s a equal cost path.

  • Ryan Malayter

    I’m not sure “stochastic” really applies to most ECMP/LACP networking gear. Link selection is almost always deterministic, based on a simple hash function if L2-4 header information. No random numbers involved.

    Now, the dropping of packets in RED or CoDel managed queues would be stochastic, as there is a random number generator involved.

    • Etherealmind

      From the point of view of the end hosts, the path is non-deterministic. Today’s network are not able to provide reliable information about the path, nor is it possible to predict which path a flow will take.

      Vendors provide approximate data on how they choose to implement ECMP but it cannot be predicted by servers or software.