Open acn-sbuad opened 3 years ago
I hope we can avoid that, given that the SPA is loaded once (and can cache data in the browser), and that we introduce capability for cache in Platform ref. Altinn/altinn-studio#5621.
Caching makes things more complex and should only be introduced if we must.
@altinnadmin We are already using IMemoryCache, which is not distributed across pods. This can introduce subtle bugs due to cache incoherence. Also, the effect of this type of caching is questionable since afaik the LB doesn't pin sessions to any particular pod. Using IMemoryCache seems to me to be fundamentally incompatible with the architecture we're using, and should probably be removed alltogether if not replaced with some distributed cache like Redis.
@elsand Yup, but only in Platform and we're looking into using redis there, ref. Altinn/altinn-studio#5621.
The only place that IMemoryCache seems to be used directly in apps is for text resources (to avoid disk access), which is static across pods and does not change unless an app (pod) is redeployed.
Removing the platform label again. Platform have a separate issue for caching in platform.
Description
Currently, we do not have support for caching data across pods for an app. If autoscaling is introduces or replica count is inreaced we can have multiple instances of an app running in the cluster. how can we support caching across multiple instances of an app?
In scope
Lorem ipsum
Out of scope
Lorem ipsum
Constraints
Lorem ipsum
Analysis
Lorem ipsum
Conclusion
Tasks