Wikimedia_Foundation_Servers-8055_17

Getting on board a Hosting Provider

You have developed this new awesome website and you are ready to show it to the world. But you need to host it on a server before you can show it off to everyone. So, what are you waiting for? Go, buy a domain, a hosting provider and you are off to become famous with this new website. But, when you go out there, you see a lot of choices and are confused way too much as what to opt for and what is the right choice for you. In this post, I will try to clear all the confusion that you might have.

Introduction

I am pretty sure that you must have done your research on internet and found a hell lot of hosting companies which provide different types of hosting viz. shared hosting, VPS and dedicated hosting. Exploring further, you might have came across some companies providing PaaS platforms. With so much of information, you must be totally confused now as well as probably in a dilemma for which hosting should you opt for and which hosting company should you trust!

Well, first I would advice you to calm down. It’s very normal for a person new to hosting stuff to get overwhelmed and confused by this amount of information. The problem is, there is a lot of information that explains types of hosting technically and a lot less information on what they mean exactly and what is the best suitable option for you.

Let’s start from the start. If you go and search, the most popular hosting options that you will come across are shared hosting, VPS and dedicated. You will see them listed on every damn hosting site you went through. But their prices differ by huge amounts and you might not have understood the exact difference between them.

Shared Hosting

Let’s understand them one by one. Shared hosting is like living in an apartment complex. You all have some space allocated to you but you share the most of your resources like playground, pool, parking area, etc. In a similar way, you share your server resources like RAM, CPU time, disk space and installed software. You can’t implement many of your functionalities and so; you cannot use the full power of your framework. Does this mean that you cannot use all the functionalities of popular frameworks like Laravel, Symfony, ROR ?

The answer is Yes. Some great functionality like queuing system and artisan commands are not available to you. To make use of this, you need to have an SSH access to your server so as to configure it. Majority of the shared hosting companies don’t provide SSH access and if they provide, there are limitations as to what you can do. Example, if PHP 5.3 is the common version on shared hosting, then you cannot upgrade it to newer versions if the company doesn’t allow it. If you want to embrace caching for making your application more performant using Memcached or Redis, then it will be tough or many a times impossible to do on a shared host. Moreover, if any other site sharing your server space and CPU is having bad code or there are some memory leaks or performance issues, then it is going to affect your site as well. Going further, if you don’t have SSH access you have to solely rely on FTP software such as FileZilla to deploy your websites, which is very unreliable in these modern times.

Does this mean that shared hosting is not at all preferable and no one should opt for that?

Not exactly! It depends on the nature of website. If you are having just a small static website and not much of a traffic, then I suppose shared hosting is a good option. For small functional websites, shared hosting can be preferable. But, if it is a heavy functional site, then shared hosting is surely not an option. Moreover, it is actually a matter of choice also. Personally, I need the control of my server as to what it should do and what it shouldn’t viz. playing with server configuration. But, if its your first deployment and a small website, get to know about shared hosting and opt for it for the first time.

To conclude, shared hosting is good for small websites and is also a good choice to start with. But, if you want to control your server configuration and install other third party applications, then shared hosting might not be a good choice

VPS

VPS, which primarily stands for Virtual Private Server is like owning your own condo. You share most of the resources, but you are owner of the resources allocated to you. You have your own parking space, lawn, and private space and free to do any alterations among them. The over all CPU time and memory of the original server are shared across numerous virtual servers on the machine, but at the same time portions of those resources are always dedicated to each account. Also, you can upgrade your software as and when you want and you can also fine-tune them as per your needs. This gives you power and a free hand to do whatever you want with your VPS. To best explain it, it is similar as to wherein you setup an Ubuntu or any other OS on your WINDOWS machine using VMWare or other similar virtualization software.

So, we have a SSH access to VPS?

Yes, you have an SSH access to VPS. If you are new and have no idea how to set up a VPS or security related issues, do not worry! You can find plenty of resources out there, but then many hosting companies provide you managed VPS hosting, wherein they will setup your VPS and manage it for you according to your needs. But, they will cost you heavily for that. I suppose it’s not too tough to setup a VPS. First time, it will be nervousness, but otherwise it’s pretty easy. Not a big deal!

SSH: To lay it out simply, you access your server’s terminal via your local terminal and do whatever you can to that server, of course via your terminal :)

Dedicated Server

Dedicated hosting is like owning your own house, your own personal family home. You are the sole owner of your server. No one is there to share anything with you. You can do whatever you want and there is no restriction on any damn thing. You might be still confused as to why would anyone opt for a dedicated server if VPS provides almost same functionalities?

VPS slices the server resources vertically and divides it into numerous accounts with dedicated power to every account. In dedicated hosting, you get the full server for yourself and you can play with it, modify network configurations, any thing you can think of. You have freedom in VPS but there are limitations in extreme cases. If there is script, which is hampering the performance of main server resources, then you might have to take it down. But, VPS is preferred choice than dedicated server. VPS gives you enough freedom to have your website up and running with all the required dependencies and software. Dedicated should be opted whenever your traffic is reaching great heights and continuously spiking your resources.

Let’s start from the start. If you go and search, the most popular hosting options that you will come across are shared hosting, VPS and dedicated. You will see them listed on every damn hosting site you went through. But their prices differ by huge amounts and you might not have understood the exact difference between them.

PaaS Hosting

As mentioned earlier, you would have explored enough; you would have came across PaaS platforms as well. PaaS means Platform as a Service. PaaS services can consist of preconfigured features that customers can subscribe to; they can choose to include the features that meet their requirements while discarding those that do not. PaaS hosting simply means that you need not configure your server as in VPS or dedicated server. You have all the things preconfigured by the service provider and you just deploy your code to get your website up and running. For VPS, you need to setup application server, databases, runtime environments, caching mechanisms, etc. all by yourself. You need to take care of your configurations and resolve errors where things might not work on VPS, when they work on your localhost. As a developer, your core competency is writing code, not managing servers. With PaaS you get a whole lot more “out-of-the-box” than you could from a traditional hosting provider.

Should I opt for PaaS instead of VPS or dedicated hosting?

Maybe yes, but it comes with a cost. At the end of day it’s a personal choice. I personally like to play with servers. So, I would always prefer a VPS or dedicated over a PaaS. If you need a fast, reliable and scalable host for your web application so you can write some code and you don’t want to deal with managing servers, then a PaaS like FORTRABBIT is a great choice. If you are confident at setting up servers, you love doing it, and you rather do that than writing code, then a traditional host is a better option.

A last piece of advice, with great power comes great responsibility. Servers are nasty stuff and directly affect the rendering of your website. Be sure, that you know whatever you are doing!