I have a load balancer setup with two backend services. URL mapping on LB looks like:
site.com -> backend-blue
test.site.com -> backend-green
Both backend services have CDN enabled. I could see cache hit ratio around 96% on the backend-blue service. Then I switched backend services on LB:
site.com -> backend-green
test.site.com -> backend.blue
Cache hit on backend-green became 60% and I started getting 502 errors.
Cache keys remained the same, so I expected to see the same cache hit ratio around 95%.
Why cache entries have been evicted and requests went through LB instead of being served by CDN?