Shared hosting vs VPS vs Cloud services. Which way to go? Day 28

Shared hosting vs VPS vs Cloud services. Which way to go? Day 28

When I started my first online business about 12 years ago, I didn’t know anything about hosting. All I wanted was to publish my tiny PHP website to the internet. At the time I was living in Brest (Belarus), a small town in eastern Europe.

There was just one company called Beltelecom that was providing all telecommunication services to people (essentially a monopoly owned by the government), so I figured that would be the place where I could buy a little bit of internet for my site.

I went there, waited in line for my turn and asked the woman in the little window if she could help me to publish my site to the internet. Here is how it looked like more or less:

As you could imagine she had no idea what I was talking about. Remember, that was the time where only a few people were lucky enough to have dial-up modems. For younger people reading this, there was this thing called dial up modem that would use your regular phone line to connect to the internet. Needless to say, it was super slow and unstable.

Actually, here is the very similar modem to the one I used to have many many years ago. Nostalgy…

Since no one on the floor could understand what I wanted, they sent me to the “internet guy” Ruslan (if I remember correctly). He was sitting in the nice spacious office on the six floor. Once there, I briefly explained that I wanted to publish my site to the internet. He was like “Hmm… Ok, ok… How much traffic do you need? How many mailboxes?”. I had literally no idea.

Ruslan quickly sold me some hosting package and gave me FTP login credentials. Yay! After a few wasted hours, I finally found someone who gave me what I needed. The only unusual thing was that I had to pay cash directly to him, instead of going through the window on the first floor.

Years later I realized he was re-selling some American shared hosting as a side gig, right inside of the government telecommunication institution 🙂 No wonder why everything in my Control panel was in English.

Anyways, it didn’t really matter to me because, thanks to Ruslan, I was able to make my site available to the internet and move forward with my business idea.

As my programming skills improved I started buying shared hosting directly from hosting companies in US. There were few things that I had to learn the hard way. Sometimes my site would stop working, would display totally different site or I would see some weird ads that weren’t mine. In addition, their support wouldn’t answer my emails, maybe because my English sucked or they just didn’t care.

Through some trial and errors, I was able to find a few relatively stable and trustworthy shared hosting companies. By the way, if you are starting out and need a good shared hosting, here is the website that provides a list of top 10 shared hosting companies. A2 and InMotion are my favorites so far.

I was pretty happy with the “unlimited” shared hosting plan that I had, until one day I received the email from the hosting company with the following subject “NOTICE: Temporary Account Suspension”.

Turned out our website started to consume a lot of server resources and they didn’t want to host our account any longer. As you can see, unlimited shared hosting is not really unlimited, it’s just a lot of websites are small and never cross the limits. Just a marketing trick basically, keep that in mind.

Fortunately, by that time I already learned how to configure my own VPS server, so we migrated off the shared hosting and never looked back.

Throughout my professional career, I’ve been dealing with many different hosting types. Since I do get a lot of hosting related questions, I’ll try to explain my thinking when it comes to choosing appropriate hosting for your website.

SHARED HOSTING

This is hands down most popular option today. As the name suggests all server resources (CPU, Memory, Network, and Disk) will be shared between different hosters accounts.

Basically, what happens is shared hosting company tries to jam as many accounts as possible to the same physical server. I’ve seen cases with tens of thousands accounts on the same box!

It’s not hard to understand why it’s bad. All of those accounts (websites) compete for server resources. If just one of those sites gets a big traffic spike, all other 9999 sites placed on the same server will be affected.

In many cases, the database server is also installed on the same physical box. If you take into consideration potentially slow disks, you might be looking at significant extra latency for every query to the database. All of those factors can dramatically slow down your site (not just yours by the way). The noisy neighbors and resources saturation are the main problems with shared hosts.

Remember the main goal of any business – make more money and reduce expenses. Noone wants to maintain extra equipment unless it generates extra income.

In addition to that, you get almost no flexibility, you can’t install custom software that requires specific (custom) system packages, you can’t tune the configuration for your specific use case, you can’t install monitoring and logging agents, you can’t setup proper backup solutions. Basically, you are VERY LIMITED with what you can do with shared hosting.

Here is the good news – if you are just starting out or have a simple WordPress blog with only a handful of readers then you don’t need to worry about all of the problems that I mentioned above.

Remember, the most important thing for any business is to move forward as quickly as possible and at this early stage a good shared hosting with SSD drives will do just fine.

Don’t stress about the shared hosting shortcomings and don’t waste precious time. You can always migrate to a more powerful solution later on. Just make sure you follow my 3 step battle tested website backup strategy and you should be good to go.

VPS or Virtual Private Server

The main differences between VPS and shared hosting are predictable resources allocation and unlimited root access to your virtual server. With VPS you get guaranteed resources depending on your plan which is very very important for any high-performance application.

In the past, VPS servers were significantly more expensive than shared hosting, but today it’s not true anymore. In fact, today you can find VPS with 20GB SSD disk space and 512MB of RAM for just $2.50/month!

Major players on the VPS market are Linode and Digitalocean.

I personally prefer Linode as it feels more stable. Remember, we didn’t raise any money when we started our online business, so we had to get creative and squeeze everything possible out of our VPS setup.

After a bunch of performance enhancements and VPS server configuration tuning, we were able to serve about 5 million pageviews a month on a $40/month Linode VPS. At that point, we were doing about 3 million dollars in sales. Do not underestimate the power of the properly configured VPS machine.

With great power comes great responsibility

Not so long ago, I did some WordPress performance enhancements for one of my clients. He was running a Viral news website which means mostly dealing with unpredictable traffic spikes.

Even though he paid about $500/month for the VPS plan, he couldn’t handle all the traffic that was coming in and the site would crash every time he had a killer story. Needless to say, he was very unhappy about the situation as he was losing real ad money for every minute the site was down. To solve the problem he tried to upgrade to even larger VPS plan, but that didn’t help.

The whole WordPress website he was running was a mess, so we had to redo it completely. We got rid of a lot of unnecessary plugins, introduced multiple levels of caching, tuned database and redid the theme to take advantage of the front end rendering to minimize backend calls. Plus we reconfigured and fine tuned the VPS. In the end, we were able to lower his monthly bill to $40/month, that is about $460 saving every single month. Not too chubby for small business, right?

VPS is great and you have full unrestricted power, but remember – great power comes great responsibility. If you don’t know what you are doing, you can mess things up.

With shared hosting you get simplicity, but give up performance, flexibility, and stability. With VPS you get all of those but sacrifice on simplicity.

There are always pros and cons to everything…

If you are running a website that gets fair amounts of traffic and you make money from it, I recommend to move it VPS. Just make sure to find some knowledgeable people who will do the proper setup and transition and of course, do not forget about backups!

Cloud services

The biggest players on the cloud market are AWS and Google Cloud.

I’ll try to keep it brief. Cloud services are very similar to VPS where you get full unrestricted access to the servers. The key difference is that in addition to the simple bare bone virtual servers, cloud providers also offer you a bunch of managed services that seamlessly integrate with each other.

For example, you can launch fully configured database or caching server with just a simple click of a button. AWS provides more than 20! managed services (and they keep adding more and more) so you can focus on delivering new functionality and not wasting time on managing servers.

There is still a fair amount of work involved as you have to know which services to use and how to set them up properly. A pretty steep learning curve basically. Plus it costs much more money than a simple self-managed VPS machine.

Another thing to consider is that once you start using more in more services from the particular cloud service provider it becomes harder and harder to switch away. That’s the price you pay for convenience 🙂

I usually recommend cloud services to bigger clients that get quite a bit of traffic and have specific security, uptime and failover requirements. In many cases, they also have dedicated dev and ops teams that can maintain multiple services on a continuous basis.

The good news here is that you can combine some of the Cloud services with your simple VPS account. For example, for our e-commerce site, we store all of the product images on AWS S3, send emails with AWS SES and use AWS Route53 service for DNS, even though the main application is running on the Linode VPS.

Thanks to the competition between Amazon and Google and rapid advancements in the hardware, the prices are constantly dropping for both platforms. It’s quite possible that in the future we will be using cloud services even for the smallest web projects.

Later on, I’ll tell you more about different useful setups like CDN, DDoS attacks mitigation, Image resizing, Internal and External Monitoring, Logging platforms, basically all components that can take your online business to another level. Just make sure to subscribe to my list, so you don’t miss my future updates.

Leave a Reply