0 Replies Latest reply on Jun 22, 2006 3:38 AM by greyfairer

    Problem with singleton Service and http reverse proxy.

      Hi there,

      I have a cluster with two nodes, with hajndi and httpha-invoker deployed normally, and jbossmq and jbossmq-httpil deployed as singleton service, as described in the clustering documentation.

      For my web applications, my clients connect to a reverse proxy: apache with mod_jk load-balancing between my two nodes. This works for the httpha-invoker, too, by specifying the name of the reverse proxy as InvokerURL for the JMXInvokerHAServlet.

      My client can now connect to https://rproxy/invoker/HAJNDIFactorySSL, and it gets a stub for https://rproxy/invoker/JMXInvokerHAServlet, which will be load-balanced to either node.

      The jbossmq-httpil service however, is deployed as a singleton, so if I lookup HTTPConnectionFactory in the HAJNDI context, I get a stub that only works on the master node. But, since my client always connects through the reverse proxy, I have to specify the reverse proxy in the URL for the HTTPServerILService. The stub I get then refers to http://rproxy/jbossmq-httpil/HTTPServerILServlet. The rproxy doesn't know from the URL which node it has to connect to, so it will half the time connect to the one which isn't the master, and my connection will fail.

      Should I deploy the jbossmq-httpil service on different URL's for both nodes, so the reverse proxy will only connect to the master node? And how do I do this?

      PS: I'm on JBoss-4.0.3sp1

      Thanks in advance,
      greyfairer.