i m using kubernetes cluster for web app. But i m running into problem when pods start scale. More pods -> slower app (every click is longer). From my point of view, there is problem with caches. I m trying solve it, by volume or persistent volume, which all pods share together. But it has still same output, it seems like every pod want to create new cache.
Is there any solution other to redesign code ?
For cache issues have you considered :
Ingress controllers like nginx to cache static content and deliver from it straight? https://medium.com/@vdboor/using-nginx-ingress-as-a-static-cache-91bc27be04a1
CDN may be if the cache is not private or dynamic in nature ?
With increasing pods, increasing times to me doesn't sound like its a cache issue or not the cache alone. The webserver is playing a big part or the load balancer an/or the firewall sitting in the front is capping the bandwidth. Round trip from browser to pod back to browser should be same if you have 1 or 100 pods provided there is no network latency. In your case an increase traffic is slowing the connection speed. I have had similar issues with the network capping bandwidth in front of the pods.