1 Reply Latest reply on Oct 24, 2003 2:20 AM by Ignacio

    Clustering Problem

    sasaa Newbie


      "sasaa" wrote:
      "sasaa" wrote:
      I have clustered a stateless bean across two jboss servers. I am able to see load balancing happening when I access the bean from an external java program i.e. the program sees its request being fulfilled by server1 and then server2 in a round-robin way ( which I guess is the default).

      However, I do not see load-balancing happening when I try to access the bean using a jsp that resides on the same jboss server ( say server1). JBoss always directs consecutive requests to the local server(server1) and not to the other server (i.e. server2).

      Is anything wrong in this approach?
      Please help.


        • 1. Re: Clustering Problem
          Ignacio Newbie


          "alu1344" wrote:
          "alu1344" wrote:
          JBoss is trying to resolve the call locally, something that is A Good Thing(tm) to improve performance.

          You can put a jndi.properties in your classpath so that it does not try to call ejb locally and uses RMI instead, but I wouldn't recommend it. Since RMI serialization is a mayor performance boo, leeting it just as is should be fine. Also, JSP processing seems to take a part of your overall performance, so letting always the same node doing it should not be a good idea.

          Instead, put an Apache/Tomcat/Jetty before both servers doing the load-balance. You also should have to check the sticky sessions bit (I don't know how that is achieved, nor if it is possible in Apache). Forward the post still as http, don't call RMI remote.