Load balancing not happening - Weblogic

This is a discussion on Load balancing not happening - Weblogic ; I am working with Weblogic 8.1 . I have an Admin Server and myserver1 on machine A. I have myserver2 on machine B. Then I have HttpClusterServlet hosted on machine C. So, I hit the URL on machine C from ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Load balancing not happening

  1. Load balancing not happening


    I am working with Weblogic 8.1 . I have an Admin Server and myserver1 on machine
    A. I have myserver2 on machine B. Then I have HttpClusterServlet hosted on machine
    C. So, I hit the URL on machine C from my clients. I made several hits to the
    ClusterServlet from different clients in different sessions and it seemed to send
    all the requests to only myserver1 (which also has the admin server running).
    I thought that it had to send the requests from the clients in a round robin fashion,
    so I thought it would route to myserver1, myserver2 alternatively. Requests were
    however sent to myserver2 if myserver1 was shutdown !


    Has anybody faced a similar issue with HttpClusterServlet and if so how do you
    overcome this.

    Thanks a lot.
    Pramod

  2. Re: Load balancing not happening


    Hey Pramod,

    Are you referring to load-balancing/fail-over of the ejb (object) tier? I just
    want to make sure I understand you correctly. For load balancing to work with
    ejbs, you must do the following...

    1) Make sure that your web components (JSP, Servlets, etc) are not collocated
    with your EJBS. This means that your servlets should not be on the same machine
    where your EJB's are deployed. WebLogic will always invoke the local EJB if this
    is the case and will not attempt to load balance.

    2) Make sure that you have the appropriate properties in the ejb descriptor. Here
    is an example for stateless session beans (check the documentation for stateful
    and entity EJBS)



    TraderHome


    true
    weight-based
    true


    TraderHome



    Hope that helps

    "Pramod Korwar" wrote:
    >
    >I am working with Weblogic 8.1 . I have an Admin Server and myserver1
    >on machine
    >A. I have myserver2 on machine B. Then I have HttpClusterServlet hosted
    >on machine
    >C. So, I hit the URL on machine C from my clients. I made several hits
    >to the
    >ClusterServlet from different clients in different sessions and it seemed
    >to send
    >all the requests to only myserver1 (which also has the admin server running).
    >I thought that it had to send the requests from the clients in a round
    >robin fashion,
    >so I thought it would route to myserver1, myserver2 alternatively. Requests
    >were
    >however sent to myserver2 if myserver1 was shutdown !
    >
    >
    >Has anybody faced a similar issue with HttpClusterServlet and if so how
    >do you
    >overcome this.
    >
    >Thanks a lot.
    >Pramod



  3. Re: Load balancing not happening


    Thanks Raffi. What I am referring to is the Servlet clustering and not EJB clustering.
    So, have you seen this happen in your environment?

    Thanks
    Pramod


    "Raffi Basmajian" wrote:
    >
    >Hey Pramod,
    >
    > Are you referring to load-balancing/fail-over of the ejb (object) tier?
    >I just
    >want to make sure I understand you correctly. For load balancing to work
    >with
    >ejbs, you must do the following...
    >
    >1) Make sure that your web components (JSP, Servlets, etc) are not collocated
    >with your EJBS. This means that your servlets should not be on the same
    >machine
    >where your EJB's are deployed. WebLogic will always invoke the local
    >EJB if this
    >is the case and will not attempt to load balance.
    >
    >2) Make sure that you have the appropriate properties in the ejb descriptor.
    >Here
    >is an example for stateless session beans (check the documentation for
    >stateful
    >and entity EJBS)
    >
    >
    >
    > TraderHome
    >
    >
    > true
    > weight-based
    > true
    >

    >

    > TraderHome
    >

    >

    >
    >Hope that helps
    >
    >"Pramod Korwar" wrote:
    >>
    >>I am working with Weblogic 8.1 . I have an Admin Server and myserver1
    >>on machine
    >>A. I have myserver2 on machine B. Then I have HttpClusterServlet hosted
    >>on machine
    >>C. So, I hit the URL on machine C from my clients. I made several hits
    >>to the
    >>ClusterServlet from different clients in different sessions and it seemed
    >>to send
    >>all the requests to only myserver1 (which also has the admin server

    >running).
    >>I thought that it had to send the requests from the clients in a round
    >>robin fashion,
    >>so I thought it would route to myserver1, myserver2 alternatively.

    >Requests
    >>were
    >>however sent to myserver2 if myserver1 was shutdown !
    >>
    >>
    >>Has anybody faced a similar issue with HttpClusterServlet and if so

    >how
    >>do you
    >>overcome this.
    >>
    >>Thanks a lot.
    >>Pramod

    >



  4. Re: Load balancing not happening


    Are you using a proxy server at all? If so, then the proxy server will provide
    basic round robin load balancing through the WebLogic plugin. If you are running
    your test with an active HTTP session from the client, then all requests for the
    same session will be forwarded to the primary machine. That's probably why you
    see all requests going to the same server. Try accessing the same URL from another
    machine, which will force a new session to be created, and you should see that
    request forwarded to the other server! :-D

    Raffi
    "Pramod Korwar" wrote:
    >
    >Thanks Raffi. What I am referring to is the Servlet clustering and not
    >EJB clustering.
    >So, have you seen this happen in your environment?
    >
    >Thanks
    >Pramod
    >
    >
    >"Raffi Basmajian" wrote:
    >>
    >>Hey Pramod,
    >>
    >> Are you referring to load-balancing/fail-over of the ejb (object)

    >tier?
    >>I just
    >>want to make sure I understand you correctly. For load balancing to

    >work
    >>with
    >>ejbs, you must do the following...
    >>
    >>1) Make sure that your web components (JSP, Servlets, etc) are not collocated
    >>with your EJBS. This means that your servlets should not be on the same
    >>machine
    >>where your EJB's are deployed. WebLogic will always invoke the local
    >>EJB if this
    >>is the case and will not attempt to load balance.
    >>
    >>2) Make sure that you have the appropriate properties in the ejb descriptor.
    >>Here
    >>is an example for stateless session beans (check the documentation for
    >>stateful
    >>and entity EJBS)
    >>
    >>
    >>
    >> TraderHome
    >>
    >>
    >> true
    >> weight-based
    >> true
    >>

    >>

    >> TraderHome
    >>

    >>

    >>
    >>Hope that helps
    >>
    >>"Pramod Korwar" wrote:
    >>>
    >>>I am working with Weblogic 8.1 . I have an Admin Server and myserver1
    >>>on machine
    >>>A. I have myserver2 on machine B. Then I have HttpClusterServlet hosted
    >>>on machine
    >>>C. So, I hit the URL on machine C from my clients. I made several hits
    >>>to the
    >>>ClusterServlet from different clients in different sessions and it

    >seemed
    >>>to send
    >>>all the requests to only myserver1 (which also has the admin server

    >>running).
    >>>I thought that it had to send the requests from the clients in a round
    >>>robin fashion,
    >>>so I thought it would route to myserver1, myserver2 alternatively.

    >
    >>Requests
    >>>were
    >>>however sent to myserver2 if myserver1 was shutdown !
    >>>
    >>>
    >>>Has anybody faced a similar issue with HttpClusterServlet and if so

    >>how
    >>>do you
    >>>overcome this.
    >>>
    >>>Thanks a lot.
    >>>Pramod

    >>

    >



  5. Re: Load balancing not happening


    I have tried from different machines and different sessions. All the request go
    to one server
    till that server is brought down. Then, the requests start going to the other
    live server.

    Thanks
    Pramod

    "Raffi Basmajian" wrote:
    >
    >Are you using a proxy server at all? If so, then the proxy server will
    >provide
    >basic round robin load balancing through the WebLogic plugin. If you
    >are running
    >your test with an active HTTP session from the client, then all requests
    >for the
    >same session will be forwarded to the primary machine. That's probably
    >why you
    >see all requests going to the same server. Try accessing the same URL
    >from another
    >machine, which will force a new session to be created, and you should
    >see that
    >request forwarded to the other server! :-D
    >
    >Raffi
    >"Pramod Korwar" wrote:
    >>
    >>Thanks Raffi. What I am referring to is the Servlet clustering and not
    >>EJB clustering.
    >>So, have you seen this happen in your environment?
    >>
    >>Thanks
    >>Pramod
    >>
    >>
    >>"Raffi Basmajian" wrote:
    >>>
    >>>Hey Pramod,
    >>>
    >>> Are you referring to load-balancing/fail-over of the ejb (object)

    >>tier?
    >>>I just
    >>>want to make sure I understand you correctly. For load balancing to

    >>work
    >>>with
    >>>ejbs, you must do the following...
    >>>
    >>>1) Make sure that your web components (JSP, Servlets, etc) are not

    >collocated
    >>>with your EJBS. This means that your servlets should not be on the

    >same
    >>>machine
    >>>where your EJB's are deployed. WebLogic will always invoke the local
    >>>EJB if this
    >>>is the case and will not attempt to load balance.
    >>>
    >>>2) Make sure that you have the appropriate properties in the ejb descriptor.
    >>>Here
    >>>is an example for stateless session beans (check the documentation

    >for
    >>>stateful
    >>>and entity EJBS)
    >>>
    >>>
    >>>
    >>> TraderHome
    >>>
    >>>
    >>> true
    >>> weight-based
    >>> true
    >>>

    >>>

    >>> TraderHome
    >>>

    >>>

    >>>
    >>>Hope that helps
    >>>
    >>>"Pramod Korwar" wrote:
    >>>>
    >>>>I am working with Weblogic 8.1 . I have an Admin Server and myserver1
    >>>>on machine
    >>>>A. I have myserver2 on machine B. Then I have HttpClusterServlet

    >hosted
    >>>>on machine
    >>>>C. So, I hit the URL on machine C from my clients. I made several

    >hits
    >>>>to the
    >>>>ClusterServlet from different clients in different sessions and it

    >>seemed
    >>>>to send
    >>>>all the requests to only myserver1 (which also has the admin server
    >>>running).
    >>>>I thought that it had to send the requests from the clients in a round
    >>>>robin fashion,
    >>>>so I thought it would route to myserver1, myserver2 alternatively.

    >>
    >>>Requests
    >>>>were
    >>>>however sent to myserver2 if myserver1 was shutdown !
    >>>>
    >>>>
    >>>>Has anybody faced a similar issue with HttpClusterServlet and if so
    >>>how
    >>>>do you
    >>>>overcome this.
    >>>>
    >>>>Thanks a lot.
    >>>>Pramod
    >>>

    >>

    >



+ Reply to Thread