Although prices continue to drop on hosting and bandwidth, it can still be pretty expensive to host a major website. And if you’re not paying a lot, chances are that your site is pretty slow – losing you business.
As you think about your servers hosting your site, they have to put up with many requests. Some of those requests may require your server to communicate with other database servers or third-party application programming interfaces (APIs) before generating a dynamic page. Other requests may be simple, like serving images or video, but require an inordinate volume of bandwidth. Your server may actually struggle to do all of this at the same time. A page on this blog, for example, could make dozens of requests for images, as well as many database requests.
Pile on the users and this server could get buried in no time in requests.
The problem is that all these requests take time. Time is of the essence – whether it’s the user waiting for a page to load or a search engine bot coming to scrape your content. Both scenarios can hurt your business if your site is slow. It’s in your best interest to keep your pages light and fast – providing a user with a snappy site can increase sales. Providing Google with a snappy site can get more of your pages indexed and found.
On the other side, browsers have issues too. Browsers tend to load objects from a domain one at a time. That is, if you have a page and 10 images… the browser is going to make 11 trips to complete the page. That can slow down your pageload times quite a bit!
The answer is to utilize a content delivery network. While your server loads your pages and controls all the dynamic content and API requests, your content delivery network (CDN) can load all your images via another subdomain. Since you’ll have pages loading from one domain and images loading from a subdomain, the browser gets to make both requests at the same time and your page can pop a lot faster! Amazon CloudFront might be the largest CDN with Amazon Simple Storage Service (S3) as the most affordable CDN provider right now. We use it and our costs barely top $2 per month!
CDNs also have highly distributed networks. The closer the visitor is to the server, the faster the site will load. Aside from image compression, having a content delivery network is one of the best ways to serve your site faster!
If you’d like to take your speed up another notch, you can utilize services like MaxCDN, Amazon Elastic Comput Cloud (EC2), Limelight Networks or Akamai Networks. These are services with multiple datacenters throughout the globe that will actually cache your files and data locally. As a result, when a page loads, it’s incredibly fast since the files may be right down the street rather than across the planet. Costs for these services can range quite a bit – but it’s an outstanding investment.
Image from Akamai Networks
Your content delivery doesn’t have to be limited to static images, either. Even some dynamic websites can also be displayed via CDNs. The advantages of CDNs are many. Aside from improving your site latency, CDNs can provide relief to your current server loads and scalability well beyond their hardware limitations. CDNs are often redundant and have high uptimes as well. By offloading these chores to a CDN, you may even find that your hosting and bandwidth costs drop and revenue increases. Not a bad investment!
Disclosure: We’re customers and affiliates of MaxCDN and love the service!