4 Replies Latest reply on Feb 3, 2003 1:29 PM by derry

    JBoss Loadbalancer

    derry

      Bill asked us to copy out email conversation to the forum:

      > > I will commit a preliminary version of the loadbalancer-code to CVS

      great

      > > hopefully at the end of this week. I have some problems parsing
      > > the webserver
      > > response header at the moment.
      > >
      > > Following parts are missing at the moment:
      > > - automatic discovery of webservices. I am not sure how to do this.

      what do you mean? Discovery of other nodes having the load-balancer is easy
      to do thanks to the clustering framework.

      > > - virtual host support
      > > - failover

      you mean sticky sessions?

        • 1. Re: JBoss Loadbalancer
          derry

          Hello!

          > what do you mean? Discovery of other nodes having the load-balancer is
          > easy
          > to do thanks to the clustering framework.

          I meant discovery of webservers running on a cluster. This means that the
          servlet-containers must export their deployed webapps. Failover between two
          loadbalancers is another thing. I think it is nearly impossible in Java without
          generating a single point of failure - and there was my henn and egg problem.
          In EJB-clustering the client KNOWS the other servers. But a Web-client is
          dumb....

          >
          > > > - virtual host support
          > > > - failover
          >
          > you mean sticky sessions?
          >

          No. Failover means that if the client is sticky on node1 and node1 dies the
          client must be redirected to node2. Virtual host support means that the LB
          schedules requests to the servers depending on the "Host"-line in the
          HTTP-header.

          CU
          Thomas

          > > I meant discovery of webservers running on a cluster. This means that
          > the
          > > servlet-containers must export their deployed webapps. Failover
          > > between two
          > > loadbalancers is another thing. I think it is nearly impossible
          >
          >
          > For this, use the ReplicantManager service. We have to do exactly the same
          > for proxy generation for EJBs.

          You mean for discovery of other LBs running?

          >
          > > in Java without
          > > generating a single point of failure - and there was my henn and
          > > egg problem.
          > > In EJB-clustering the client KNOWS the other servers. But a Web-client
          > is
          > > dumb....
          >
          > Sure. The same with hardware loadbalancer if you have only one ;)

          But HW-LBs with failover capability can modify their NIC-parameters (change
          IP-address etc.) if they detect a problem on their buddy. This is impossible
          with Java. You can achieve this through LB-software on Linux for example.
          But a Java-only solution is impossible.

          CU
          Thomas

          > we need to know which EJB is deployed on which node of the cluster to
          > generate a proxy. You need to do the same: you need to know which
          > application is running on which node and then your LB and take this list
          > >from any node and define its routing table.

          sure. I know which webapp is deployed where - BUT i do not know to which
          virtual host the webapp is connected. For example we have 2 webapps deployed
          each of them listening on different ports... This is servlet-container specific.

          > sure, not Java-only solution. But the java-only solution is a cheap
          > solution
          > otherwise you buy a router. You may have two machines, with the exact same
          > configuration, one in standby. When one dies, a script toggle the IP
          > address
          > so that the other java nodes can take over. Simply but efficient.

          Do you read my mind? ;-)))

          CU
          Thomas


          > I meant discovery of webservers running on a cluster. This means that the
          > servlet-containers must export their deployed webapps. Failover
          > between two
          > loadbalancers is another thing. I think it is nearly impossible


          For this, use the ReplicantManager service. We have to do exactly the same
          for proxy generation for EJBs.

          > in Java without
          > generating a single point of failure - and there was my henn and
          > egg problem.
          > In EJB-clustering the client KNOWS the other servers. But a Web-client is
          > dumb....

          Sure. The same with hardware loadbalancer if you have only one ;)


          > > For this, use the ReplicantManager service. We have to do
          > exactly the same
          > > for proxy generation for EJBs.
          >
          > You mean for discovery of other LBs running?

          we need to know which EJB is deployed on which node of the cluster to
          generate a proxy. You need to do the same: you need to know which
          application is running on which node and then your LB and take this list
          from any node and define its routing table.

          > > > in Java without
          > > > generating a single point of failure - and there was my henn and
          > > > egg problem.
          > > > In EJB-clustering the client KNOWS the other servers. But a Web-client
          > > is
          > > > dumb....
          > >
          > > Sure. The same with hardware loadbalancer if you have only one ;)
          >
          > But HW-LBs with failover capability can modify their
          > NIC-parameters (change
          > IP-address etc.) if they detect a problem on their buddy. This is
          > impossible
          > with Java. You can achieve this through LB-software on Linux for example.
          > But a Java-only solution is impossible.

          sure, not Java-only solution. But the java-only solution is a cheap solution
          otherwise you buy a router. You may have two machines, with the exact same
          configuration, one in standby. When one dies, a script toggle the IP address
          so that the other java nodes can take over. Simply but efficient.

          > sure. I know which webapp is deployed where - BUT i do not know to which
          > virtual host the webapp is connected. For example we have 2
          > webapps deployed
          > each of them listening on different ports... This is
          > servlet-container specific.

          yes, but keep it simple at first: assume we have homogeneous deployments
          i.e. all web apps are deployed under the same context and running on the
          same port.

          • 2. Re: JBoss Loadbalancer
            belaban

            Thomas,

            which directory does your code reside in ?
            Bela

            • 3. Re: JBoss Loadbalancer
              derry

              I will hopefully commit the code at the end of the week. The code is NOT in CVS at the moment.

              CU
              Thomas

              • 4. Re: JBoss Loadbalancer
                derry

                Hello!

                A first version of the JBoss HTTP loadbalancer is in CVS now. Feel free to test...

                CU
                Thomas