1 2 Previous Next 17 Replies Latest reply: Dec 23, 2011 4:21 AM by Radoslav Husar RSS

    JBoss 7, domain and clustering

    Riccardo Pasquini Novice

      Hi,

       

      i'm trying to understand how AS7 can be used to balance the load and provide availability, so, i've setup a domain as follows:

       

      • a server group to host the domain controller
      • another server group with 2 servers which is used to deploy user interface as war file
      • another server group with 2 servers which is used to deploy reusable business logic (EJBs)

       

      the profile used for the groups is ha with the exception of the group which hosts the domain controller, so my understanding, waiting for the Cluster Guide, is that i have a cluster with 2 partitions and every partition has 2 nodes, and a standalone server out of the cluster.

       

      First check... is it correct? can i assume a server group to be a cluster partition?

       

      EJBs are described in jboss.xml as clustered and their deploy works fine, the web application, instead, deploys in its server group, if and only if i do not describe it as distributable.

       

      So, where is my fault? Why i cannot describe the web application as distributable?

       

      Next step is to lookup the deployed EJBs from the UI which, if i understand the domain, is a remote client, but to balance the load i was used to ask to the HAJNDI service... which has no reference in domain.xml configuration file... (ha-sockets)...  i've tried to lookup into standalone-ha.xml file to see if there was some difference with the domain configuration but i had failed.

       

      How can i lookup a JNDI name in a server group to benefit of the load balancing?

       

      Thank you in advance,

      Riccardo

        • 1. Re: JBoss 7, domain and clustering
          Paul Ferraro Master

          AS7 only implements EJB 3.1 Lite - which lacks support for remote EJB invocation.

          Full EJB 3.1 support is planned for AS 7.1.

          As for why your <distributable/> webapp is not deploying, I think you've been bitten by this bug:

          https://issues.jboss.org/browse/AS7-1363

          Can you try building the latest from master?  or wait until 7.0.1 (which should be released next week).

           

          Regarding the relationship between server group and cluster "partition".  There isn't one really.

          A server group is a collection of servers to be managed together.  Imagine deploying an application to a "server group".

          A cluster is a separate concept and is entirely determined by the socket bindings of a given server.  So, to servers in the same group may or may not belong to the same cluster - it depends on whether or not they share the same socket bindings.  Did that make sense?

          • 2. Re: JBoss 7, domain and clustering
            Riccardo Pasquini Novice

            Thank you Paul,

             

            so... even if i've downloaded the full AS7, i will not find any help in the domain-preview.xml configuration and a server group is not a partition.... infact you're answer highlight that a partition should automatically distribute the deployed artifacts to every node but now i'm quite confused about the need of server groups... maybe balancing without replication? different deployment environments like test environment... pre production environment...?

             

            AS7.1 is expected for the end of the year, is it?

             

            thank you and bye

             

            EDIT as confirmation about the preview configuration, it's documented that AS7 comes with ejb 3.1 lite even in the full distribution (https://docs.jboss.org/author/display/AS7/Getting+Started+Guide)

            • 3. Re: JBoss 7, domain and clustering
              Paul Ferraro Master

              The stuff in "*-preview.xml" represents functionality beyond what is dictated by the Java EE 6 Web Profile spec.

               

              Regarding management and partitions - the multi-server management functionality doesn't actually use any clustering code - so the concepts of server groups and hosts are independent of the runtime clusterability of your application.

               

              Remember a server group is merely an association between a profile (i.e. a set of subsystems and configuration) and a socket binding group (a set of addresses/ports on which to operate).  It has more to do with defining servers easily than anything else. Typically, members of a cluster will have the same set of subsystems/configuration - so there is often a correlation - but that's really it.  As for how you use them (QA environment, load balancing group, staging environment, etc) - that's completely up to you.

               

              See Brian's webinar on the subject: http://www.vimeo.com/25855285

               

              The AS 7.1.0.CR1 is scheduled for Nov 8.  Barring any slippage, the final can typically be expected a few weeks later.

              • 4. Re: JBoss 7, domain and clustering
                Riccardo Pasquini Novice

                Let me add just a consideration... while waiting for 7.1

                 

                It's hard to think to a server group as a merely association between profiles and bindings cause the deployment of an artifact is per group... limited by my understanding, if i deploy a web application in a server group, that application is spawn across every host and this is a partition behavior, so... i hope that 7.1 will bind server groups and partitions cause in the other case, i see only a great confusion... at least in my head...

                 

                thank you Paul

                • 5. Re: JBoss 7, domain and clustering
                  Paul Ferraro Master

                  I understand.  You're still thinking in terms of the farming service, where deployment of an application could be done per partition.  The farming service has been superceded by AS7's management infrastructure, which is far more powerful and flexible than was available with the farming service.  Perhaps this should be better communicated on our part.  Thanks for the feedback.

                  • 6. Re: JBoss 7, domain and clustering
                    Riccardo Pasquini Novice

                    btw, is it possible to reach a draft of the clustering guide for AS7?

                    • 7. Re: JBoss 7, domain and clustering
                      Paul Ferraro Master

                      Not yet, but here are a couple of resources:

                       

                      Webinar on AS7 Clustering:

                      http://www.vimeo.com/25863625

                       

                      Using Infinispan in AS7:

                      http://infinispan.blogspot.com/2011/07/infinispan-in-jboss-as7.html

                       

                      Paul

                      • 8. Re: JBoss 7, domain and clustering
                        Riccardo Pasquini Novice

                        Than you again! The webinar is great, so..

                         

                        there is no more farming, application is deployed in the server group and replicated/balanced in it, just because it is not deployed somewhere else... i mean, in the starting scenario, if i have deployed the war on both server groups i'd had got 4 replications of the war.

                         

                        Will be possible to partitionate nodes in the cluster in the 7.1?

                         

                        But i'm stuck cause there is the issue of the distributable element whose fix is expected in 7.0.1 and EJBs must be deployed in the same server group cause remoting is expected in the 7.1 (and i'll find the HAJNDI port i suppose)

                         

                        Finally, in the standalone example, the lack of farming creates the need to deploy the artifacts in every node....

                         

                        ok i have a better idea (i hope it is not misleading ) about AS7 clustering now, thank you

                        • 9. Re: JBoss 7, domain and clustering
                          Riccardo Pasquini Novice

                          Hi,

                           

                          i've just tried the nightly build (7.1.0-alpha1) with a web application marked as distributable and it fails to deploy with the following error:

                           

                           

                          Failed to disable Webapp-0.1-SNAPSHOT.war.
                          
                          Unexpected HTTP response: 500
                          
                          Request
                          {
                              "address" => [
                                  ("server-group" => "dragon-standalone"),
                                  ("deployment" => "Webapp-0.1-SNAPSHOT.war")
                              ],
                              "operation" => "deploy"
                          }
                          
                          Response
                          
                          Internal Server Error
                          {
                              "outcome" => "failed",
                              "result" => {"server-groups" => [("dragon-standalone" => {"master" => {
                              "host" => "master",
                              "response" => {
                                  "outcome" => "failed",
                                  "failure-description" => "Operation handler failed to complete",
                                  "rolled-back" => true
                              }
                          }})]},
                              "failure-description" => "Operation failed or was rolled back on all servers.",
                              "rolled-back" => true
                          }
                          

                           

                          tomorrow... i'll try to check with a 7.0.1 (if i find it...), i hope it's a missed merge between branches

                           

                          anyway the difference between a deployable war with a non deployable war is the <distributable /> added using the web.xml editor in eclipse... so i'm quite sure that the descriptor is correct... bye

                          • 10. Re: JBoss 7, domain and clustering
                            Paul Ferraro Master

                            Can you post any stacktrace from server.log?  Also, how are you starting your server?  To actually use distributed web sessions, you need to use either the "ha" profile from domain.xml - or the standalone-ha.xml config file.

                            e.g.

                            ./bin/standalone.sh --server-config=standalone/configuration/standalone-ha.xml

                             

                            However, even if you started your server with the standalone.xml (which lacks the requisite clustering subsystems), the deployment should fall back to non-distributed with a WARN log.

                            • 11. Re: JBoss 7, domain and clustering
                              Riccardo Pasquini Novice

                              i'm using domain configuration but i have to sorry about 7.1.0.Alpha1 cause the problem was due to a my configuration fault about sockets (std vs ha)

                               

                              i'm getting the bright new 7.0.1 right now to test the distributable issue which was in the 7.0.0

                               

                              sorry again about terrorism in the 7.1.0

                              • 12. Re: JBoss 7, domain and clustering
                                Vikas Kumar Newbie

                                Hi,

                                Does AS 7 support Web session replication (at this point we are looking only for Web session replication only) over a cluster where the session data gets stored in Database?

                                 

                                Thanks,

                                Vikas

                                • 14. Re: JBoss 7, domain and clustering
                                  Vikas Kumar Newbie

                                  Thanks Rado for the links, very helpful.

                                   

                                  Thanks,

                                  Vikas

                                  1 2 Previous Next