7 Replies Latest reply on Aug 27, 2012 5:51 AM by Galder Zamarreño

    Hotrod server distributed mode

    Nag Ch Newbie

      Hi,

       

      We have two  physical severs and I want to setup infiinispan hot rod server on each one and they should form cluser , both servers should be in distributed cluster mode.

       

      Is this should work?

       

      We have multiple hotrod clients we need to run. 

       

      Clients on app1 should first talk  to hot rod server on app1  and if its not available it should talk to app2.

       

      Clients on app2 should first talk to hot rod server on app2 and if its not available it should talk to app1.

       

      This is reduce network traffic.

       

      How do I configure this? I have used HotRod client serverlist but not sure how client knows which one should be talking to  first.

       

       

      Thanks in advance.

      Nag.

        • 1. Re: Hotrod server distributed mode
          Galder Zamarreño Master

          You don't really care which of the servers it connects to. If they're clustering, you can only give one address, and from it it'll detect the others.              

          • 2. Re: Hotrod server distributed mode
            Nag Ch Newbie

            Hi Galder,

             

            may be I am misunderstanding  how Hotrod sever clusterting and hot rod client  works?

             

            HotRod client properties we specify infinispan.client.hotrod.server_list  which are hottodsever1 , hottodsever2   and they form cluster  using jgroups because they are on same network.

             

            hottodsever1 is running on one machine  and hottodsever2  running on another machine.

             

            When hottodsever1 is down hot rod client automatically connects to hottodsever2  vice versa?

             

            Is this correct?

             

             

            Thanks

             

             

             

             

             

            • 3. Re: Hotrod server distributed mode
              Galder Zamarreño Master

              Yeah, that is correct. The client will handle load balancing and failover automatically. It goes further: if a new node joins the cluster, the Hot Rod client will be notified with this new node, to be able to send requests to it.

              • 4. Re: Hotrod server distributed mode
                Nag Ch Newbie

                Is there any way I can tell Hot Rod Client to use one HotRodserver and if its down go to another another one?

                 

                How HotRod client know which server to use first ?

                 

                When you say new node added to cluster that means new hotrodserver ? If yes,  Why we need to specify server list in hot rod client if automatically detects the new nodes(servers) ?

                 

                 

                btw- I am using distributed clustering mode.

                 

                Thank you

                • 5. Re: Hotrod server distributed mode
                  Galder Zamarreño Master

                  Nag Ch wrote:

                   

                  Is there any way I can tell Hot Rod Client to use one HotRodserver and if its down go to another another one?

                  To reiterate, it already does that by default...

                   

                  How HotRod client know which server to use first ?

                  Normally first in list, Then if replication, round robin on the cluster members, and with distribution, according to the hashing algorithm results.

                   

                  When you say new node added to cluster that means new hotrodserver ? If yes,  Why we need to specify server list in hot rod client if automatically detects the new nodes(servers) ?

                  The servers might not be clustered... anyway, if they're gonna be clustered, you just need to give the client one of the addresses of the cluster and the rest will be discovered automatically

                  • 6. Re: Hotrod server distributed mode
                    Nag Ch Newbie

                    Hi Galder,

                    When do we need multiple server list specified in hot rod client ?   

                     

                    If I am understanding it correctly , we  speciify only one server address in hot rod client  if  servers are clustered using distributed mode.(Running on same network)

                     

                    If servers are  not clustered  may be due to running on different network then we need to specify both server address in hot rod client.

                     

                    In both cases above hot client find  server node using hashing algorithm  in case of distributed mode?

                     

                    I need high availabilty thats I am  using distrubtion so that one server down it au

                     

                     

                    Thank you.

                     

                     

                     

                     

                     

                    • 7. Re: Hotrod server distributed mode
                      Galder Zamarreño Master

                      Nag Ch wrote:

                       

                      Hi Galder,

                      When do we need multiple server list specified in hot rod client ?    

                      As I said above, when the servers are NOT clustered.

                       

                      In both cases above hot client find  server node using hashing algorithm  in case of distributed mode?

                      When servers are not clustered, there's no distribution, so no.