6

We are looking at Craft as our CMS but would love to be able to scale the installation across multiple Amazon EC2 instances.

Is this possible?

Can all assets uploaded to Craft be pushed to S3?

Is there any other data (eg sessions) that are stored on local storage that would likely cause a problem?

5

Entirely possible. There is some discussion of having Craft installed in a load-balanced environment here.

You'll want to have CRAFT_STORAGE_PATH point to a shared file system for all servers.

If you have sticky sessions enabled at a load-balancer level, then PHP sessions won't be a problem. If not, then you'll want to set overridePhpSessionLocation to true and have the PHP session files saved on the same shared file system.

1

Along with Brad's helpful answer, I can certainly verify that the "Pro" level of Craft does support S3 perfectly. If you implement that for all your assets, and then track any other site/template code and graphics in something like Git, you can easily roll out an auto-scaling group in EC2 that could expand dynamically with traffic, behind an ELB.

Just be sure that when a new instance is spun up you use something like the user-data field to initiate a bootstrapping script to git pull and sync up the new instance with any changes to the current repository.

  • The only shortcoming i've seen yet of a scaling fleet of EC2 instances is that user profile pictures (Craft users) are stored on the localhost and cannot replicate out across instances. I've seen in another thread that this issue is likely going to be addressed in 3.0+. – Neal Magee Dec 29 '15 at 15:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.