cancel
Showing results for 
Search instead for 
Did you mean: 

CSS merge on a multi-host Magento with CDN

CSS merge on a multi-host Magento with CDN

Hello,

 

We have a magento deployment running on multiples instances on AWS. We use the merge CSS feature. The statics CSS are pulled from a CDN (cloudfront). Since it generates a unique css file with a timestamp in the name, the filename isn't the same on all instances, which is resulting in some issues. When requesting the merged css file, since we are making the request through an other domain name, the stickiness cookie is not forwarded to the CDN, and in turn is not forwarded to the load balancer, which will choose a random instance, and the file will 404.

 

How can I handle this situation?

 

Thanks for your help!

1 REPLY 1

Re: CSS merge on a multi-host Magento with CDN

you must have only one place to store your media/static files. one drive connected to every instance you have, synced to one bucket you pull from.

no matter how many instances you have, only php processing must be unique on them, you call the same media file for all.

 

 

------------
MagenX - Magento and Server optimization