Wednesday, September 2, 2009

eCommerce on the Cloud

Doing some cloud hosting an eCommerce solution seams a very interesting solution to cope with traffic peaks like you might have during Christmas season.
Optaros has done some performance testing Magento (Open Source Ecommerce Solution) in the Amazon EC2.

The optimal cloud environment setup for our tests was:
  • 1 Load balancer – HAProxy on 1 small EC2 instance
  • 1 Database – MySQL on 1 small EC2 instance. We have MySQL replication running, but we did not seem to need it as the database was not the bottleneck.
  • 2 - 4 Magento servers – Medium version of High CPU On-Demand Instances which are 1.7 GB of memory, 5 EC2 Compute Units (2 virtual cores with 2.5 EC2 Compute Units each). Number of servers is the only variable in the test results.
The Test Results:

- Home page test
  • 2 Medium version of High CPU Machines in pool for Magento 125 Threads, 25 loops – 5157ms mean response time serving 23.7 req/s
  • 4 Medium version of High CPU Machines in pool 500 Threads, 25 loops – 8672ms mean response time serving 47.5 req/s
- Add To Cart test
  • 1 Medium version of High CPU Machine in pool 60 Threads, 2 loops – 5069ms mean response time serving 6 req/s
  • 2 Medium version of High CPU Machines in pool 80 Threads, 10 loops – 2206ms mean response time serving 14.1 req/s
Some General Findings:
  • Both homepage and add to cart scenarios scale roughly linearly.
  • The Add To Cart performed 40% slower than the highly cached homepage test scenario.
  • Serving Magento PHP files is primarily a CPU bound task, thus a high CPU machine is more effective than a standard large instance. (4 High CPU machines outperform 4 standard large machines at half the cost)
  • Upgrading the hardware for the MySQL, memcache, and load balancer machines did not help performance numbers at this level of load.
  • A single XL machine was able to serve 37.1 req per second when Jmeter was also placed on a XL instance -- there definitely seems to be solid IO advantages to using an instance rated “high IO”.
  • The actual usable level of CPU and memory on a small instance is very limited and should probably never be used for production.
  • Magento could probably be optimized further to gain additional performance including using a memory filesystem, further gzip/deflate, css/js minimization, etc.
Yes it seems that Magento can scale on Amazon EC2. Of course some additional questions have to be addresses as PCI compliance and data confidentiality.

If you are interested by this subject you should contact kflieger@optaros.com (Switzerland eCommerce expert and Magento Partner)

2 comments:

  1. Hi

    I think may be useful This optimal cloud environment setup for who will start small magento ecommerce bussines.

    sukumar
    Magento Ecommerce.

    ReplyDelete
  2. Hi all,

    We are a Swiss Magento Hosting professional Partner ... we built a highly optimized solution with ultra fast loading times, have a look at our benchmarks :

    http://www.virtua-network.com/blogonews/performances-magento

    and a comparison with a "low-cost" hosting solution :

    http://www.virtua-network.com/blogonews/hebergements-magento-importance-hebergement-specialise

    Don't hesitate to contact us, we have solutions for every need !

    ReplyDelete