none
What is the Best Prastics to add server list?

    Question

  • Hello
         
         I have just set the demo enviropment with Appfabric beta2.I read through the help on msdn and test the samples,all go very well.

         But I didn't know how the CacheClient connect to cluster exactly. Do I must add all host to server list as memcached ? Or can I just add the lead host only?
        
         Thanks!
    Wednesday, March 10, 2010 9:35 AM

Answers

  • You can specify only the lead hosts since if the majority of lead hosts are down the cluster is down anyways.

    And FYI, from Beta2, routing client is the default and simple clients dont exist.

    Thanks
    Sanjay

    • Marked as answer by fengdm Thursday, March 11, 2010 12:21 AM
    Wednesday, March 10, 2010 3:00 PM

All replies

  • Client Library, can connect directly to each cache host, if using routing client. If you need High Availability, use xml configuration file to specify more than one host.

    HTH

    Andrea Colaci
    Wednesday, March 10, 2010 10:56 AM
  • Client Library, can connect directly to each cache host, if using routing client. If you need High Availability, use xml configuration file to specify more than one host.

    HTH

    Andrea Colaci


    Thanks for your reply,Andrea.
    But how do the cacheclient switch the request to the other alive cachehost if the cache host the client refers fail?

    Wednesday, March 10, 2010 12:31 PM
  • http://social.msdn.microsoft.com/Forums/en-US/velocity/thread/096fb29e-5b8a-4930-b2f1-4f86873e2a47


    I found a post in which Ankur said "As long as at least one of those servers is up [which you have listed in the config of the client], things will work."

    So I must add all cache hosts in the config file of the client , Is that right?
    Wednesday, March 10, 2010 12:39 PM
  • "So I must add all cache hosts in the config file of the client , Is that right?"

    Cache hosts list, declared in config file, is read everytime a DataCacheFactory instance is created.
    Even if a cache host (server) isn't listed in config file, cacheClient will be able to interact with directly if using RoutingClient, oterwise (simpleClient) only cache hosts listed in configuration files colud be requested directly for get/put operations. This means that listed cachehost may contact other cachehosts (not listed) for getting/putting items.

    HTH

    Andrea Colaci
    Wednesday, March 10, 2010 12:59 PM
  • You can specify only the lead hosts since if the majority of lead hosts are down the cluster is down anyways.

    And FYI, from Beta2, routing client is the default and simple clients dont exist.

    Thanks
    Sanjay

    • Marked as answer by fengdm Thursday, March 11, 2010 12:21 AM
    Wednesday, March 10, 2010 3:00 PM
  • Thanks for your replies,Andrea and Sanjay.

    I think I got it.

    I can add any cache hosts to the server lists,if one of them fail,the alive listed cachehost(s) will contact others to get/put items.

    But the best prastic is adding all lead hosts to the server lists,since if lead hosts fail,the cluster will down.

    Thursday, March 11, 2010 12:21 AM