Sunday 18 November 2012

Host Your Website On Google's servers for FREE

phil collins | 11/18/2012 |

Can your shared hosting account accommodate 5 million page views per month? If I told you that the average shared hosting account could easily accommodate that many page views you might laugh at me and accuse me of being naive. But the fact is that 5,000,000 page views would amount to just under two page views per second. That’s tiny for modern servers.

Don’t forget about concurrency

So why does shared hosting so often fail? It has to do with the other part of the hosting equation: concurrency. If you’ve never heard of concurrency, the simple way to understand it is in relation to the number of people who want to view a page at the exact same moment.
When concurrency is high (many people access the same resource at the same moment), then you can run into trouble. In fact, the same server that could deliver 5,000,000 page views per month might crash if only 500 people ask for a page at the same exact moment.
The way to achieve high concurrency is to have many servers and distribute the work among them. To extend the example above, imagine that each of your servers can serve 16 pages per second. If you want to accommodate the burst of 500 people all at once, you will need 500/16 = 31.25 servers. That many servers can cost a fortune.

5 minutes of fame

One drawback to acquiring 31 servers is that you don’t always need to accommodate spikes in traffic. In fact, most of the time
your site is likely to have a normal flow of visitors and a single server could probably handle it. For all but a small fraction of time those servers are sitting around with nothing to do.
As it turns out, those short moments in time when you do have a spike (your 5 minutes of fame) are often the most critical for your business. They’re the times when you need your site to be the most responsive.
Wouldn’t it be great then if you could share those servers with others to reduce costs? That’s exactly what Google has done with Google App Engine. This service from Google allows you to share their ultra scalable infrastructure to accommodate big spikes in traffic.
The free quotas can accommodate roughly 5 million page views per month for a “reasonably efficient application”. It’s also much different than traditional shared hosting in that as resource needs increase, so does the pool of available machines, and so the responsiveness of your application stays constant.

Zero up front cost (possibly no cost)

There is zero up front cost to develop and deploy applications on app engine. They have a quota system that resets every month. If you don’t use up the quota then you never pay anything. If you go over the quota, then you’re charged for what you use (which might be pennies per day).
Strictly speaking nothing worthwhile comes with no cost. You need to put in the time to develop it and then to promote it. In order to help you visualize some of the details, I created a basic App Engine app and a short video to accompany this article. See the app at Freesourcing Directory. Here’s the video:



Limitations

There are some limitations to the infrastructure. The last time I checked, they supported only their proprietary database (datastore) and didn’t have support for traditional RDBMs. This didn’t turn out to bother me too much since their ORM (object relational mapping) solution was adequate and kept my code clean. It’s also likely to scale well within their environment.
They also don’t support PHP, which is a popular web scripting language. They do support Python and Java. I know that will turn off some folks that really like PHP, but as a developer that has used all three technologies, I can say that for large scale applications, PHP usually isn’t the right choice. Both Python and Java provide more structure and maturity for large scale applications.
The lack of PHP support means that some mainstream applications, like WordPress, won’t run in this environment natively. Google App Engine isn’t a viable replacement for traditional hosting.

Good fit

App Engine could be an excellent way to host a custom application or a special add-on feature for your existing website (like a social comment tool). SaaS (Software as a Service) applications would also be a good target. There are development platforms, like Django, that can make the development process go very smooth.
Since it’s free, there’s virtually no barrier to getting started. They have a download that provides you with a complete development environment and easy deployment tools. I was able to build and deploy my first app in about 30 minutes.
This article was contributed by Daniel Watrous. He writes about Internet technologies and how to leverage them in direct response sales on his blog at http://www.danielwatrous.com/

No comments:

Post a Comment