6 Replies Latest reply: Oct 1, 2013 8:08 AM by learningoracle RSS

    Where to configure clustering: at the web server or load balancer?

    learningoracle

      Hi all,

      some setup questions. I read about clustering and where to configure the clustering. My main objective is to achieve session stickness, session failover. but I will ask these subsequently when I clarify the below.

       

      If my setup is

      Web Server -> WebLogic cluster, I need to install the weblogic cluster plugin at the web server.

       

      If my setup is

      Load Balacer -> WebLogic cluster, I need to configure the LB, of cos the LB needs to fulfill certain criteria.

       

      My planned setup is

      Web Server -> LB -> WebLogic cluster. the load balancing to the weblogic is done at the LB. I will need to configure the LB to load balance to the cluster.

      I reckon I need NOT configure the weblogic plugin at the Web Server, correct?

      the configuration at the web server is plainly a proxy straight through to the LB.

       

      Hence my next qn: the configuration at the LB is to load balance to the weblogic cluster OR to a list of all the backend server's .jsf page? Assuming the landing page for my app is a jsf page. Appreciate your advise.

        • 1. Re: Where to configure clustering: at the web server or load balancer?
          Fabian

          Hi,

           

          Give a try to this setup,Its simple and clear

          4 Physical Boxes

          Webserver Box A and B

          Weblogic Cluster C and D

          Firewall-->Load Balancer-->2 Webserver(A/B)-->Horizonatl weblogic cluster(C/D)

          You need to install the weblogic cluster plugin at the web server and your Load Balancer will just load balance across two webserver.

           

          Regards,

          Fabian

          • 2. Re: Where to configure clustering: at the web server or load balancer?
            learningoracle

            Hi Fabian,

             

            thank you.

             

            a) For the setup you recommended,I assume I need to set the sticky bit on the LB and also sticky bit configuration in the web server configuration?

             

            b) If I want to achieve session replication, I would have to set the replicated_if_cluster option. Will this cause conflict with the stick bit configuration?

             

            Under what considerations/circumstances should I be needing a load balancer in front of my weblogic cluster?

            • 3. Re: Where to configure clustering: at the web server or load balancer?
              Ali_webloigc

              a) You would need sticky bit on LB. On webserver, the Weblogic Plugin will take care of sticky sessions.

              b) Yes you would need to add that to your weblogic.xml in the application. There will not be any conflict. However, your heap memory usage will increase as you would be storing same session information on two servers.

               

              "Under what considerations/circumstances should I be needing a load balancer in front of my weblogic cluster?" --


              The main reason you would use load balancer is to hold the VIP for your application. It would load balance between the weservers. Also generally SSL is terminated at load balancer level. It helps you achive cross clutser replication etc... You may want to read this document ..Failover and Replication in a Cluster

              • 4. Re: Where to configure clustering: at the web server or load balancer?
                learningoracle

                Hi Ali_webloigc,

                 

                thank you for your inputs.

                 

                by configuring the web proxy plugin in the webserver will also allow me to achieve cluster ( within one cluster) replication/failover right?

                 

                The hardware LB will allow me to achieve cross cluster replication? ie cluster A failover to cluster B?

                 

                I have the following possible setups I am considering ( no cross cluster involved), and also the steps I need to do. Please point out any errors.

                 

                a) LB -> web server(s) -> WL cluster

                I will need to configure the web proxy plug in in the web server.

                I will need to configure the sticky bit on the LB

                Do I need to configure the WL clustering at the LB? I reckon no need because the LB is only to load balance across the web servers.( As suggested by Fabian)

                Any missed steps?

                 

                b) web server -> WL cluster

                I will need to configure the web proxy plug in in the web server.

                Any missed steps?

                 

                c) web server -> LB -> WL cluster

                I will need to configure the WL clustering at the LB.

                I will need to configure the sticky bit on the LB.

                Do I need to configure the WL proxy plugin at the web server?

                I will need to configure the sticky bit on the web server. ( I suspect this is not necessary,since the web server is only pointing to 1 VIP of the LB, there is nothing to stick per se.)

                Any missed steps?

                 

                d) LB_1-> web server -> LB_2 -> WL cluster

                I will need to configure the WL clustering at the LB_2.

                I will need to configure the sticky bit on the LB_2.

                Do I need to configure the WL proxy plugin at the webserver?

                Do I need to configure the WL clustering at the LB_1?

                I will need to set the sticky bit at LB_1.

                I will need to configure the sticky bit on the web server. ( I suspect this is not necessary,since the web server is only pointing to 1 VIP of LB_2, there is nothing to stick per se.)

                Any missed steps?

                 

                Amongst options a,b,c,d which is recommended for a web application that displays jsf pages and invoke java objects that calls a database for read and writes?

                 

                I am inclined to choose either a) or b) reason being configuring the LB for clustering might challenging and overkill since I do not require cross cluster replication.

                 

                Appreciate any advise and recommendations.

                • 5. Re: Where to configure clustering: at the web server or load balancer?
                  Ali_webloigc

                  "by configuring the web proxy plugin in the webserver will also allow me to achieve cluster ( within one cluster) replication/failover right?" -- Yes

                   

                  a) LB -> web server(s) -> WL cluster

                  LB load balances between webservers and webservers load balance between WL servers. So, Yes
                  You would need to configure clusters in WL as the plugin will work off of the cluster config in your domain.


                  b) web server -> WL cluster- You still need to configure clusters in WL


                  c) web server -> LB -> WL cluster- this does not look practical to me. There is no reason to have Webserver in front of LB unless you have a specific purpose for it.


                  d) LB_1-> web server -> LB_2 -> WL cluster-- Unless you have a specific need , this make no practical sense.


                  In a simple scenario, I would just do  B.  A is just to have a way to load balance my HTTP servers.

                  • 6. Re: Where to configure clustering: at the web server or load balancer?
                    learningoracle

                    Hi Ali_webloigc,

                     

                    I am thinking of (d) for this scenario.

                     

                    I have 2 clusters of web logic servers. say cluster A and B. Within cluster A, there is session replication. Likewise for cluster B, there is session replication within the cluster.

                     

                    The LB will distribute traffic to the two clusters. So that I can shutdown each cluster for maintenance work if required. While the other cluster can still take traffic.

                     

                    Or having the LB infront of the WL cluster is an overkill if I not looking for cross-cluster replication?

                     

                    Can the web proxy plug in achieve this?  I am not looking for cross-cluster replication. Just within each cluster.

                     

                    Assuming

                    cluster1 has w1s1.com:7001,w1s2.com:7001

                    cluster2 has w1s3.com:7001, wls4.com:7001

                     

                    <IfModule mod_weblogic.c>
                      WebLogicCluster w1s1.com:7001,w1s2.com:7001,w1s3.com:7001,wls4.com:7001
                    </IfModule>

                     

                    Would the above config work? Ie if the session hits an instance in cluster 1, it will replicate to the other instance within the same cluster.

                    I can't see to find any literature from Oracle regarding the proxy plug in for multiple clusters

                     

                    the closest I found from Oracle (http://docs.oracle.com/cd/E13222_01/wls/docs81/plugins/apache.html#119517 " Example using weblogic clusters") is this example, does not really match what I am looking for.

                    <IfModule mod_weblogic.c>
                      MatchExpression *.jsp WebLogicHost=myHost|WebLogicPort=7001|Debug=ON
                      MatchExpression *.html WebLogicCluster=myHost1:7282,myHost2:7283|ErrorPage=
                        http://www.xyz.com/error.html
                    </IfModule>