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?
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.
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?
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.
:) this explains.