Server Farm

Don’t be tempted by the 98 octane hi-revving twin-supercharged speedster; sometimes it’s a simple, reliable, well-understood and easy-to-repair diesel you need.

One of my favourite episodes from Top Gear is the “Big Trip To Africa”. Jeremy Clarkson and his two sidekicks have to buy a car each for £1,500 and then drive it across Botswana. James May (aka Captain Slow) picks an old Mercedes 230E. Jeremy and Richard Hammond laugh, thinking that driving an old German prestige car across Botswana’s deserts is a rather silly choice. Actually, James’ choice was a smart move. He picked the old German tank because the 230E is one of the most common cars in Africa, giving him access to lots of spare parts and skilled mechanics all along the trip, while Jeremy and Richard struggled to find parts and skilled people to fix their cars.

Building a web business is not exactly like driving across Botswana ☺. But when it comes to technology there is something to learn from Top Gear’s “Big Trip To Africa”. There are some important decisions to make when it comes to the technology choices for your web business. First let’s look at the software component and then the hardware part.

1. The Software: Fast and Simple

You will need to pick a software bundle to power your web business — the stack of layers that will go in-between your hardware and your users. A typical software bundle for web applications will include:

  • An Operating System: To control your hardware.
  • A Web Server: To coordinate all the elements.
  • A Database System: To store data.
  • A programming language: To interface with your users.

If you can, go open source. Open source technologies will give you a lot of advantages:

  • Code quality: Big open source project such as PHP of MySQL are constantly reviewed by a large community of skilled developers that are committed to localise, flag and fix all bugs and other code issues. The outcome is outstanding code quality.
  • State of the Art technology: as they are constantly evolving, popular Open Source technologies are always on top of the game when it comes to modern features.
  • Security: when code is Open Source, security bugs and issues are usually quickly identified and fixed.

A good example of Open Source package is LAMP (Linux, Apache, MySQL, Perl, PHP or Python). It’s a great pick as it will save you cost of licensing commercial software and it’s being widely used to drive many successful commercial web businesses. For example MySQL claims over 11 million customers and as of February 2009 Apache served over 49% of all websites. Other examples of popular web-services making extended use of LAMP are Digg, Facebook, Wikipedia, and WordPress. The popularity of the LAMP package means it is stable, is well documented in many resources around the web, and developers are easy to find when you need to hire people.

2. Hardware: sometimes having your head in the clouds is a good thing

Now that you have your software bundle you need some hardware to power it. There are two things you have to keep in mind when working on a web service:

  1. You want your application to cost you as little as possible, especially when you get started.
  2. You want your application to work properly regardless of the number of users.

Scalability

Your application needs to work efficiently regardless of the number of users. Having 10 or 100,000 users will make a huge difference on your hardware. The “cheap” (but at the end expensive) way of scaling an application is to add hardware (one server is not enough to handle the load? Let’s plug another one…). This can become very expensive and may lead to dramatic issues when you scale beyond typical startup size. At some point, adding servers is prohibitively expensive or just not possible anymore. And what happens during the low season? You find yourself with a lot of useless and expensive servers to operate and maintain.
The smarter way is to use computer ‘clouds’ — a very interesting approach that eliminates a lot of scaling issues. Instead of using a single server, you plug your application into a farm of servers and you pay monthly a bill based on the resources you used. Companies such as Amazon and recently Google are offering such service (and some other, smaller, players like Mosso and Joyent).

Cloud computing is great but there are also some basic engineering/coding habits that will help you to deliver at low cost. For example; optimise your code. You don’t want to have to rewrite part (or all) of your code because your idea is successful. So it is very important to write your code always thinking; “Is it the best way to do this? Is there anyway to do that with less code? Can I give the database a break?” The extra amount of work is definitely worth it.

Pay as you grow

What is true for hardware (computing power) is also true for storage and bandwidth. Most semi-pro/pro hosting companies will offer you bandwidth pricing in tiers (and same concept with storage capacity); 100gb/month, 2tb/month… Unfortunately it means that you always pay for something that you are not necessarily using and it also means that you will run into trouble if you exceed your credit limit (usually you pay for extremely expensive additional bandwidth or get throttled-back so some users have a disappointing experience).

To avoid that you want scalability (again). You want to pay for the bandwidth you are actually using and nothing more and you don’t want to be limited. Here again the solution is in the cloud. Amazon provides a great service with its S3 storage / bandwidth service. Putting your files on Amazon S3 will also resolve your storage issue, as Amazon S3 storage capacity is virtually unlimited. And you will pay only what you are using. Google recently started something similar. Probably some very good things are going to happen in the near future in this area.

To conclude

In the past two years, starting an online business has became easier than ever. Open source technologies have now reached a high level of maturity and cloud computing has emerged as a solution to scalability and has drastically reduced initial operational costs. This is good news for Internet entrepreneurs!

What has your experience been like with these new technologies? Are you fighting a prejudiced view internally? Has cloud computing helped your business yet? Please leave a comment about that and… have fun building awesome web-services! Cool