Last spring I published a short series on website performance to serve as an introduction to a longer on-again off-again series on the same topic. That first series covered things like performance budgets and how to test a site’s performance and read the waterfall charts you receive as a result.
I also mentioned the critical path, a handful of general steps that occur between the time you request a web page and when it displays in your browser.
- DNS Lookup
- Browser sends an HTTP request
- Server responds and sends back the requested HTML file
- Browser begins to render HTML
Later in the year I picked up the series to talk specifically about the first two steps in the critical path, DNS lookups and HTTP requests.
You can find all the posts in both series here, though they’ll be displayed in reverse order with the most recent at the top and the first post a few pages back.
Today I want to pick up the series again and talk about the third step in the critical path, the server response. I’ll do this with two mini-series. The first, which starts with this post will be about hosting and server hardware. The second will about server software.
Later in the year I’ll another mini-series or two that will talk about some of the performance issues specific to dynamic sites. I’ll cover things like server side languages, databases and caching.
A Few General Thoughts About Hosting
Odds are you already have a website and so have a hosting package with a company of your choice. You’re also likely familiar with some of the different types of hosting packages they and other companies offer.
Today’s post won’t be an in-depth review of hosting companies. I’m not even going to talk about things like customer support and company reputation. I thought I’d run through the hosting packages for those who may not know them well and I’ll do my best to keep the focus on performance.
The general rule of thumb with hosting is the more you’re able and willing to spend, the better the hosting you’ll receive, and the more performant you’ll be able to make your site. That’s not a guarantee and it’s not to say you have to use the most expensive hosting company or pay for the most expensive package, but understand that $100/month will buy you more server resources and more server access than $10/month will.
If your curious how your current host performs, you can test it here.
Types of Hosting Packages
When you choose hosting for a website your main concern is probably the price and you either go for the lowest cost option or you figure out what’s the most amount of hosting you can afford and go for that. It’s how I’ve generally chosen for myself and how I’ve observed my clients choosing as well.
Free Hosting: This is obviously the least expensive option as it’s free, however, you won’t have control of the performance of the server. Your site will sit on a subdomain of the host’s domain and they get to decide how the server is configured. It’s possible you’ll have the option to make it appear as though the site is on a domain of your choosing, but that’s appearances only.
For some sites, even some businesses, a free place to publish content is all you need. Just keep in mind the only control you’ll ever have with these sites is whatever control the company behind them decides you should have.
And when it comes to hosting that requires you to display ads for other companies, please skip these always.
Shared Hosting: With shared hosting, your site resides on the same server that hundreds, if not thousands, of other sites use as well. You aren’t going to have direct access to the server or control over how the server is configured.
You’ll possibly have access to some files that can override limited server configurations for your particular site, but these often add performance overhead
All sites on the server share the resources of that server and one of them can cause issues. For example, if another site on the server sees a huge traffic spike, it could take down the whole server for a time, including your site. If your site turns out to be the resource hog (as mine has been in the past), your host will likely require you to upgrade your account and possibly shut your site down until you do.
This isn’t to say shared hosting has to be avoided at all costs, but from a performance standpoint you’re extremely limited in what you can optimize in regards to the server.
Reseller Hosting: This is often shared hosting where you sign up new accounts, manage them, and receive a cut of the monthly fee of each account. You possibly have additional, though limited, server access and control through a web hosting management control panel.
Your site under a reseller package is probably on a server that will be shared by the accounts you sign up, though other setups are possible.
Cloud Based Hosting: Cloud hosting allows many individual machines to work together so they look like one very large server. Resources can be reallocated from any machine as needed so a traffic spike on one site can be handled without it affecting other sites across the same machines.
I’ve seen cloud hosting offered more as next level shared hosting and I’ve seen it offered so that what you get is your own virtual private server. Which type you have will determine how much control you have over your server configuration.
I currently have a cloud-based plan where I’m in charge (for the most part) of my own virtual server, which I’ll mention again in a bit. With some cloud hosting solutions, including Amazon’s AWS, you pay for the resources you use. Google uses a cloud based approach for its hosting needs as well.
Managed WordPress (or other) Hosting: This type of hosting has you pay a little more for the company to manage your CMS of choice. I specifically mention WordPress, but you can get managed Drupal, managed Joomla, etc. This is a layer on top of your hosting and the hosting could be shared, cloud, VPS, or dedicated, depending on the company and specific plan.
Virtual Private Server (VPS): This type of package creates a virtual server for each account. Multiple accounts and server software installations will reside on the same physical machine, though fewer than with shared hosting. You get a slice of the machine’s resources and other sites on the physical machine won’t impact your performance since they don’t use your resources.
While you won’t be able to make changes to the machine itself, you’ll have control over your virtual server and you can make most any tweak you want to how your server it’s configured. I say most, because hosting companies will usually withhold access from certain things as a security measure and also to protect the other virtual servers on the machine. If they do, they’ll probably make some configuration changes for you.
This is the kind of hosting I’ve been using for years. My current VPS is cloud-based so I have a virtual machine installed on a computer connected to others than can all share resources. For the most part, I have access to and control over how the server is configured, though my hosting company, like most, won’t let me do a few things to protect me and the other sites on the same cloud.
Dedicated Server: This is your own server installation on your own physical machine. You’ll have complete access to everything and can make any performance tweak you’d like. You don’t have to worry about any other site impacting the performance of your site since yours is the only one on the machine. It’s dedicated to you so naturally you’ll pay more.
You can likely have your host set up the server hardware to your liking and you can run any kind of software you want on it. It’s basically your machine and server that you lease from the hosting company. It’s also usually overkill for all but larger sites that require a lot of resources and can manage all aspects of maintaining the server.
Colocation Hosting: With colocation hosting, you rent space in a datacenter. You bring your physical machine and your own software and are pretty much responsible for everything other than providing the power, the connection to the internet, and physical security for the machine. If you’re reading this article, I doubt you need colocation hosting.
DIY Hosting: This would be you running your own machines and software in your own physical space. You provide the power, the maintenance, the connection to the internet, the security, basically everything. You certainly have the most control with this option, but seriously why would you do this if you aren’t a fortune 500 company.
My guess is you’re using shared hosting, cloud hosting, or have your own VPS. Those are the most common options for individuals and small teams running one or more websites. I don’t expect you’ll drop your current plan so you can make a few extra configuration tweaks and what I said toward the start will generally apply. Get the most hosting you can afford for your specific needs, which you probably already do.
If you’re on shared hosting, I’d recommend looking into cloud based hosting. If you’re on cloud hosting, maybe look into a virtual private server. In other words, as your site grows look into the next level of hosting so you’re ready to choose when your site needs more resources than it currently has access to.
Odds are your server isn’t the bottleneck slowing down performance (assuming you don’t use free or shared hosting) and know that the most performance gains involving a server will likely come in spending more for more resources.
At some point you probably will find yourself looking into a VPS or even a dedicated server and you’ll be presented with all sorts of choices about what hardware and software to use and that’s what the rest of this series will cover.
Next week I want to talk about server hardware. I’ll discuss CPU and RAM and writing and reading to and from storage (I/O). I’ll talk about how each affects the performance of some aspects of a website, but not others.
Download a free sample from my book, Design Fundamentals.