4 Replies Latest reply on Jul 17, 2006 5:10 PM by Brian Stansberry

    Where to specify custom LoadBalancePolicy?

    Vishnu Vardhana Newbie

      Hello,

      I want to know Where to specify custom LoadBalancePolicy.
      That is, instead of using org.jboss.ha.framework.interfaces.RoundRobin for selecting cluster node, i want to specify which node should handle a particular request. Please guide me on how to do this.
      I tried changing
      org.jboss.ha.framework.interfaces.RoundRobin in cluster-service.xml, but it didn't work.

      Please tell me how to do this and what configuration i should modify.

      Thanks in advance.

        • 1. Re: Where to specify custom LoadBalancePolicy?
          Kurt De Wit Newbie

          So you don't want to actually use clustering at all since you sent eacht request to the same node every time...

          To achieve a request specific node for subsequent requests within the same application, I think you need to write your own LoadBalance policies....

          Where do you need this behaviour for actually?


          Kurt

          • 2. Re: Where to specify custom LoadBalancePolicy?
            Vishnu Vardhana Newbie

            Hello Kurt,

            Thanks for your reply.

            I don't want to send each request to the same node every time.
            My requirement is like this:
            Suppose first request from UserA is handled by NodeA, i want NodeA to handle all subsequent request from UserA. Similarly if NodeB handles first request from UserB, NodeB should handle all subsequent request from UserB.

            This is the constraint in our application. We are developing a application to create a meeting request in Microsoft Outlook directly using MAPI calls. For this all request from one user should be handled by one Node because of some profile creation problem.

            To achieve this, i need to write my own LoadBalancePolicy class.
            I want to know how to do this. Is it enough if i replace LoadBalancePolicy attribute in cluster-service.xml with my custom LoadBalancePolicy class or something else i need to do?

            Thanks in advance.

            Vishnu

            • 3. Re: Where to specify custom LoadBalancePolicy?
              Jerry Gauthier Apprentice

              Are you referring to the LoadBalancePolicy attribute in the HAJNDI service? That's the only load balancing policy in the standard cluster-service.xml file.
              If so, that policy is only used by HA-JNDI so overriding it will only affect your use of HA-JNDI. By default, HA-JNDI lookups are directed to servers based on this poilcy (i.e., they don't necessarily go to the server listed in the provider url).

              If this isn't what you have in mind, you need to be more specific (e.g., are you describing session load balancing).

              • 4. Re: Where to specify custom LoadBalancePolicy?
                Brian Stansberry Master

                If you are talking about EJB 2.x load balancing, please see Chapter 16 of the JBoss Application Server Guide available from http://labs.jboss.com/portal/jbossas/docs .