Random

Random mode for the Load Balancer EIP.

The destination endpoints are selected by random. This is a well known and classic policy, which spreads the load randomly.

The Random eip has no options.

Example

We want to load balance between three endpoints in random mode.

This is done as follows in Java DSL:

from("direct:start")
    .loadBalance().ramdom()
        .to("seda:x")
        .to("seda:y")
        .to("seda:z")
    .end();

In XML you’ll have a route like this:

<route>
    <from uri="direct:start"/>
    <loadBalance>
       <ramdom/>
       <to uri="seda:x"/>
       <to uri="seda:y"/>
       <to uri="seda:z"/>
    </loadBalance>
</route>