Comments on: Clustering WordPress on Amazon EC2 micro instances http://www.aschroder.com/2011/06/clustering-wordpress-on-amazon-ec2-micro-instances/ Notes on Web Development Wed, 23 Dec 2020 09:25:05 +0000 hourly 1 https://wordpress.org/?v=4.8.15 By: Ashley http://www.aschroder.com/2011/06/clustering-wordpress-on-amazon-ec2-micro-instances/comment-page-1/#comment-9972 Thu, 04 Apr 2013 21:06:28 +0000 http://www.aschroder.com/?p=1513#comment-9972 Joe, you have restored my faith in enabling comments, thanks for your contribution.

https://twitter.com/aschroder/status/319918359200276481

]]>
By: Joe Cole http://www.aschroder.com/2011/06/clustering-wordpress-on-amazon-ec2-micro-instances/comment-page-1/#comment-9970 Thu, 04 Apr 2013 20:59:32 +0000 http://www.aschroder.com/?p=1513#comment-9970 Just a tip for anyone that doesn’t know much about MySQL. I followed the steps in this blog post but still couldn’t connect to MySQL from neither my master node nor my web front-end node. I kept getting a “Error establishing a database connection” error whenever I attempted to view my site in a browser. After MUCH banging my head on the proverbial wall, I figured out that the TurnKey WordPress AMI I started with when I created my EC2 instances was set to bind MySQL to the loopback address AND the privileges for user root in the User table were restricting host to localhost only.

To resolve the error, I modified /etc/mysql/my.cnf and changed

bind-address = 127.0.0.1
to
bind-address = ec2-[elastic ip here with dashes].compute-1.amazonaws.com

So that fixed the binding issue. To fix the permissions issue, I logged into MySQL as root on the console and added a new record to the User table in the mysql database as follows:

mysql -u root -p
[password]
GRANT ALL PRIVILEGES ON *.* TO ‘root’@’ip-%.ec2.internal’ IDENTIFIED BY ‘[password]’;

This allows the root user to access MySQL from any host that starts with “ip-” and ends with “.ec2.internal”. (FYI – I tested using telnet to see that the internal DNS name is what goes across the wire.

After those changes, I was able to connect to MySQL from both the master node and my web front-end nodes.

So if you’re using a 3rd-party AMI as your starting image and can’t connect to MySQL to save your life, check your /etc/mysql/my.cnf file and the mysql.User table!!

]]>
By: Larsen http://www.aschroder.com/2011/06/clustering-wordpress-on-amazon-ec2-micro-instances/comment-page-1/#comment-7393 Thu, 17 Jan 2013 11:15:18 +0000 http://www.aschroder.com/?p=1513#comment-7393 Hi Ashley,

thanks a lot for your blog post. I am just starting to learn about EC2 and still have some questions:

How is your storage organized? Do you use an EBS volume for your master instance and the slave instances use the data via NFS?

Do you have different AMIs for the master and the slaves?

Cheers
Lars

]]>
By: Ashley http://www.aschroder.com/2011/06/clustering-wordpress-on-amazon-ec2-micro-instances/comment-page-1/#comment-5239 Wed, 28 Nov 2012 19:15:21 +0000 http://www.aschroder.com/?p=1513#comment-5239 Thanks Larry! Yes, the autoscaling follow up to this post is I think important, since adding that, and going on-demand, not spot, I have had a much more reliable site.

]]>
By: Larry http://www.aschroder.com/2011/06/clustering-wordpress-on-amazon-ec2-micro-instances/comment-page-1/#comment-5235 Wed, 28 Nov 2012 12:58:34 +0000 http://www.aschroder.com/?p=1513#comment-5235 Ashley, I have to applaud you on being one of the very few to actually think things through and have a viable aws scaling wordpress tutorial. I’ve tried them all, with a real 1000 page blog, and almost all of them can’t run on a t1.micro – but your auto scaling solution does the trick.

]]>
By: John Wheal http://www.aschroder.com/2011/06/clustering-wordpress-on-amazon-ec2-micro-instances/comment-page-1/#comment-4860 Mon, 02 Jul 2012 20:32:44 +0000 http://www.aschroder.com/?p=1513#comment-4860 This is what I do for my site. The only difference is that I have a memcached server to handle PHP sessions.

]]>
By: Chief Editor http://www.aschroder.com/2011/06/clustering-wordpress-on-amazon-ec2-micro-instances/comment-page-1/#comment-4850 Sat, 23 Jun 2012 19:01:38 +0000 http://www.aschroder.com/?p=1513#comment-4850 Dear Ashley, excellent solution; I was looking exactly the same. However need step by step guidance for setting up master, slave instances and creating database and NFS server and client. Please give some leads. Thanks

]]>
By: Ashley http://www.aschroder.com/2011/06/clustering-wordpress-on-amazon-ec2-micro-instances/comment-page-1/#comment-3784 Tue, 20 Mar 2012 20:00:00 +0000 http://www.aschroder.com/?p=1513#comment-3784 You have the ports open, but only for EC2 instances within the specific security group of your front end nodes. The EC2 firewall makes this part easy.

]]>
By: Heiko http://www.aschroder.com/2011/06/clustering-wordpress-on-amazon-ec2-micro-instances/comment-page-1/#comment-3781 Tue, 20 Mar 2012 15:12:52 +0000 http://www.aschroder.com/?p=1513#comment-3781 Hi Ashley,

with the help of your post I managed to put my TYPO3 Website on ec2 instances. Thanks a lot.
One thing I came up with is that I had to open TCP-Ports in my security group for NFS. I’m wondering if I configured something wrong or did you also open TCP-Ports for NFS?

Regards
Heiko

]]>
By: Ashley http://www.aschroder.com/2011/06/clustering-wordpress-on-amazon-ec2-micro-instances/comment-page-1/#comment-3569 Wed, 14 Mar 2012 09:49:33 +0000 http://www.aschroder.com/?p=1513#comment-3569 Glad to hear it.

RDS is great, I just didn’t need a dedicated DB server for a small WordPress cluster.

The database is hardly doing any work. For difefrent applications, such as Magento it’d be ideal to use RDS, and the memcache server, so that the front end nodes can focus only on running the web app.

]]>