cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2 in Multi-Node and AWS EFS: Deployment of static content

Re: Magento 2 in Multi-Node and AWS EFS: Deployment of static content

We're running Magento 2 on AWS behind an Application Load Balancer and in Auto Scaling Groups. Backend is cached by Redis. We're sharing pub/media and pub/static on AWS EFS and they are cached and delivered via AWS CloudFront. After updates, instances are deployed and an AMI is generated which serves as template for Auto Scaling.

This ensures all instances have all the data and caches are warmed up. In general, everything runs smooth and fast, because only few of all the requests reach to the nodes itself.

One big problem is when deploying new static content. Due to the nature of EFS, this is slow as hell and means a lot of downtime. Luckily, we only have 1-2 deployments per month, but this bothers me a lot.

What are better strategies (best practives?) to generate the static content and share it between instances?

Or would it be sufficient if I use the normal file system for pub/static, generate the AMI-image and spin up these instances in Auto Scaling? pub/static shouldn't change without deployment of site please click here

Re: Magento 2 in Multi-Node and AWS EFS: Deployment of static content

nstead of replicating to the nodes, why not configure static content to run through CloudFront to a single origin server (the primary that you deploy on).   The scaled nodes could effectively have no /pub/static /pub/media at all because all that traffic is being directed to the CloudFront distribution. lotteryresulttoday.in

Re: Magento 2 in Multi-Node and AWS EFS: Deployment of static content

I actually like what you have bought here, really like what you’re saying and the best way during which you are saying it. You’re making it enjoyable and you still care to stay it smart. Lottery Sambad 

Lakhan

Thanks for viewing up such wonderful information. I like this post, keep writing and give a useful post. 4 Days Golden Triangle Tour