Migrate to the Cloud – Cloud Provider Selection

There are so many cloud providers existed in the market. I found the review of top 10 cloud providers here and tried review them one by one for my own setup. Please note that the review will be from a point of view from someone who already setting up a shared web server with knowledge in WordPress and MySQL database.

Here we go:

heroku Heroku

On that review, Heroku listed as #1 compared to other cloud providers and I could not agree more, except for geographical coverage, it only offers EU and US servers.  However it can be covered by using CDN that will be covered later in this series.

Here is the checklist as listed in my previous post:

  1. The server should run Apache + PHP as required by WordPress
    The answer is: Yes. But because I’m using a custom buildpack, it will run on Nginx + PHP stack instead.
  2. The system should support custom domain.
    The answer is: Yes
  3. There should be a MySQL database
    The answer is: Yes. One of it’s addons will automatically create a database with ClearDB cloud database provider. The custom WordPress buildpack will enable this by default.
  4. (Optional) Memcache server to act as reverse proxy for the web server, at the speed of RAM
    The answer is: Yes. Again, one of it’s addons will automatically create an account with Memcachier, one of Memcache cloud provider. The WordPress custom buildpack is also enable this by default.
  5. (Optional) Content Deliver Network, users will be served based on their geographical presents.
    The answer is: No. It does not offers CDN by itself, however it can be supported out of the box by other CDN available in the market.

Can all of the subsystem migrated? Yes and no. All of the system can be migrated with a note that Heroku storage is an ephemeral storage, means that the storage will be gone if the server restarted. While some of the WordPress function needed a permanent storage, such as file upload for media library, then we need to store this file to somewhere else. In this setup we will use Amazon’s S3 (Simple Storage Service), an REST based storage by AWS.

What about the cost? As long as you stay in the corridor of free tier, then it will be free. Amazon S3 will charge you a fair amount of disk usage, but if you use Amazon S3 for other use then the cost will be insignificant. There are some restriction on this ‘free’ plan:

  • You can only run 1 dyno (this is a Heroku term, it is a virtual container of 512MB or 1 GB of RAM) if you want the server to be up all times. Heroku account enables you to have 750 hours of free dyno usage per month. There is also some restriction too, if you run only 1 dyno and there is no activity served by that dyno then it will ‘sleep’, the subsequent request to the server will need to wait  for the dyno to be awaken.
  • ClearDB MySQL database free tier (ignite plan) will allow you to have 5MB of database size, above that it’s a pay per use service.
  • Memcachier memcache service free tier (dev) is 25MB of stored objects.

How easy is it? From a shared hosting perspective, the migration to Heroku is somewhat different. The terminology used is unconventional and some of them are exclusive to Heroku. At start the learning curve is steep, be ready.

How fast is it? Google Speed Test reports 91/100 for desktop view and 76/100 for mobile view. I’m using a responsive theme thus the mobile version is not actually a special theme for mobile device, it just ‘responsive’ to the view port of the browser so the performance is not that fast.

This site is currently running on this setup.

aws Amazon Elastic Beanstalk

We can say that Amazon Web Service is the mother of all cloud services out there. Many other cloud based services are using Amazon’s PaaS (Platform as a Service) or IaaS (Infrastructure as a Service) solution for the basic of their offering. Amazon Elastic Beanstalk is one of their offering that is basically a bundle of other basic products which are: EC2, Load Balancer, Storage (EBS & S3), and of course bandwidth.

Let’s go to the checklist again:

  1. The server should run Apache + PHP as required by WordPress
    The answer is: Yes. It uses EC2 (Elastic Compute Cloud), it is a virtual server in the cloud, so basically you can run anything on it.
  2. The system should support custom domain.
    The answer is: Yes. It act as our own server, we can use it freely
  3. There should be a MySQL database
    The answer is: Yes. We can install mysql inside EC2, or using Amazon’s RDS (with additional fee, unless you are still under free-tier plan).
  4. (Optional) Memcache server to act as reverse proxy for the web server, at the speed of RAM
    The answer is: Yes. Amazon ElasticCache is in memory cache solution from Amazon. It is part of free-tier policy so it will be free for the first year.
  5. (Optional) Content Deliver Network, users will be served based on their geographical presents.
    The answer is: Yes. It can use Amazon’s CDN service (CloudFront). In addition, it automatically configured Load Balancing option and auto-scalling capability provided that you choose “Load Balancing, Autoscaling Environment” as the environment option.

Can all of the subsystem migrated? Yes and No. As of Heroku, EC2 instance’s storage is an ephemeral storage, it doesn’t survive on server restart. However there are two options available, first is to use Amazon’s Elastic Block Storage as permanent storage or using Amazon’s S3 storage.

What about the cost? It is free, for one year, for new user only. When you sign-up with Amazon, they will give you a free-tier for some of their services. After that it’s quiet decent compared to shared hosting option. But, if the site you are planning to build will generate some hefty load some day, this option is the best since it will charge you on pay-per-use basis. Pricing example can be found here.

How easy is it? To answer this question it depends on how do you understand AWS’s terminology and services. If you are familiar with AWS then it is very easy compared to configuring individual services by hand (creating EC2 instance, creating Load Balance, etc.). But if you are new to AWS then you should learn AWS’s system and offerings.

How fast is it? With default application, it scores 92/100 for desktop view and 79/100 for mobile view. I plan to write a series of Amazon’s services after this series, and this service should be one of it.

openshiftRedhat’s OpenShift

RedHat is a strong player in Linux for Enterprise market, and this initiatives is their move to gain traction into Cloud offering. It has it’s own terminology and platform, it based on AWS’ infrastructure with RedHat’s tools.

Similar to Heroku, OpenShift leverage partners on their offerings including MongoDB, Sendgrid, ZendServer to name a few. I believe if their marketing and strategy matches market demands, there will be more partner to join in the band wagon.

Here is the checklist again:

  1. The server should run Apache + PHP as required by WordPress
    The answer is: Yes. OpenShift’s terminology of server is a ‘Gear’, this similar to what Heroku called a ‘Dyno’. Unlike Heroku, we can actually ssh into the box to get the shell, but it also support extensions called ‘Cartridge’. There are not much to choose from, maybe because it relatively new, but for WordPress it has PHP and MySQL cartridge so it’s enough. As a bonus there is also phpMyAdmin cartridge. For PHP there are two option: Apache+PHP and the other is more advanced ZendServer.
  2. The system should support custom domain.
    The answer is: Yes. We can configure the custom domain, more than one supported.
  3. There should be a MySQL database
    The answer is: Yes. As pointed out on point #1, there is a MySQL cartridge available to install.
  4. (Optional) Memcache server to act as reverse proxy for the web server, at the speed of RAM
    The answer is: No. It is not of the box, although integration to Memcachier is possible but requires additional setup.
  5. (Optional) Content Deliver Network, users will be served based on their geographical presents.
    The answer is: No. It does not offers CDN by itself, however it can be supported out of the box by other CDN available in the market.

Can all of the subsystem migrated? Yes, although the main part of the directory is in ephemeral storage (remember, it is an EC2 instance anyway) but RedHat generously give the user free 1 GB of EBS storage, it is a permanent storage so we don’t have to use S3 for additional storage.

What about the cost? It is free for the first 3 gears, we only need one so it is more than enough.

How easy is it? It surprisingly easy, the wizard is straight forward and the configuration is also easy.

How fast is it? With ZendServer as webserver and PHP stack, the Google page speed score is 91/100 for desktop view and 78/100 for mobile view.

Other Providers

The other providers either doesn’t have free tier (because when it is paid then the cost will be too much compared to current hosting), or they will not support custom domain for their free-tier offering, so it is out of discussion.

On the subsequent posting I will discuss detail the step-by-step installation based on WordPress 3.6.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>