5 Replies Latest reply: Jul 5, 2011 4:39 AM by Ron K RSS

Load balancing factors

Ron K Newbie

Hey all,

 

I have just a small and probably stupid question for a scenario:

 

Is it true, that jboss sends performance indicatros like cpu load for load balancing? As for example, i send 5 requests to a 2 node cluster and the first call produces 100% load on server 1, would the client (first available strategy) still stick to this server or switch to the next one autoamtically?

According to what ive seen and read it should got to server 2, am I right?

 

 

Thanks in advance,

  • 1. Re: Load balancing factors
    Wolf-Dieter Fink Master

    No, I have never seen a (standard) loadbalancing policy that balance by checking load on the system.

    IMHO it will have too much effort, each call must check all cluster nodes to decide which is the best one.

     

    RoundRobin and Random try the nodes as the name is.

    The FirstAvailable provide a connection to one cluster node related to the strategy (roundrobin or random) and stay with it as long as this node works.

    If it is not longer available a new node is provided related to the stategie.

  • 2. Re: Load balancing factors
    Ron K Newbie

    Hi,

     

    sorry for the late reply

    At first, what i meant was a bit different and i also know about the different strategies. D0ue to the fact it can happen that a user connected to a server x could produce a massive load with some functionallity. If the policy is firstavailable, will it probably take this server again? What happens in case of roundRobin with a server that has 100% load and still gets "bombed" with requests. In this case, server x would cause i growing delay to the following client requests even in cases the other nodes have only 20% load.

     

    Thanks,

     

     

    _______

    Btw. in load-balancing tests, it can be observed that in e.g. RoundRobin fashions, only the first clusterSize-1 values are delayed. can that be explained with caching?

  • 3. Re: Load balancing factors
    Bunphot Chup Newbie

    May I ask you some question?.

     

    How can I configure the load balance factor such as RoundRobin or a Random try ?

     

    Thanks,

  • 4. Re: Load balancing factors
    Ron K Newbie

     

     

     

    Set it per annoptation for the bean (in this case stateless) and if you need replication, just uncomment the @CacheConfig and set it for your needs.

    The load-balancing strategy can be changed according to the ones written above.

     

     

    @Stateless(mappedName="ejb/FailoverFirstAvailableBean")

    /* RoundRobin = One node after another

    * RandomRobin = One after another in a random order

    * FirstAvailableIdenticalAllProxies = Same target node for all EJB's for this client (Sticky)

    * FirstAvailable = Selects the first available target and sticks to it (Sticky) */

    @Clustered(loadBalancePolicy="FirstAvailable")

    //@CacheConfig(name="sfsb/async", maxSize=100000, idleTimeoutSeconds=300, removalTimeoutSeconds=0)

  • 5. Re: Load balancing factors
    Ron K Newbie

    Does anybody have an idea about my question above btw?

    It's still about the load-balancing, if the CPU load influences the balancing. In fact, will the balancing be influenced from the nodes CPU load?

     

    Thanks,