locked
how does the cache client know which server keep the cache date which it just save?(Windows azure appfabric caching service) RRS feed

  • Question

  • the problem is about  Windows azure  appfabric caching service

    I assume there are one cache client and three  cache servers: server1,server2,server3

    then the cache client saved the cache data in one of the cache servers,we suppose the cache data  happened to saved in the server2.

    then, the cache client wanna fetch back the cache data which it just saved.

    before the cache client can fetch back the cache data ,it must know which server keep its data .

    so my question is how does the cache client know which server keep the cache data ?

    for example,how does cache client  know server2 keep its data ?

    Is there any mapping table between cache data and cache server ?


    • Edited by Jacky_shen Sunday, October 14, 2012 10:24 AM
    Sunday, October 14, 2012 10:14 AM

Answers

  • Hi,

    The caches are layered. All cache are stored on a cache server. When one of the application server tries to access a cached item, it will copy the cache to the local memory if there's sufficient memory available. If not, it may discard an old local cached item, but the item is not discarded on the cache server(There may be more than one cache servers). In this case, if local cache is missed, app server will send requests to all of those cache servers to check for cache.

    Best Regards,

    Ming Xu.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework

    • Marked as answer by Jacky_shen Monday, October 15, 2012 11:05 AM
    Monday, October 15, 2012 3:24 AM
  • Hi,

    >>So you means ,eventually ,the cache data in server2 will be copied to the server1 and server3 ?

    No, the cache memory is shared across all servers in the cache. If you have a 2G cache configured on 4 servers, you will have 8G cache memory in total.

    Regards,

    Alan


    Free EBook: "Windows Azure Service Bus Developer Guide" http://www.cloudcasts.net/devguide/

    • Marked as answer by Jacky_shen Monday, October 15, 2012 11:04 AM
    Monday, October 15, 2012 5:17 AM
  • The caching client is a routing client, it has a routing table which helps it to route the requests. The key which you use is essentially a hash for us.

    Using that hash the client knows whom to contact. Its a bit more complicated than that, but this should answer your question.

    • Proposed as answer by Ankit Sud [MSFT] Monday, October 15, 2012 7:49 AM
    • Marked as answer by Jacky_shen Monday, October 15, 2012 11:04 AM
    Monday, October 15, 2012 7:40 AM

All replies

  • Hi,

    The cache service is a distributed cache, the servers communicate with each other to coordinate the cache storage and requests.

    If an obejct is stored on server2, it can be retrieved from any three servers in the group.

    Regards,

    Alan


    Free EBook: "Windows Azure Service Bus Developer Guide" http://www.cloudcasts.net/devguide/

    Sunday, October 14, 2012 10:29 AM
  • Hello Alan,

    thank you .

    So you means ,eventually ,the cache data in server2 will be copied to the server1 and server3 ?

    but if that is the case, how does the caching service do the scalablity/scale out for the cache data size?

    we suppose that each server's physical memory volume  is 8G, then it seems the maximum data size it cancache is 8G,

    but we suppose the cache data size which I want to cache  improve to 80G, how does the cache server deal with that situation ?




    • Edited by Jacky_shen Sunday, October 14, 2012 10:46 AM
    Sunday, October 14, 2012 10:45 AM
  • Hi,

    The caches are layered. All cache are stored on a cache server. When one of the application server tries to access a cached item, it will copy the cache to the local memory if there's sufficient memory available. If not, it may discard an old local cached item, but the item is not discarded on the cache server(There may be more than one cache servers). In this case, if local cache is missed, app server will send requests to all of those cache servers to check for cache.

    Best Regards,

    Ming Xu.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework

    • Marked as answer by Jacky_shen Monday, October 15, 2012 11:05 AM
    Monday, October 15, 2012 3:24 AM
  • Hi,

    >>So you means ,eventually ,the cache data in server2 will be copied to the server1 and server3 ?

    No, the cache memory is shared across all servers in the cache. If you have a 2G cache configured on 4 servers, you will have 8G cache memory in total.

    Regards,

    Alan


    Free EBook: "Windows Azure Service Bus Developer Guide" http://www.cloudcasts.net/devguide/

    • Marked as answer by Jacky_shen Monday, October 15, 2012 11:04 AM
    Monday, October 15, 2012 5:17 AM
  • The caching client is a routing client, it has a routing table which helps it to route the requests. The key which you use is essentially a hash for us.

    Using that hash the client knows whom to contact. Its a bit more complicated than that, but this should answer your question.

    • Proposed as answer by Ankit Sud [MSFT] Monday, October 15, 2012 7:49 AM
    • Marked as answer by Jacky_shen Monday, October 15, 2012 11:04 AM
    Monday, October 15, 2012 7:40 AM