Announcement Announcement Module
Collapse
No announcement yet.
Does Spring support Clustering Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Does Spring support Clustering

    Hello all,

    Does Spring support Clustering?
    I mean a spring module ( war ) could be deployed on multiple server instances and realize Clustering features listed below.

    As far as we know that EJB supports Clustering,but does Spring also support Clustering?

    Thanks and Rgds
    Wang Yan

  • #2
    Does Spring support Clustering?
    Can you be more specific?

    I mean a spring module ( war ) could be deployed on multiple server instances and realize Clustering features listed below...
    The feature list isn't posted.

    Comment


    • #3
      Re: Does Spring support Clustering

      Originally posted by stewchicken
      Hello all,

      Does Spring support Clustering?
      Clustering isn`t a task for Spring (I think). If you take a look at tomcat for example, you can cluster in different ways:
      -you can use sticky sessions. A load balancer knows the server where a user belongs so he always has the same session. No session replication is needed.
      -session replication. Tomcat servers can replicate sessions on all servers, so it doesn`t matter which server a user uses.

      Which application server are you using?

      Comment


      • #4
        Clustering for both EJBs and web applications are function of the environment a Spring application is run in, not Spring itself.

        Comment


        • #5
          To rephrase what the others have said - Spring is just a framework not a container. It helps developing the application but does not actually runs it and it doesn't provide any support for clustering (clustering makes sense when you have also the 'entities' to do it on : web sessions, entity beans).

          Comment


          • #6
            Hello *,

            Thanks for your comments on this

            What makes me think about Spring supporting Clusterring
            is that based on EJB framework , ejb object supporting remote interface,
            therefore copy of ejb objects on different VM(server) could still keep
            sync with each other and in Spring frame work there is not remote interface for each copy of bean object on different VM(clustering) to keep sync .

            One question for Alarmnummer
            Could you tell me what is sticky session?

            Comment


            • #7
              What makes me think about Spring supporting Clusterring
              is that based on EJB framework , ejb object supporting remote interface,
              Spring is an IoC framework - it's not based on EJBs. It has support for EJBs and it simplies working with them but it has no dependecies on an ap server as you suggest. EJBs are defined by spec through a set of interfaces and some classes - Spring support for EJB extends only those and those alone.
              Also, clustering is not required by EJB 2.1 spec AFAIK.

              Could you tell me what is sticky session?
              Until alarmnummer responses you can simply google for load balancing and session replication and see what you can find (read the manual for Tomcat, JBoss or some EJB container).

              Comment


              • #8
                Could you tell me what is sticky session?
                The load balancer inspects your session (e.g. via cookie or IP), and directs all requests from that session to th one server.

                Comment


                • #9
                  Originally posted by stewchicken
                  Hello *,

                  One question for Alarmnummer
                  Could you tell me what is sticky session?
                  Like costin said : the load balancer keeps sending a user to the same server (so there always is the same session).

                  Comment


                  • #10
                    Actually that was katentim

                    Comment


                    • #11
                      caucho's resin

                      if you're looking for functionality like load balancing, distributed sessions and sticky sessions, read through the docs at caucho.com. Their Resin J2EE container does a great job of handling this.

                      mike

                      Comment


                      • #12
                        Re: caucho's resin

                        Originally posted by miikeeg
                        if you're looking for functionality like load balancing, distributed sessions and sticky sessions, read through the docs at caucho.com. Their Resin J2EE container does a great job of handling this.

                        mike
                        Tomcat also has support for it and I think a lot of other servlet/applications containers have.

                        Comment


                        • #13
                          Just to add little more to the discussion. I was talking to a friend today, he told me he was asked about how does Spring deals with it. Suppose we have two servers, so we have 2 different ApplicationContexts, the singleton attribute for a bean is JVM level right (I know it's very complicated to achive singleton on multiple VMs). People here suggested Tomcat, Jboss, what if I have a standalone application the is built on top of Spring? Does spring has a support for jgroups or something like it, to replicate the application context?

                          Comment


                          • #14
                            afaik, it does not have this explicit clustering support. Of course, with its support for Remoting, JMS, and JMX and future context serialization, this could be added.

                            As was mentioned in this thread, Spring is not a server, so its understandable that out of the box this feature is not presently applicable.

                            Comment


                            • #15
                              No and I don't think it has to. Application contexts can be made available to a servlet context which I suppose can be made 'cluster-able' through the web container replication.
                              I'm pretty sure you can 'piggy back' on an existing mechanism - Spring is actually invisible to your application (no dependencies are enforced).

                              Comment

                              Working...
                              X