Disabling ARRAffinity effect cache distribution using ISynchronizedObjectInstanceCache


Our site is in Azure Clouds on multiple instances, we disabled ARRAffinity option from our settings (due to XYZ reason), As a result, we observed that caching isn't distributing correctly on all instances. Service bus has been set up correctly, code is using ISynchronizedObjectInstanceCache. Is this correct assumption that cache distribution will not work if ARRAffinity is disabled?

Jan 03, 2020 17:29

Cache should work properly regardless of ARRAffinity setting (in rare cases when you have a lot of instances AND a lot of cache invalidations, things might be complicated, but we are working on that). Note that the ISynchronizedObjectInstanceCache only guarantees the cache invalidation, not the cache present.

Jan 04, 2020 9:31

This is what I also think, to understand more do you know, How cache is distributed among instances?

In absence of arr, we can't restrict browser to one instance, so hard to confirm even a page publish is also working properly or not. Or how can I test that cached data is available on all instances?

Edited, Jan 04, 2020 10:47

Cache is not distributed. When you load something on instance A, it is cached on A but not B, so when you load the same thing on instance B the first time it will hit database.

Only the cache invalidation is distributed, i.e. If you remove something from cache on A then it is guaranteed to be removed on B as well.

Jan 05, 2020 2:11

:) this explains.

Jan 05, 2020 7:37
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.