Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>In short the answer is no.</p> <p>The time a cluster takes to restart increases as you add extra nodes which leads me to believe that it is a node synchronisation process that takes the time.</p> <p>The exception your seeing is indeed the appfabric node entering a throttled state. It will enter the throttled state depending on how you have the high/low watermarks set on the node. I think by default the high water mark is 90% after this time it will start evicting items depnding on the eviction policy that is set on the cache. You should generally use LRU (Least recently used) but if the cache still cannot run within the limits set it will throttle itself as to not bring your server down.</p> <p>Your application would benefit if it could handle such events gracefully. If you have all nodes listed in the cluster config of your app then your app should move on to the next node on the next attempt to get data. We use a retry loop looking for the temporary failure and retrying 3 times. If after 3 times the error persists we log and return null, not an exeption. This allows the application to attempt accessing a different node or allowing the problem node time to recover:</p> <pre><code> private object WithRetry(Func&lt;object&gt; method) { int tryCount = 0; bool done = false; object result = null; do { try { result = method(); done = true; } catch (DataCacheException ex) { if (ex.ErrorCode == DataCacheErrorCode.KeyDoesNotExist) { done = true; } else if ((ex.ErrorCode == DataCacheErrorCode.Timeout || ex.ErrorCode == DataCacheErrorCode.RetryLater || ex.ErrorCode == DataCacheErrorCode.ConnectionTerminated) &amp;&amp; tryCount &lt; MaxTryCount) { tryCount++; LogRetryException(ex, tryCount); } else { LogException(ex); done = true; } } } while (!done); return result; } </code></pre> <p>And that allows us to do the following:</p> <pre><code>private void AF_Put(string key, object value) { WithRetry(() =&gt; defaultCache.Put(key, value)); } </code></pre> <p>or:</p> <pre><code>private object AF_Get(string key) { return WithRetry(() =&gt; defaultCache.Get(key)); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload