Tuesday, February 7, 2012

Architecting WordPress on AWS Series : Part 1

WordPress (WP) is one of the most downloaded platforms (over 65 million times) and customers are not just using WP for their blogging needs but also as CMS.  WordPress is used by over 14.7% of Alexa Internet's "top 1 million" websites and as of August 2011 WordPress powers 22% of all new websites
For Last few years AWS has emerged as one of the popular Cloud providers for hosting the WP platform. In this 4-part Architecture Series we are going to see how to build a Highly Available and scalable WP infrastructure in AWS in phases. Let us get into first architecture of this series:

Architecture 1: Single Server setup in AWS

This is the simplest architecture to be setup in AWS. No big Architecture Consultations are required for this setup. AWS provides some standard AMI’s to kick start this architecture quickly. Users with minimum Technical knowledge can get this started up and running on their own in AWS. It uses a single Linux EC2 instance and the entire WordPress (Mgmt + content node), Apache and MySQL are configured on the same Amazon EC2 instance. The EC2 instance can be placed in Single Availability zone in a Single AWS region. If this information is not provided, it creates the instance in default at USA-East region of AWS. Customers who are configuring this architecture should at least start with 64-bit Large instance Type (m1.large) in AWS. Also the IO performance is better in Large instance compared to its smaller counterparts. Since MySQL performs better with more memory, large instance would be better choice to start with. EBS Backed AMI’s are better compared to S3 backed for launching such EC2 instances because at least the data is safe in the EBS in case the Instance terminates. Periodic EBS Snapshot backups and MySQL Dumps can be taken and moved to S3 (this requires some programming effort).  The EC2 instance can be enabled with Detailed CloudWatch monitoring in the AWS console. Cloudwatch monitoring can be combined with SNS for System alerts to Email. This architecture does not factor High Availability or Scalability needs. It is suitable for website serving few hundreds/thousands pages per day and not suitable for scenarios with heavy traffic serving millions of pages. Customers should be aware this architecture has single point of failure at all levels. In case of premature EC2 instance shutdown/crash, recovery might take from minutes to hours depending upon the complexity.
The running infra cost will be around 400 USD per month in AWS (24X7 and not including any licensed software) and may vary depending upon the Data transfer usage/EBS Storage.

Note: Since AWS is constantly reducing their prices, it is better to use their simple Calculator and find the latest price at the time of reading this article.

1 comment:

Nabi said...

Hello Harish,

First I must thank you for your time putting up a very useful article. I found this page after visiting "Architecting an Highly Available and Scalable WordPress Site in AWS " page.

I'm currently running a micro instance and I've installed a wordpress blog there. I'm using above explained simple structure.

I have few question.
1. My EC2 EBS volume keeps growing without me installing anything there. When I finished the setup of wordpress there, it was somewhere around 5GB and now it's somewhere around 7GB. I haven't posted any blog posts. Why is it keep increasing in size?

2. On average, is above simple setup suitable for if I receive 6000-15000 visitors per day.

Thank you once again for your excellent collection of articles on Amazon EC2 WordPress Setup.

Need Consulting help ?


Email *

Message *

All posts, comments, views expressed in this blog are my own and does not represent the positions or views of my past, present or future employers. The intention of this blog is to share my experience and views. Content is subject to change without any notice. While I would do my best to quote the original author or copyright owners wherever I reference them, if you find any of the content / images violating copyright, please let me know and I will act upon it immediately. Lastly, I encourage you to share the content of this blog in general with other online communities for non-commercial and educational purposes.