AD
Episode
260
Interview
Web News

What Type of Hosting Should You Use? (Shared, VPS, Dedicated, Reseller, WordPress, NodeJS)

Recorded:
August 1, 2023
Released:
August 9, 2023
Episode Number:
260

Choosing the right web host is crucial for your project's success. Web hosting should be seen as the foundation in which your website or web app is built upon. It doesn't matter if you make your app with this framework, that plugin, or have the best content in the business - if the hosting goes down, your project goes down. The problem here is that as a web developer and especially a junior developer, you've spent the majority of your time building and learning on your local machine. Hosting projects locally is fantastic for building, but it doesn't reflect the real-world demands of a website being used by the public. Once deployed your project must withstand varying amounts of traffic while remaining performant, both of these things rest largely on the web host's shoulders - having the right server configuration with the proper networking infrastructure supporting it is crucial. In this episode, Matt takes a look at various web hosting types including shared, dedicated, WordPress, reseller, and nodeJS. Each of these unique hosting types have their own pros and cons ranging from how powerful they are, what their scalability looks like, and how much they cost. The focus of this episode is on what is commonly called "traditional web hosting" or "traditional web hosts" provided by companies such as HostGator, Hostinger, BlueHost, and more.

Listen

Also available on...
...and many more, check your podcast app!

Who’s in This Episode?

Show Notes

Scrimba Discount!

  • Learn to code using Scrimba with their interactive follow along code editor
  • Join their exclusive discord communities and network to find your first job!
  • Use this URL to get 10% off on all their paid plans: https://tinyurl.com/ScrimbaHATT

What you'll learn in this episode

  • What "traditional web hosts" are
  • The difference between: shared, VPS, reseller and dedicated hosting
  • Why NodeJS usually requires at least VPS hosting (and why sometimes it can work on shared hosting)
  • What hosting type you should choose based on
    - computing power
    - budget
    - hosting platform capabilities
  • What WordPress hosting is versus a comparable shared hosting plan
  • Who reseller hosting is for

Show Notes

High-Level Notes

  • The hosting focused on in this episode is sometimes referred to as “traditional web hosting” meaning that it usually has cpanel + Linux running Apache (web server) with MySQL (databases)
  • We will be touching on node.js hosting as well, mostly in relation to these traditional hosting providers
  • Every web hosting company is it’s own business and therefore will run things differently than others
    - Different names for the types of hosting based on their marketing
    - Varied offerings (ie most hosting companies offer a lot of tooling with their shared plans, but it’s up to them on an individual basis)
    - I recommend speaking to support/sales with your project requirements to ensure you’re getting what you want/need out of your selecting hosting plan

Types of Hosting

Shared Hosting

  • You share a piece of hardware (computer/server) with other customers
  • The server’s resources are divided between the various customers on the server
    - CPU
    - Memory (RAM)
    - Storage space
    - Bandwidth (networking)
  • The web host manages the server and what you’re allowed to do on it
    - Pre-installed management software like cpanel, or plesk comes packaged with a bunch of apps so that you can manage your bit of the server (ie create a database, change PHP versions)
    - Web host has the ultimate say on what you’re allowed to do (ie you don’t install various PHP versions, they install them and will usually let you choose which one to use)
  • With that management comes the benefit of professional maintenance. The host will maintain:
    - Server OS versions
    - Management software updates
    - App updates (ie new version of phpmyadmin)
    - Note: You are still responsible for updating your website (ie WordPress plugins, your CMS)
  • Even though you’re sharing a server with other users, you generally won’t see any other user profiles or anything like that (for security reasons of course). 
    - Generally you’ll be given a login that will give you access to your cpanel and/or the web host’s own management tools 
    - In an ideal world you shouldn’t be able to tell that you’re on a shared server
Advantages of shared hosting
  • Cost effective
  • Easily maintained (you don’t update the server, deal with the networking, etc.)
  • Low technical skill required, but a lot of control for those with more technical skill
    - You can manage databases, email inboxes, email forwarding, DNS, and more (this list of features depends on the the freedoms that your host provides)
    - Some hosts will even let you use the command line to an extent
  • Hosting support (familiar with their own server infrastructure)
    - The host owns and manages the server so typically their support knows what’s going on and why any problems may arise (with the exception of on your website specifically)
    - Sometimes they will help with your website as an included service (this varies wildly host-to-host)
  • Scalable
    - Can support low to medium traffic, and you can stretch this by ensuring a performant website
    - There are usually tiered plans that you can upgrade through as you need to
Disadvantages of shared hosting
  • You’re sharing server resources with other users
    - Can result in a user on your server hogging the available resources, causing a “traffic jam” hurting your performance
    - Note: These concerns are rare as many web hosts have policies and monitoring in place should a bad actor be intentionally going against the host’s ToS, or if a customer’s website has out-scaled shared hosting naturally through popularity
  • Limited computing power
    - Shared hosting is usually not the most performant when it comes to “heavy” websites
    - If you’re running a complex web app, or a busy website that needs to be able to multi-task (ie you have multiple users logged in to your web app, at the same time you may be doing some administrative tasks on the app) then you may experience degraded performance and even crashes
    - Limits the amount of traffic you can reliably handle (even if you’re well below your bandwidth limit for the pay period)
  • Limited Control
    - You can’t install any software you want, you can’t change the management software (ie cpanel)
  • Security risks
    - The chances of you “bumping into” or seeing other people’s data that are hosted on the server are low
    - The big concern comes with email, many shared hosting plans come with webmail which allows you to have email addresses associated with custom domains (ie matt@htmlallthethings.com)
    -- The main problem is that the hardware you’re on is shared, and therefore you’re sharing an IP address with other people…if someone on your server buys a hosting plan and sends out spam from one of their webmail addresses the IP you’re using may be blacklisted so you’ll have trouble sending emails out (ie Microsoft, Gmail, etc. may block you)
    -- You can usually contact the host to let them know this is happening and they’ll have a communication channel to the big email providers to get your email working again…but this is an annoying service interruption that I’ve personally seen happen several times

Dedicated Hosting

  • Dedicated hosting is web hosting on a dedicated piece of hardware, meaning you’re “renting” a server/computer that you and you alone will be using
  • Dedicated hosting often comes with a dedicated IP address (sometimes sold as an add-on) as well so that you’ll have full control over what traffic comes out of your IP and won’t need to worry about other people’s doings coming out of the same IP
    - This also lets you reliably connect to your IP address from an external app, or infrastructure of some sort, so you’re not risking your host changing your IP address without warning, breaking those connections
  • Is not beginner friendly and requires a high-level of technical skill to operate and maintain dedicated hosting, this difficulty curve can vary wildly depending on what you want your server to do
  • Provides the best potential performance out of all the hosting types
    - This performance can be squandered by poor configuration
Advantages of dedicated hosting
  • Full control
    - Modify and configure everything down to the operating system
    - You can just not have a web server installed and use your dedicated server for something else, like a game server for example
    - Configure what’s installed (ie you may want to install cpanel), change how the OS logs errors and messages, choose which web server you’d like installed (ie if you don’t need a database, then you don’t need to install the database handling software, saving the space and resources for it being there)
  • Full access to the hardware
    - You’ll see exactly what hardware you’re getting and can sometimes even modify it (ie choose more storage space, SSD over HDD, better networking card (NIC), etc.)
    - No worries on someone else hogging resources as you’re the only one using the server
  • More secure
    - You’re connected to the web host’s networking infrastructure regardless of which hosting plan you choose so you’ll get the benefit of their general security features (ie physical firewall appliance)…but with full control you can add your own security features that sit on the server itself (ie encrypting partitions)
Disadvantages of dedicated hosting
  • High costs
    - The costs of renting a dedicated server are typically quite high and can jump substantially as you purchase better hardware, or modify yours to be better (ie SSD to HDD)
  • Added Technical Debt
    - Dedicated servers are maintained by you, so you’ll need to have a high technical ability and the time to maintain the server, as well as the website/web app that you’re running on it
    - You may need to hire a server admin to do this step if you’re unsure how to
    - Your web host may offer advanced support, but it can be very costly and be charged per hour rather than per month on a fixed-rate
    - Some web hosts will offer managed dedicated hosting, which may alleviate a lot of this technical debt, depending on what they support
  • Not easily scaled
    - Because you’re using a dedicated piece of hardware, you can’t simply upgrade your plan to allocated more resources to you
    - If you max-out your server you’ll need to look at either getting a better dedicated server and migrating over…or load balance between multiple servers
    - Sometimes you can upgrade the hardware on your current server, but the options offered by many hosts are often limited to a few components, and may not be enough to fill the gap especially for future-proofing

Reseller Hosting

  • Designed to be purchased by freelancers and small businesses so that they can offering hosting services themselves
  • As a reseller host you typically receive a fully managed bit of server space, run by something like WHM (WebHost Manager) that lets you spin up accounts for each of your customers, each customer will then receive cpanel access with resource limits according to what you have set
  • Reseller plans include a large pool of resources that are mean’t to be divided up and resold at the purchasers discretion
    - You create your own plans (ie 500mb bandwidth, 2GB storage space on the bronze plan)
    - Your customers will receive cpanel access, just like if they went to the parent hosting company directly for shared hosting
  • Because reseller plans are almost always managed, you’ll still have some limitations set forth by the web hosting company
  • Summary: You can think of reseller hosting as purchasing shared hosting in bulk, and then you’re responsible for dividing up the space, providing your customers with shared hosting plans
Advantages of reseller hosting
  • You’re selling full hosting plans to your customers
    - As a freelancer, or agency, if you give your customers a hosting plan from your reseller account you are giving them a full proper hosting account (they’ll have access to cpanel - just like if they bought from the hosting company directly, you’ll have control & access to their account so you can keep assisting them as needed)
    - You’ll be able to easily set the pricing that works for you
  • Management software lets you manage the technical side of things and sometimes even the business side of things (billing and online payments)
  • Hosting provider support varies
    - (Advantage & Disadvantage) Some hosting providers will offer the same support to your reseller clients as they do their shared hosting customers. If they do offer the same support, then you could (in theory) run your hosting business as a self-running operation where all you do is sell and provision the resources to your clients. The problem here is that many reseller providers want to white-label their offering, meaning all the original hosting provider’s branding is invisible, covered up by your logos as the reseller…if the original hosting provider is offering the support the facade is broken and your clients may realize that they can get hosting cheaper without the middle-man
Disadvantages of reseller hosting
  • Generally you’ll be buying server resources at a higher premium than if you just bought a new account per website you need hosted
    - Price-savvy customers may opt to get their own hosting account, and give you access to that rather than pay the double markup (you’re paying a markup for the resources, then you’ll have to mark it up again to make a profit)
  • You’re now their host
    - Many customers don’t know the line between their website and their hosting
    - Some people believe that you can spin-up a hosting business as a side hustle, set and forget the business once you have customers signed up…but you become the point of contact for all their concerns - this includes website problems, even if you don’t deal with their web development you’ll still get the call (some technical ability recommended)
  • Hosting provider support varies
    - As the point of contact, you’re still at the mercy of the original hosting provider…so even though your clients may be contacting you on issues (ie server down), you’ll just be a middleman (your client calls you (the reseller), you call the hosting provider, then you pass on the message to your client as you wait for the hosting provider’s technical team to deal with the problem)

VPS - Virtual Private Server

Sometimes hosts will use the term "Cloud Hosting" with VPS hosting - this is largely a marketing term as cloud hosting typically refers to a type of hosting that goes beyond even dedicated hosting in capabilities. The point here is that each hosting provider will using different terms in their marketing, it's important to check in to what you're purchasing, digging in further than just the name of the plan you're choosing.

  • This is the half-step between shared hosting and dedicated hosting
  • With a VPS there is a single piece of hardware (server) and it is divided amongst you and other hosting provider customers (just like shared hosting) however, each of these users gets it’s own separate piece of the server
    - The hosting provider breaks the server into individual server compartments, each of which can run their own OS, server applications, and be given root access control - the server’s resources are also split up such that each compartment is given their own piece of the physical resources to prevent someone else from hogging resources like what can happen in shared hosting
  • VPS vs Dedicated (by Google Cloud)
    - Think of a VPS server like reserving a private room at a restaurant to celebrate an event like your birthday. Instead of eating at a table in the main restaurant with other patrons (shared server), you can enjoy a separate dining experience in a private space that can be customized to your needs. You get all the seats, tables, dishes, and cutlery necessary for your guests and can arrange them how you want. You can request a different menu or drink special that your guests can order according to their tastes. However, you share the kitchen, staff, and other amenities with other patrons. A dedicated server is like renting out an entire venue and hiring a catering and event company. You have complete control over every aspect of your party and all the resources will be reserved just for your group of guests, but it will also be very expensive.
  • Types of VPS Hosting
    - Unmanaged VPS Hosting (Self-Managed)
    -- The hosting provider takes care of the physical server, all other responsibilities fall on you
    -- Recommended for those that need a deep level of control, and the technical knowhow to manage the server (server administration skills)
    - Managed VPS Hosting
    -- Hosting provider takes care of the physical server, core updates, maintenance, and software installation
    - Semi-managed VPS hosting
    -- Hosting provider takes care of the physical server with some extras (ie core software installation - like WHM, and support)
  • VPS is a popular option for projects that have outgrown shared hosting, but aren’t demanding (or growing fast enough) to justify dedicated hosting
    - Many hosting providers will include server management software like WHM, so you can even host a small collection of projects on a single VPS, adjusting each project’s resource pool and providing them with their own Cpanels - access your staff could be given individually to prevent unintended access to projects they’re not working on
  • VPS is also a popular option for sites that are compute-heavy, but may not deal with a lot of traffic
    - When a website/web app is compute-heavy enough that shared hosting will struggle, but is not busy enough to warrant the increased computing power of a dedicated server, then a VPS may be a cost-effective way to manage the budget and good performance
    - This is common for testing environments, or new websites/web apps
    - For testing environments:
    -- The production app may be on a dedicated server to accommodate multiple users and computer-heavy tasks"
    -- To keep the cost down, the testing environment may be on a VPS to deal with the compute-heavy tasks and decreased traffic
Advantages of VPS hosting
  • Budget-friendly way to scale up from shared hosting
  • The environment of choice for development teams that need compute-heavy & budget conscious testing environments
  • You get additional security and power with the advantage that your hosting provider is still involved (they can troubleshoot and assist with many common issues quickly as they’re familiar with their own VPS environment)
  • Managed options are more common with VPS hosting than dedicated hosting
    - Hosting providers will generally offer various package deals with what they’ll handle with your VPS sometimes with add-ons like professional server administration assistance for a low hourly-rate
    - Your host may support your VPS the same way that they would if you had shared hosting (they’ll typically control the OS and software you have installed to an extent in order to train and provide support)
  • Shared hosting is the lowest barrier to entry from a technical standpoint and from a budget standpoint, so many hosting providers will offer comprehensive support for their shared hosting options
    - VPS is seen almost as an extension or an upgraded version of their shared hosting by many hosting providers - this is because it’s easy to overrun shared hosting by just website visitors alone, therefore, there are going to be many people that aren’t that tech savvy in need of VPS services - you can use this to your advantage, delegating server admin costs for an inexpensive rate (especially when compared to hiring a server admin)
Disadvantages of VPS hosting
  • Not very scalable (depends largely on the hosting provider)
    - When you choose a plan, you may be stuck there
    - Upgrading your VPS hosting may require moving to another server, if so a full-scale migration will need to take place (hosting providers may help here)
  • Adds nuance to scaling your business
    - This is not a technical disadvantage, but a human one
    - When you’re scaling up from shared, or kicking off a compute-heavy project, it’s easy to land on the cheaper VPS option, even if scaling up to dedicated hosting would be difficult
    - When dealing with a business large enough to have departmental budgets and administration teams that need convincing, VPS may be an easy sell…that will cost you more down the line if you scale out of it quickly

WordPress Hosting

  • WordPress hosting is more of a marketing term than a technical one, WordPress hosting is just web hosting with:
    - Servers that are typically optimized (or pre-configured) for WordPress specifically
    - May have WordPress pre-installed (or installed with an easy-to-use installer)
    - Promotions or offers may be included (ie premium WP plugins at no added cost)
    - Agency-ready setups (ie WordPress multisite setup and ready to go)
    - Added security features on the hosting end (to monitor and block WordPress specific threats, either via the hosting infrastructure and/or with pre-installed security plugins)
    -- WordPress’ popularity means there’s lot of malware out there and people looking for ways to break in…this helps with that
    - Updates to WordPress (either using the automatic updates feature of WordPress, or managed by the web host)
    - WordPress-friendly backup solutions to complement automated backups
    - WordPress staging environments in 1-click
    - Support staff that are versed in WordPress and the surrounding environment
Advantages of WordPress hosting
  • Cost-effective way to host WordPress sites and get help managing them in one monthly (or yearly) fee
Disadvantages of WordPress hosting
  • Because WordPress hosting is designed around marketing all the features and perks the hosting provider offers around WordPress - useful technical stats can be buried (ie your WordPress site might be popular enough to overrun WordPress hosting as it’s typically optimized shared hosting)
  • [personal opinion] You may lean too hard too hard on all the management perks and therefore stop learning new things about WordPress hosting and management yourself
  • You’re locked into WordPress, making other CMS difficult or impossible to install without needing another hosting plan…whereas a traditional shared hosting plan can host WordPress and alternative CMS

Node.js Hosting

  • Node.js is a very popular way to make web apps, but it’s still new enough that you can’t just pickup virtually any web hosting plan and expect to use it on there, node.js requires root access to install and configure it
    - For projects that require node.js typically the “lowest cost” solution is a VPS as it gives you enough access and freedoms to install and run node alongside anything else your application needs to function
    - There is an exception to this rule, there is tooling that works from the cpanel GUI and/or the command line that can be used on shared hosting via cpanel
    -- A2Hosting offers a tool called Node.js Selector that lets you use the cpanel GUI or command line to create a node.js app - and you can use this tool on shared hosting
    -- A2 Hosting offers this type of hosting, references: Node.js Hosting | FASTEST & BEST Node.js Servers (a2hosting.com) & How To Create Node.js App With cPanel With Node.js Selector (a2hosting.com)
    -- This tool is also available from inmotion hosting (nginx shared hosting): How To Setup Node.js App in cPanel | InMotion Hosting
  • It is important to check that your selected hosting provider and hosting plan support node.js as there are exceptions to every rule
    - For example, SiteGround is not currently compatible with nodejs on their shared hosting plan and not even their cloud hosting plans
    - Source: Is Node.js available? - SiteGround KB

Pitfalls and how to avoid them

Obfuscation of details

The Problem

  • Some web hosts will obfuscate details, only telling you what they think is important 
  • For example, many shared hosting plans will focus on telling you their uptime and how much storage you’re going to get
  • They won’t tell you what hardware they’re using, or even how powerful it is
  • Some shared hosting plans also have soft limits that aren’t immediately obvious. For example you won’t have a hard limit on how much storage space you take up, but you’re binded by the ToS to keep your usage “fair to others” 
  • Example: One time I purchased a web hosting plan for a client and thought that the storage amount they sold me would apply to both the website and the email inbox sizes
    - The software didn’t stop me from making large email inboxes, but a week after I had everything setup and working I was contacted by them that I had too much email stored on their server and that they had a blog post that outlined how much was allowed for email and how much was “web storage” for my website.
    - Ultimately I had to migrate to a dedicated email service that they provided

The Solution

  • Ask support & sales for details before purchasing, especially if you’re doing something that is non-standard (ie using a website hosting plan for primarily email and only a little for a website)

Low Base Performance

  • It’s easy to overlook some key performance metrics such as HDD vs SSD for storage as well as geography & networking - even at peak speeds these performance pitfalls will result in site slowdowns and/or poor performance overall to the point of potential timeouts
  • HDD vs SSD
    - Sometimes a web host will sell you a large amount of storage for a very small increase in price in relation to their other plans - sometimes this is because they’re selling you storage on a hard disk drive rather than a solid state drive 
    - If you’re running a small static site an HDD might be fine, but for more intensive use cases, or websites that need to deliver a lot of assets in a performant way, an SSD will go a long way 
  • Geography & Networking
    - We’ve worked with developers that were literally on the other side of the planet from where the site has been hosted
    -- This of course hurt the site’s performance, but more critically it was difficult for them to work on the site - FTP timeouts, failed downloads, failed uploads  and slow loading speeds
    - If your website is regional - for example if it’s for a local business that sells to primarily local customers, then hosting the site physically close to where those customers are will help with performance

Sources

Support Us via Patreon

Support episodes like this and even get a shoutout (if a slot is available) via our Patreon: https://patreon.com/htmlallthethings