My Infra setup :-
- 2 Webservers - Behind LoadBalancer
- From Magento admin - changed the base URL for media, skin and js.
- ONLY webserver 1 hosts the media images and not webserver2
- Admin URL is redirected to a admin subdomain which is pointed to webserver 1 and hence every new image upload always happens on the webserver1
- CloudFront origin is set to webserver1, so that it always finds the image.
- Both webservers are connected to DB (nothing fancy, just good to mention)
As long as I keep only 1 webserver behind the loadbalancer everything works perfect but when I add webserver2 behind the load-balancer the catalog images on front end starts appearing as default image placeholders. This happens only when the request goes to webserver2 which does not holds the catalog images locally.
This makes me think that there is some check within Magento's default functionality which replaces the actual img src with the placeholder if images are not present locally. I am looking for that function so that I can modify that as per my requirement.
Does anyone had similar experience ? Any workarounds here so that images appear on webserver2 as well ? May be I am missing something in the cloudFront setup.
Any help is appreciated!!