Planning Your Cloud Stack for Magento

by Vitaly SedelnikOctober 13, 2010

After reviewing some of the major cloud products and services, let’s get back to defining the most appropriate cloud solution for GreenEgg. Several applications were reviewed as candidates to run GreenEgg’s Web site, and custom development was considered, as well. Finally, the top two selected alternatives were Magento and Apache Open for Business. In this blog post, I’ll focus on the cloud stack suitable for Magento or, generally speaking, about deploying a PHP/MySQL application in the cloud.

Magento is an open source e-commerce Web application based on the components of Zend Framework. Magento uses Apache as a Web server and MySQL as a database engine. So, to build a complete solution stack, we need to define a cloud infrastructure provider, a management solution (optionally), and a cloud database engine.

Infrastructure options:

  • Private infrastructure needs to be considered because of the security and privacy requirements. The major drawback of the private infrastructure is that it takes a lot of administration and maintenance effort. That’s why it is hardly as cost-effective as the solutions offered by specialized providers. In addition, it could make sense to implement a hybrid cloud model, hosting all sensitive data in-house.
  • One of the highly developed cloud infrastructure providers is EC2—it has ready-to-use server images for PHP/MySQL applications and great extension capabilities. Also, most of cloud services and tools on the market do support EC2 (in many cases, they were developed for EC2—take RightScale, for instance). All this can greatly reduce the required administration effort. So, as a cloud provider, EC2 seems to be the best option for GreenEgg.

Management options:

  • Manual administration is needed in any case, especially at the beginning of the cloud implementation process. But later, it’s more effective to utilize a specialized management solution.
  • Eucalyptus can be useful in case of running a hybrid cloud, since it implements the EC2 interface and can integrate private infrastructure into a public EC2-based cloud.
  • RightScale is the best candidate for managing an EC2 cloud. It can be brilliantly integrated with EC2 and has everything to run an EC2 cloud, including monitoring, alerting, automated scaling, etc. However, because of its price, manual administration could be also considered at the initial stages of cloud deployment.

Database options:

  • Running a regular MySQL engine can be an option at the beginning of implementing the cloud solution, because no additional configuration or management is needed. However, as the traffic and Web site popularity grow, scalable solutions may be required.
  • ScaleDB implements centralized architecture that allows for dynamic scalability, but it can bring a single point of failure into the system. ScaleDB might be a good solution if the site traffic is not stable and has unpredictable peaks. However, in case of high and geographically distributed traffic, ScaleDB might experience low performance.
  • MySQL Cluster seems to be the best database engine for Magento because of its distributed and scalable architecture. It can easily replace a regular MySQL database and handle high traffic and regional expansion by adding a new data node in an appropriate region of the EC2 cloud.

Now, let’s sum everything up. The proposed cloud solution stack for GreenEgg in case of implementing Magento is as follows:

  1. EC2
  2. Manual management or RightScale
  3. MySQL Cluster
  4. Apache

For other possible stacks, please see the picture below.

In my next post, I’ll describe the cloud solution for implementing another application, Open for Business.

To stay tuned with the latest updates, subscribe to our blog or follow @altoros.