Part of my job as a developer is making website hosting recommendations to my clients. To create a list of recommendations, I determine the appropriate plan for the website (or websites) we're working with, and present the options to my client. In order for them to make a decision based on these recommendations, each option needs to include an associated cost.
Since most of my clients are small businesses (with less than 5 employees, in many cases only 1), educational institutions, non-profits, or otherwise operating on a tight budget, they need to know what the cost will be head of time, and they need the ability to reject the recommendation if it is too expensive.
I personally love Pantheon hosting. It keeps my sites running fast, and makes long-term maintenance easier for me. I even have several websites that I've been wanting to move to Pantheon for quite some time, but the clients won't be convinced that moving their site is a good business decision unless I can show them the numbers.
Unfortunately, It's impossible to tell how much it will cost to host a site on Pantheon by looking at their pricing page. In order for the information on this page to be useful, it assumes that
- you already have a website
- you have access to (at least a year of) usage or analytics data, and
- you understand the units of measure they are using to differentiate the plans
For new websites
If you are planning on building a new website, you are moving one that's only months old, or you don't have access to analytics data -- your only option is to make a guess. I usually start with the Basic plan and cross my fingers.
The good news is that you won't get slammed with overage fees unless you exceed the plan limits for several months, giving you time to upgrade if necessary. Having this flexibility is great, but it is terrible for estimating hosting cost ahead of time.
For existing sites with analytics
Even if you do have an existing site and access to a year of analytics data -- where do you find the numbers you need to make an informed decision?
Gathering the Data you need
Hosting companies often measure plans by monthly usage. Since many sites have seasons of higher or lower activity, I recommend collecting usage data from a longer period, and looking for patterns. By looking at only a single month of higher or lower activity, you may not be getting an accurate estimate.
The site I am estimating below has spikes in January and July/August each year, so I'm choosing all of 2019 for my data range (we're assuming 2020 will be an outlier.) I will average it over the 12 months.
Most of the sites I've worked with use Google Analytics, so the instructions that follow are for that platform.
- On your Google Analytics dashboard, first check that you are viewing data for the appropriate site
- Then, choose "Audience" in the left menu, followed by "Overview" just below.
- Adjust the date range at the top right to span an appropriate period.
Pro tip: Don't set the beginning and ending date to be the same day of the month. For example, if you want to see all 2019 data, choose
Jan 1, 2019 - Dec 31, 2019instead of Jan 1, 2019 - Jan 1, 2020. There's GA bug that will show a weird downturn at the end of the range.
Pantheon on Monthly Visits:
A single visit is the total amount of unique traffic (IP and user agent) to your site in a 24 hour period, excluding known bots and crawlers.
I believe this correlates with the Users number from the top left corner of the table below the graph in Google Analytics.
Pantheon on Pages Served:
Total number of responses generated by [Backdrop,] WordPress or Drupal that is served to a visitor. This includes cached responses and non-html responses such as JSON.
I don't think there is any way to properly estimate Pages Served, but from the second sentence above, it sounds like Pantheon is actually charging you for Pages Viewed. This number is available in Google Analytics in the second column of the second row in the table below the graph.
I find this mildly upsetting, because the number of Pages Served should be substantially lower than Pages Viewed with caching enabled. This could be a trick to make you underestimate this number.
I also find it upsetting because Pantheon hosting includes several layers of advanced caching including both a Content Delivery Network and Reverse Proxy. These should be reducing load on the server itself. Usually, having this kind of caching in place saves you money, and sometimes even enables you to decrease the size of your hosting plan, yet with Pantheon you're charged for delivering cached pages.
When you ask Pantheon support about this, they say that these additional costs are justified because of the included CDN, yet most CDNs charge by bandwidth or data transfer, and not by page view*. Additionally, almost all CDNs offer a free tier, but there is no way to opt-out of the Pantheon-provided CDN to switch to a more affordable option.
* I found only one example of a CDN that included http/https requests for pricing
SSD stands for Solid State Drive, but that is irrelevant here, and it only causes confusion in this context. What you need to know is how much disk space your site will need. (On the pricing comparison page they more helpfully label this "Disk Capacity".)
In order to determine your Disk Capacity you will need to measure two things:
- how much space your code + files need, and
- how much space your database needs
File size on disk
Most operating systems have a way to tell you how large a directory or folder is. According to the Finder in Mac OS, my code and files together take up 214 MB. According to the Terminal command line, my code and files together take up 235 MB. In the command below
docroot is the name of the directory I was measuring.
du -h docroot
Database size on disk
In order to determine the size of your database, you'll likely need to log into MySQL and measure it directly. I used the SQL command below list the sizes of all my databases. The database I'd like to move to Pantheon is 110.3 MB.
SELECT table_schema "DB Name, ROUND(SUM(data_length + index_length) / 1024 / 1024, 1) "DB Size in MB"
GROUP BY table_schema;
In order to determine your Disk Capacity you will need to add together the file size and database size. In my case: 235 + 111 = 346 MB.
I've created this post primarily to help myself the next time I need to gather these numbers, but I'm also hoping that others will find it useful.