A Comparison of Website Hosting Solutions

   Submit to Reddit      
  

When I recently started building ChannelAdam and this Software Development Zone, I considered many different types of website technologies including various blog engines, content management systems and programming languages.

However, I couldn't decide which technology I should use until I had a better idea of how I would host the sites. As a polyglot programmer, the language and technology was the least of my concerns. I had 4 overarching principles that would guide the hosting and development of this site.

My Principles / Technology Selection Criteria

The principles I wanted to follow, and thus the selection criteria for hosting were:

  1. Low cost. Since this is a hobby, I want to keep the cost of hosting this operation very low or even better, free.
  2. Branding. I must have a custom domain.
  3. Trustworthiness and security. I must have SSL. I consider it to be my duty to you, in good conscience. When you visit my website, I want you to be assured that the content you see was not tampered with between my server and your browser (i.e. no Man-in-the-Middle attacks - especially with so many public, unsecured Wi-Fi access points these days. For this reason, I agree with the SSL/HTTPS Everywhere movement, and I think that all websites should be HTTPS, even if they don't specifically have any sensitive content. Let's keep the web safer!
  4. Search Engine Optimisation. I must have SEO and page redirection capability for changing the structure of the site in the future.
  5. Stability, scalability and availability. The host must be stable and have high availability.

Tell Me the Results Already!

After researching the various hosts and platform providers, I was a little disappointed. Hosting a website, with a custom domain and SSL is not commonly done cheaply.

Having said that, RedHat OpenShift won outright - they are the ONLY host offering free hosting, with a custom domain and SSL, and scaling up to 3 'gears' for free. In order to get the SSL however, you apparently need to register and upgrade to the zero dollar Bronze plan and enter your credit card details. The only problem is that they do not yet accept billing addresses for people in Australia - so sadly I cannot yet use OpenShift.

The next best host I found, after some positive word of mouth, was Digital Ocean. $5 a month for a Linux box under my complete control, with a custom domain and SSL.

At the moment, Digital Ocean has my business...

The Long Version of the Results

The Plan to Reduce Costs

I quickly determined that the easiest way to reduce costs is to have a static website only. This reduces cost because the size of the server can remain small and still perform under high load.

In addition, it is possible to use Content Delivery Networks (CDNs) to serve your static files. The problem with CDNs however, is that the free ones I found do not support SSL.

After researching the current state of Static Site Generators (SSGs), I was sufficiently convinced that I could develop the majority of Channel Adam as a static website with the help of a SSG.

The cost of SSL certificates was mitigated with StartSSL - where anyone can get a free SSL certificate (for their non-commercial website).

The Comparison

Below are some of the hosts that I researched. Not every cell in the table is filled out, either because the host does not offer the service or I quickly lost interest in them due to other criteria not being met...

Host Free Tier Expansion Technologies Custom Domain Support SSL Support Redirects
Heroku 1x Dyno (512 mb RAM, 1x CPU Share)

Dev/Hobby Postgres Database with up to 10k rows (and up to 4 hours downtime per month)

Standard support 1+ Day response times
2x Dynos (512 mb RAM, 1x CPU Share)

$0.05c/dyno-hour ($34.50/month)

Basic 10M rows $9/month

Premium Support 24/7, 1-hour response SLA, $1000/month
Node.js, Java, Ruby, Python

See Heroko Addons
Free

See Custom Domains
$20/month for a SSL Endpoint

Available in US and Europe regions

See: SSL Endpoint
SSL
dotCloud None Static site, 1 instance, 32mb RAM

$0.06/hour ($4.32/month)

Postgres $8.64/month
PHP, Node.js, Python, Ruby, Perl, ... Yes, unlimited SSL Load Balancer $21.60/month

See: SSL
AppFog None Basic $20/month

Unlimited apps within 2GB RAM. Up to 8 service instances.

200mb storage per MySQL or Postgres instance

10GB total data transfer

40 requests per second per app instance
Java, Node.js, Ruby, Python, PHP Unlimited 2 dedicated SSL endpoints (on AWS) for the Developer $50/month plan or better.
Amazon S3 1 year only Free Usage Tier.

5 GB of Amazon S3 standard storage, 20000 Get Requests, 2000 Put Requests, and 15GB of data transfer out each month.
First 1 TB / month $0.0330/GB, plus data transfer fees. Files

See:
Website Hosting

Gotcha using virtual host

How to server S3 over https with CloudFront
Yes - Amazon S3 with Amazon Route 53 DNS

Custom domain walkthrough

Custom SSL domain names
Yes - with Amazon CloudFront

Custom SSL

SNI Custom SSL - no upfront or monthly fees for certificate management; simply pay normal Amazon CloudFront rates for data transfer and HTTPS requests.
e.g. $0.0125 per 10K HTTPS requests plus data transfer of $0.190 for the first 10TB per month.

Dedicated-IP - $600 for each custom SSL certificate you associate with your CloudFront distributions, pro-rated by the hour.

How to serve S3 over https with CloudFront
Gondor None Shared Hosting. A slot is 1 Python WSGI process or 2.5 GB PostgreSQL database or 64 MB Redis cache or 1 Celery process
$10/month
Python Yes Yes. Dedicated-IP SSL
OpenShift 1-3 Gears

Custom domain

Shared SSL certificate for rhcloud.com

SNI SSL for custom domain

512mb RAM

1GB storage per gear

As an example, this is suitable for a Drupal-based app with:
15 pages/second
Hundreds of articles
~50k visitors per month
Small gears

$0.02/hour

Medium gear

$0.05/hour

(recommended for Java)
PHP, Perl, Python, Ruby, Node.js, Java Yes for $0/month Yes for $0/month Yes, depending on the technology used.
Google App Engine 28 instance hours
5GB cloud storage
1GB/app per day incoming data
1GB/app per day outgoing data
See: Quotas
Static resources are placed in the cache and are therefore not part of instance hours
$0.05 / instance / hour
Cloud storage $0.026 / GB / month
Incoming data free
Outgoing data $0.12 / GB
See: App Engine
Python, Java, PHP, Go

See:
Static files in Python

Host on Google Server

Implementing a static website in Google App Engine

Git push to deploy
Yes.

Domain
SNI SSL certificate slots are offered for no additional charge for accounts that have billing activated.

See:
Pricing
SSL

Virtual IP - $39/month
NOT FOR STATIC CONTENT
Google Compute Engine 1 core, 3.75 GB RAM, $0.07/hour Node.js
Microsoft Azure Websites Up to 10 free websites, 1GB storage, *.azurewebsites.net subdomain and SSL Shared preview price: $0.013/hour (~$10/month)

Basic Plan: Small instance, 1 CPU core, 1.75MB RAM, $0.075/hour, (~$56/month)

Standard Plan: Small instance, $0.10/hour, (~75/month)
.NET, PHP, Node.js, Python, Java Not on Free plan. On Shared plan and above. Not on Free or Shared plans.

On Basic plan: SNI SSL $9/month, IP SSL $39/month

On Standard plan: 5 SNI SSL and 1 IP SSL included.
Microsoft Azure CDN

Storage block blob with a CDN endpoint and custom domain
Locally redundant storage: $0.069 per GB for the first TB
Geo Redundant, Read Only Geo Redundant

$0.005 per 100,000 transactions across all Storage types

See: Pricing
See:
How to use CDN

How to enable CDN

How to map CDN content to a custom domain

Configure custom domain name in Azure Storage
Yes Yes, but NOT on custom domain.

See: SSL cert for custom domain endpoint on CDN
GitHub Pages 1GB per repository, 100mb per file Html, Markdown, Jekyll

See: Using Jekyll
Yes

See: My custom domain isn't working
No
BitBucket

Static website hosting
Digital Ocean None 512mb RAM, 1 Core processor, 20GB SSD Disk, 1TB Transfer, $0.015/hour ($5 / month)
Websites hosted on Google Drive
Modulus.io $0.02/hour, 296MB RAM + 512MB Swap

Conclusion

It is possible to run a website cheaply, with a custom domain and a free SSL certificate - you just have to do the research in order to find the best deal.

For me, RedHat OpenShift and Digital Ocean are leaders in their field.

Coming Soon!

   Submit to Reddit      
  

ChannelAdam and this Software Development Zone have just been reconstructed. As is typically the case, there is still more work required that is related to the reconstruction...

Once all that has been completed though, I will be writing quite a few articles I already have queued up - so watch this space!

"Quick Find" Feature in the Productivity Power Tool Extension in Visual Studio 2010

   Submit to Reddit      
  

If you are like me, then you have installed a number of productivity related extensions for Visual Studio 2010, and sometimes it is difficult to know which extensions have each feature.

One feature that is in the Productivity Power Tools is Quick Find feature that replaces the default Find and Replace windows with the following.

I don't know about you, but I have a very healthy dislike for this feature - I am constantly clicking the dropdown box to select the Advanced Options to show the normal Visual Studio Find and Replace windows.

You can turn off this feature by going into Tools ➞ Options ➞ Productivity Power Tools in Visual Studio and turning off "Quick Find".

Note that after changing this option you will also have to restart Visual Studio for the change to take effect.

Intellisense in Razor for Custom Types and Helpers

   Submit to Reddit      
  

If you have custom types and custom ASP.NET MVC Helpers, and if you set your Visual Studio Web Project's Build Output Path folder to something other than the default bin\ location, then you will be in for a little surprise - you will not see your custom types in the Razor Intellisense!

It appears that Razor's Intellisense uses the assembly binding probing path of your Web Project's root folder and the "bin" sub-folder.

If your Build Output Path is a sub-folder of your Web Project application base folder / root folder (although I don't understand why you would bother) you could make a change to the web.config file and add a probing privatePath configuration such as:

<configuration>
    <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
            <probing privatePath="myBin" />
        </assemblyBinding>
    </runtime>
<configuration>

However, in the more likely scenario that you have a common central location for all of your assemblies that is outside of your Web Project application base folder / root folder, then unfortunately by design (for security and side-by-side execution) there is no configuration setting in .NET that is going to help. You cannot load assemblies from outside of your application base folder (via configuration in .NET) - unless they are strong named and in the GAC.

In my scenario, the Build Output Path is outside of the Web Project's root folder, so configuration is not an option, and my assemblies are not strong named, so the GAC is not an option.

One solution is to create a Visual Studio 2010 Extension or post-build script that copies all the assemblies from my custom Build Output Path into the local bin sub-folder. That would work, although it would also slow down my build times and frankly isn't elegant.

A better solution is to take advantage of the fact that in my scenario the bin sub-folder does not actually exist in my Web Projects. I can make it exist in Windows 7 by creating a symbolic link named bin which points to my Build Output Path - and then magically Razor Intellisense works!

Note that when you create a symbolic link you need to have Administrator privileges.

The syntax to create the symbolic link is:

mklink /d x:\MyWebProject\bin y:\MyCommonAssembly\Bin