About 4 months ago I tried Amazon EC2 with Ubuntu image and found it somehow difficult to configure the server, especially if you are not familiar with cli. Making an ssh remote connection required downloading few encryption keys from amazon. Linux server images from amazon seem to not have root password, therefore private and I think public keys are created for you to connect with ssh, which make it more secure. It took me about 2 hours to figure out how to use those keys. I worked with Linux boxes before, in fact I never hosted a site on Windows machine, and never will, but I didn’t have to use a ssh connection to configure my server.
After I created a password for root I installed Apache, PHP and MySQL. Then came the other problem. I couldn’t access my new Apache outside the server. Support site didn’t help me anything. I was stuck and I gave up. It cost me about $0.80 to see how a cloud server works.
Three days ago I thought I try RackSpace Cloud. It seemed impressive and a lot cheaper than EC2 from Amazon, only $0.015 per hour for a 256mb server. I planned to only use it as MySQL server and nothing else. After I installed MySQL it had about 136mb of free ram, more than enough. You don’t to use more than that on a shared hosting even if that machine has 20GB of ram, especially if you use GoDaddy. Some ip addresses for GoDaddy show around 60,000 sites hosted on one machine, take a look at this. 1and1 is not that bad, which I use for this and some other sites. The only complain I have about 1and1 is the 100MB limit on MySQL databases, which is what I wanted the cloud server to handle.
Setup of RackSpace Cloud was painless and in about 20 seconds after I created the instance I received my root password. A linux newbie like me was able to log in to my server without having to mess around with encryption keys (not that it was hard, after I knew what I was doing). Then I did apt-get install mysql-server and 1 minute later MySQL was up and running waiting to server DB’s. My experience with MySQL is strictly through phpMyAdmin, which means that I never really created a DB and user with command line. So, I didn’t give up, I used phpMyAdmin to create a new user with access to only one new database with the same name and only from my 1and1 hosting site. No, I didn’t install phpMyAdmin on my server, I just created the query on another server and then I copied the same query into the real server, not bad huh? I could’ve google it, but it was about four commands and I would’ve had to search each one individually. I remembered that phpMyAdmin spits out queries it runs, so I took advantage of it.
At this point I was ready to try it. I created a wordpress blog and fired it up. Not that fast though. My site couldn’t communicate with MySQL server. I made sure the username and password was correct, but still nothing. When I created the new MySQL user, I gave access from domain name of my blog only, so I thought that was the issue. I did reverse ip lookup and got the real ip address of my domain, changed it restarted the MySQL, but still nothing.
After about 5 minutes playing around with it I decided to reach for help. Conveniently online chat support was one click away. Unlike with Amazon EC2 where I went through their support pages and forums and still nothing. After about a minute a IT support guy was ready to answer my questions. So I tell what I want to do and how it’s not working. He tells me that all the ports are blocked and i would have to open port 3306 tcp. At that point I knew why I couldn’t access Amazon EC2 from outside world, port 80 may have been blocked. He directed me to a link where it had samples on how to configure iptables. I thanked him and I started learning linux firewall, well enough to open one port anyway.
After I open the port I still wasn’t able to connect to the server. The problem seemed to be, but I am not 100%, 1and1 uses some sort of proxy server to communicate outside their network. I found this really nice app called iftop that solved my problem. Connection was coming from some random hostname like r56.perfora.net. After I reconfigured MySQL user I was up and running. PHP pages were being served by 1and1 and MySQL by RackSpace. Speed was fast and no lag whatsoever.
I started publishing some posts, installing some plugins and themes. Three days lates the new database for the blog was about 1.5mb big. Here’s the kicker. For three days I used 1GB of bandwidth out on 1.5MB DB. I predicted to use about 4GB a month with average of 50 users a day. I understand there is a lot of back and forth communication between PHP and MySQL server, but I never thought MySQL bandwidth would be that much. Keep in mind that this is MySQL traffic, if the blog was running on the same machine, this bandwidth would be avoided. At this point I realized that running my blog this way it would cost me a lot more than, getting a 512MB server and use it as webserver and database server.
Bottom line is I am happy with technical support and with RackSpace Cloud in general and if I decide to go on the cloud again, I will pick them for reliability and of course price.