Domain sharding for all
One of the most frequently talked about performance improvements for web sites is the sharding of domains. This was one of Steve Souders’ original rules (mentioned in High Performance Web Sites) and still one of the Yahoo! Exceptional Performance guidelines. The basic problem is that browsers limit the number of parallel connections opened to a particular domain. Although recent browsers have upped the number of parallel connections for HTTP 1.1 from 2 to 6, your page still downloads faster if you have at least a couple of other domains from which to download resources. The guideline is to have at least two different domains but no more than four (as you increase DNS lookups and therefore negatively impact performance).
When I’ve discussed this with other developers, everyone agrees that this is a good idea. Most major web sites use multiple domains to download page components. It’s relatively cheap and easy to setup a new CNAME entry for your domain and direct some resources there. The pain point I usually here is that for personal or small business web sites, they don’t have access to creating subdomains and certainly don’t have a CDN to use. Fortunately, there’s a variety of places you can store resources that will allow event the smallest site to enjoy the performance gain of using multiple domains.
Photos – Flickr
If you regularly use photos on your site, then Flickr is a great option. Flickr not only hosts your photo files, but also creates several different sizes of the original image, all of which can be embedded on your page. Once your photos are on Flickr, you can click on “All Sizes” to choose the image size you want and then scroll to the bottom of the page where you’ll see a section with both HTML to embed the image and a direct link. The only thing to keep in mind is that, according to the Flickr terms of service, you’ll need to link that image back to its Flickr page (very easy using the provided HTML). Your photos are then loaded from the Flickr servers, so there’s no need to upload them to your own site.
Flickr comes with both free and pro versions, and photo embedding on your site can be done with either plan. The pro version is $24.95 per year and removes all limits on uploads, among other things.
Graphics – Photobucket
For non-photo images, such as background images or decorative page enhancements, Photobucket is a great alternative. Photobucket gained popularity with the rapid rise of MySpace as people needed free locations to upload photos in order to create those crazy MySpace profile page designs. Photobucket makes it easy to embed images by providing links for various services as well as a direct URL to each image. Unlike Flickr, you can only share the exact same image you uploaded, which makes Photobucket less useful for photos (which are often quite large) but quite useful for other graphics. This is currently where I store the graphics of my books that you see on this site.
Photobucket also comes in free and pro flavors. The free version has a limit on both uploads and data transfer while the pro version ($24.95 per year) removes those restrictions and also allows videos and SWF files to be uploaded and shared.
Presentations – Slideshare
If you’ve been at a tech conference recently, you’re probably familiar with Slideshare. It’s where many notable speakers upload their presentations to share with everyone. Slideshare translates Powerpoint, Keynote, and other presentation formats into a Flash movie that is embeddable anywhere, making it the “YouTube of presentations.” Beyond that, Slideshare stores a copy of the presentation that can be downloaded directly from their site. Since presentations tend to be quite large, it’s a good idea to store those elsewhere so as not to affect your monthly bandwidth. All of my presentations are up on Slideshare.
Anything – Amazon S3
I’d be remiss if I didn’t mention Amazon’s S3. While not a free services, Amazon S3 has some very reasonable pricing for data transfer and storage (we’re talking cents per GB of storage and transfer). While not strictly a service for web sites, Amazon S3 allows you to store any file of any type and size in the same location for a low cost. If you want all of your files in the same location on a dependable system, Amazon S3 is a great option, which is why companies like Twitter use Amazon S3.
I’m sure there are many more free and pay sites to use for web data storage, but these are the ones I’ve personally used and would recommend. What are you favorite sites for storing data?
Disclaimer: Any viewpoints and opinions expressed in this article are those of Nicholas C. Zakas and do not, in any way, reflect those of my employer, my colleagues, Wrox Publishing, O'Reilly Publishing, or anyone else. I speak only for myself, not for them.
Both comments and pings are currently closed.