Questions on scaling of pods, and cache

We want to deploy an application that utilizes memory cache using docker and kubernetes with horizontal pod auto-scale, but we have no idea if the containerized application inside the pods would use the same cache since it won’t be guaranteed that the pods would be in the same node when scaled by the auto-scaler.

I’ve tried searching for information regarding cache memory on kubernetes clusters, and all I found is a statement in a Medium article that states

the CPU and RAM resources of all nodes are effectively pooled and managed by the cluster

and a sentence in a Mirantis blog

Containers in a Pod share the same IPC namespace, which means they can also communicate with each other using standard inter-process communications such as SystemV semaphores or POSIX shared memory.

But I can’t find anything regarding pods in different nodes having access to the same cache. And these are all on 3rd party sites and not in the official kubernetes site.

I’m expecting the cache to be shared between all pods in all nodes, but I just want confirmation regarding the matter.

Hey Ken,

I have a very similar use case and found this discussion. Wanted to ask you if you were able to implement this or not, If yes how?

Only containers in same pod will be able to use the same cache in memory.

Containers in different pods (on same or different nodes) won’t be able to share their memory.