Magento Autoscaling

4

Magento Autoscaling

It’s has been over a half year since we started working on a completely scalable magento stores and we have made appreciable progress. But what is scalable? We have been constantly adding more application servers as most times we needed this. The procedure looks quite a simple task but the implementation is more complex.

How do we do it?

For us to do this, we have to trigger new nodes creation with CloudFormation based on the CPU load. This is not an easy task and we have to conduct several experiments to determine the appropriate thresholds that will give us success. See the demonstration here: http://prezi.com/zy5hsz6ghuh5/magento-autoscaling-using-amazon-web-services/

The main brick that makes autoscalling more real is the use of Chef (http://www.opscode.com/chef/) an automatic configuration that helps to configure cloned servers within the fewest minutes possible.

How Chef Helps in Configuration

We use Chef for configuring the following:

  • Apache webserver
  • php with modules
  • OS-level parameters
  • Shared file system for media files
  • Synchronization of source-code from deliver-point to frontend nodes

Once we have configured the frontend and it’s up running, we have to monitor it closely and try to identify unusual events- as this is just the beginning. If more complications arise, we alert our support engineers to help solve everything.

Over the time we met problems with single-point of failures in autoscaling infrastructure: database, load-balancer, media-storage, cache-storage, etc. While it is not easy to leverage all the SPOFs, still it is possible to back it up, prepare disaster-plan, train staff etc. and we continue to experience success in all our endeavors. It’s that easy and it can work for you too.