1
0
-1

Does MemCache persist cached values across multiple nodes in HA?

I assume it doesnt but wanted to double check with the product team. thanks Miro 

  1. Christopher Eagar

    Hi Miro, 

    Do you still need an answer for this question?

    Regards, 

    Chris

CommentAdd your comment...

1 answer

  1.  
    2
    1
    0

    MemCache is local to the JVM process. If you have code running on multiple nodes, which you will in production. The MemCache will be loaded (and expire) in a lazy fashion as the workload / service invocations flow through that node.

    1. Christopher Eagar

      No prob Miro, thanks also to Malcolm Edgar for the technical content.

    2. Nirmal Solanki

      Malcolm Edgar we have similar requirement to create a MemCache object but share across multiple nodes. So just to be clear from your answer, does this mean MemCache is available for that particular node (that was assigned by LB) only? If we were to have MemCache available on all nodes, do we need to add a check in the groovy service to check for Null (or timed out) and create as we go? Eventually all nodes will have a copy of MemCache object.

    3. Malcolm Edgar

      The design pattern for using MemCache is to:

      1. check whether MemCache has has the item
      2. if the MemCache does, then all good
      3. if the MemCache does not then load the item from where ever and also put it in MemCache

      In this fashion the MemCaches in each TM server (process) will be loaded in a lazy fashion as the workload arrives on the nodes.

    CommentAdd your comment...