Posted IIS Server, Consulting Tips & Resources, Useful Websites and Software, Techie News on Sunday, April 1st, 2007.
I’ve always wondered if most hosting companies even care about supporting their customers when traffic surges hit. A recently Dugg article “How Not To Deal With A Digg” makes it worth revisting those thoughts and putting up a bit of math to support that shared hosting companies are concealing a lot behind the bandwidth they offer in their packages.
Just like most gyms sell memberships to more people than could fit into the workout area if all those members showed up once per day, many hosting companies price their packages at levels that are only profittable if traffic stays very low. In the Seminal’s article, referenced above, they started with a shared web hosting package from iPowerWeb. That package offers 2,000 GB of bandwidth for $8/month - and I’m going to stay focused on that number because bandwidth is the number one place where shared web hosting companies fail to deliver on their promises (plus an 800mhz Pentium 3 with 1 GB RAM webserver that I run at work delivers 10-15 GB/day of web traffic for an application we only use internally, so the meagre specs on that hardware work fine for 275 GB/month [conservatively, 12.5 GB/day for 22 work days each month] over 100 mbps & 1 gbps network connections). A good price for bandwidth, for a hosting company leasing multiple OCx-class connections, is about $0.06/GB. That means that 2,000 GB of bandwidth works out to $120/month. In fact, your $8/month is only enough to pay for about 133 GB of bandwidth before the hosting company starts dropping into the red.
Yikes! The truth is there’s no way those lower-end hosting companies can make money from basic web hosting packages if even a small percentage of their clients are using a good chunk of the allotted bandwidth. It’s true that the numbers presented in the hosting package descriptions are typically loss-leaders, but the packages and services offered by any hosting company should be capable of reaching what they’re rated to. And, if the high bandwidth usage is a problem thsn companies should either ask users causing them a loss to leave (which sure would get those companies a lot of attention on Slashdot and Digg) or they should also institute and disclose a rate-cap of how much bandwidth/second can be used (for example: 2,000 GB/month over 2,592,000 seconds for a max rate of ~768 KBps).
In my experience of content sites’ daily traffic patterns, most non-rich media websites see averaged daily traffic rates that are only 5-15% of their peak daily rate. Let’s assume that a front page link from Digg will only triple your normal peak rate of visits (unlikely) and then work backward from 768 KBps to see what a realistic monthly usage would be from one of those shared hosting packages. One third of 768 KBps is 256 KBps, which represents our peak daily traffic rate when not featured on a big, linking site. Take 10% of that and get 25.6 KBps, or 26 KBps if we round to keep things clean. 26 KBps times the 2,592,000 seconds in a 30 day month is 67,392,000 KB of data, or ~67.4 GB/month when we’re talking in the same terms as those hosting plan providers. That seems more reasonable at a rate of $0.06/GB for an $8/month web hosting plan. Now only about $4/month goes to pay for bandwidth and the rest can pay for the hosting providers servers and staff.
Before we forget the whole point of this, 768 KBps means that an average content site with a 250 KB front page, JS, CSS, and images will take about 1/3rd of a second to transfer. Add another half second of latency, I know average latency isn’t that high but the server and browser take a little while to deal with each individual HTML, CSS, JS, and image to be transferred, and the total page load time is about 5/6ths of a second. Now grab this Browser statistics Firefox extenstion and check your own shared host website. This site has a 156 KB page load, is happily hosted on a 1and1 shared server, and has a 4.5 sec. average page load time and 1.8 sec. minimum page load time according to Google’s webmaseter tools and the large number of page loads their spider does of this site. Odds are you’re looking at a download time a lot higher than 5/6ths of a second. If that’s the case then how can your shared webserver ever stand up to the traffic experienced when being Dugg or Slashdotted?
Plain and simple, that shared web server won’t cut it when you’re Dugg or Slashdotted. The artificial statistics I’m using above, of 768 KBps peak and 26 KBps sustained, make it clear that shared host webservers aren’t capable of profittably delivering the 1,000+ GB/month that most of them advertise. Real world page load times indicate that most shared hosting companies can’t realistically sustain a 768 KBps peak rate or 67 GB/month of traffic to your site. All the caching and HTML/CSS-tweaking in the world won’t save a website when it still has to get squeezed through a skinny pipe.
Sadly, many shared hosting companies are generally happy save money offering poor service and then by allowing higher bandwidth users (costing them $0.06/GB) to move elsewhere. I really hope this practice goes the way of selling CRT monitors based on the tube size instead of the viewable size. Since I’m not a fan of government regulation, I hope some of the bigger or higher-quality shared hosting companies start offering throughput guarantees to compete with the cheap shared hosting packages that can’t deliver.
Posted IIS Server, Network and Internet Configuration, Windows Servers on Tuesday, January 3rd, 2006.
After setting up a new instance of IIS on a Windows 2003 test server I found that I could connect to it via the WAN and other machines on the LAN but the server itself would’t display the new website. Both IE and FireFox displayed “Bad Request (Invalid Hostname)”, with detailed errors displayed I saw HTTP Error code 400 in both browsers.
Searching found a number of discussions about this error message, but many of them either didn’t solve the issue or simply recommended to “start over” with a new instance of IIS and/or a new virtual website within IIS. The only suggestion I found with specific steps detailed (to set IIS headers to default settings and clear custom headers & MIME types) didn’t actually solve the issue, but it did get me to think about the fact that only the local machine saw the error message.
It turns out that in the Properties dialog for the new website I had assigned a specific IP address (i.e.: 10.10.x.x), instead of leaving the default “(All Unassigned)” setting (see image below with default setting). As a result of the server being multi-homed, using both “localhost” and 127.0.0.1 to access the website in a browser allowed the server to locate itself without using DNS, but those addresses came across a different NIC than the one IIS was assigned to and IIS wouldn’t respond with anything useful (like a web page) to those IPs.

The solutions are simple, but which one is correct depends on the LAN’s configuration or the server being multi-homed (more than one active NIC in the server):
- Use the default setting “(All Unassigned)” in the IIS website properties box for “IP Address:” - this works in single- and multi-NIC servers, but may cause issues on networks with multiple subnets if a site shouldn’t be available to all of them.
- Access the website via the computername (i.e.: http://TEST_SERVER/) while a specific IP Address and not “(All Unassigned)” is selected - if DNS or WINS is running on the local LAN or domain. However, it can still fail if the server has multiple NICs and routes to the wrong one. To get the computername type “echo %computername%” at a command prompt.
- Configure the local HOSTS file (usually %systemroot%\system32\drivers\etc\, “HOSTS” with no file extension) to target the correct correct local machine IP for IIS to work. Note: this may break other services or server daemons running on the box in question, so this is only a brute force option.