VPS, CDN and advanced server techniques: Part 1

2009 July 31 | 4 Comments
Posted in: How-To, PC
by Ray

VPS stands for Virtual Private Server, a type of hosting technology that gives you advanced features and server privilege as against a shared hosting. Its use in this article however refers generally to any type of hosting that allows you root access to your server – dedicated servers, VPS itself and Cloud servers as examples. I’d like to explain each in here but that is beyond the scope of this piece. Maybe some other time ;)

If you are proposing a startup or a big site – big in the term of eventual traffic and functionalities, then shared hosting is not the option for you. Really, I’m talking from experience. Go VPS. There are a lot of reasons for this but here are 3 core ones:

  1. With VPS, you have the ability to configure your server (app and OS) to your taste, removing and adding stuffs the way you want – and this is a very important thing.
  2. On shared hosting, there is a limit to how ‘big’ you can grow. Let me give you a live example here. We started ngBot on a shared hosting and everything was going fine till we added ngBot mobile. The whole idea was a play thing – just a place to share mobile items we get here and there and then meet other mobile geeks, but then it started getting more than that. In a while, we grew close to over 4000 members and was clocking around 30k monthly page views. And that was when the axe came from our shared hosting company. They disabled some of our scripts and advised us to go VPS or dedicated. The blow came so sudden and we had to take off the site for around a month till we found and nested on a suitable VPS host (cloud server actually). Needless to say, the one month the site was out cost us a lot of hits, members and Search Engine ranking.
  3. On VPs you do not share resources with anyone like on shared hosting. Shared hostings are like face-to-face apartments where you share a lot of things together and you easily get disturbed by one another. If your neighbour on a shared hosting is a spammer for example, this may affect how mails from your site are delivered as well.

One thing to note about VPS however is that they are costlier than shared hosting. Another is that they require a little advanced skill to setup especially if you go the vanilla blank server way and you are doing the OS, server and tools setup yourself. This is a really big one and I advice you go for the preinstalled/configured option if you are not up to it. The already setup ones comes with an admin app (CPanel mostly) and looks pretty much like your shared platform. With the blank ones, all you have is your ugly shell console to do everything you want. And if this is your way, you will find putty very useful.

Needless to say, a good knowledge of your VPS OS is a very important virtue. As a server admin, you should be very familiar with the OS directory structures, installing/removing packages and dependencies (good knowledge of building and compiling important here as well as build tools like make and gcc), editing config files with editors like vi and nano (as you know, this is very common to Linux) among others.

Another very important thing you should know about is DNS setup (A, MX and CNAME especially) and how to configure your A records with your server especially if you want to setup multiple domains on the server. A good into article on DNS is available here: http://carsonified.com/blog/web-apps/get-started-with-dns/

Now, space and bandwidth is one luxury you don’t have on VPS. It is easy to find shared hosts promising you unlimited space/bandwidth but if you hear that on VPS, run away! The little one we run on at the moment offers just 20GB space as against our former shared hosting space of 1500GB! As a workaround to space and bandwidth issues on VPS, enter CDN (Content Delivery Network)!

CDN serve as storage backbone. Picture the scenario: storing our mobile stuffs (videos, apps, games, pictures) in our little 20GB space will leave us with little space for more upcoming ones. What if we have it stored in a different place – on a different server designed exclusively for data storage and transfer and not for core server functionalities like script compiling/serving etc? And that is what CDN is all about. CDNs are designed as storage servers for static data. But they don’t just store. The way they are designed is such that they distribute stored content between different other servers around the world and serve content from the server closest to the request source, making content serving fast. Not only that, CDNs also enable content caching.

You come across CDN in use every minute you surf the web – Facebook (for storing/serving images/videos), twitter (for storing profile images), ngBot mobile (serving mobile download files) ;) and a lot more. Another good thing about CDN is that you don’t have a specific size you are limited to. You can consume as much as you want to as you pay per GB of space you use. Much more, it is cheap – very cheap. On the one we run on (Rackspace cloud files), 1GB costs around $0.15. One of the most popular public CDN is Amazon S3. They have been around for quite a while and a lot of sites use it, twitter as one. Another is Rackspace cloud files (which we use) and the new Microsoft Azure.

So how exactly do you transfer content in and out of a CDN? What other ways are static content served? Why is it necessary? Where does caching comes into this? Join me in the next piece ;)

Post update: The Second part of this article has been published here.

Share this post:


4 Comments (add yours)
  1. This is a very great piece you have written. I’ve also found reason to move one of my sites to VPS at one point. I am thinking of going cloud hosting for my upcoming app but didnt really understand the whole thing. I’ll eagerly be anticipating your next piece.

    Big ups to you guys at DevEdge Labs. You are the only Nigerian web app company thats making me really happy right now.

  2. ray

    @drixie
    Glad you enjoyed the piece. And we feel inspired with your words.
    Cloud hosting is the just about the same thing you already know. Don’t be that confused with the ‘Cloud’ term. Some of the little difference though is that the hosting is offered to you as a service and one characteristic of this is that you get to pay /hr (there are variations though). You can also scale up or down your server specs (RAM, HDD etc) easily and in a giffi as the technology is based on virtualization (like with VMWare if you’ve ever played with it).
    For more info, check out http://en.wikipedia.org/wiki/Cloud_Hosting

  3. very good article………….. How can reach the second part ………………

Trackbacks & Pingbacks

  1. VPS, CDN and advanced server techniques: 2 | bitblogr.com

Leave a Reply




↑ back to top
Switch to our mobile site