この記事は WordPress の最適化シリーズの一部です。
There can also be user improvements by splitting static files between multiple hostnames. Most browser will only make 2 simultaneous requests to a server, so if you page requires 16 files they will be requested 2 at a time. If you spread that between 4 host names they will be requested 8 at a time. This can reduce page loading times for the user, but it can increase server load by creating more simultaneous requests. Also, known is "pipelining" can often saturate the visitor's internet connection if overused.
Offloading images is the easiest and simplest place to start. All images files could be evenly split between three hostnames (assets1.yoursite.com, assets2.yoursite.com, assets3.yoursite.com for example). As traffic grows, these hostnames could be moved to your own server. Note: Avoid picking a hostname at random as this will affect browser caching and result in more traffic and may also create excessive DNS lookups which do carry a performance penalty.
Your feeds can quite easily be offloaded to an external service. Feed tracking services like Google FeedBurner will do this automatically, the Feedburner servers will handle all the feed traffic and only update the feed from your site every few minutes. This can be a big traffic saver.
Likewise you could offload your own feeds to a separate server (feeds.yoursite.com for example) and then handle your own feed stats / advertising.
It may be possible to host some of your files on external servers for free. For example, popular image hosting web sites like flickr provide image hosting at no cost. Even offloading your most popular images to a free service could significantly reduce the impact on your main server.
However, there is a very important issue to consider when using a free service to offload your images. Since most of the popular services are actually photo sharing sites, copyright becomes a concern. Be sure to read the service disclaimer and decide if it suits you. Moreover, you may not want your images exposed to the users of the photo sharing site.
Consider that free image hosting services are recently becoming a less viable choice since traffic from them is often blocked by corporate networks.
Amazon Simple Storage Service (S3) is a dedicated static file hosting service on a pay-per-usage basis. With no minimum costs, it might be practical for lower traffic sites which are reaching the peak that a shared or single server can handle.
Amazon Cloudfront uses the Amazon S3 service to provide Content Delivery Network (CDN) functionality for your static files. A CDN is a service which caches your static files on numerous web servers around the world. Providing faster download performance for your users no matter where they are. It's recommended that you use Cloudfront in tandem with S3 and not only S3 alone; the costs are not significantly different.
MaxCDN is a pay-per-usage Content Delivery Network (CDN) similar to Amazon Cloudfront. Among the differences are support for Video-on-demand as well as "mirroring" (no uploading required) of files, although you can upload them if you prefer. Among the most affordable CDN options available, they're able to beat the pricing of competitors like Amazon because MaxCDN is a division of a much larger CDN Provider, serving companies like: SitePoint.com, UserVoice.com, BuySellAds.com, CentOS and others.
Note: Amazon does not provide uptime commitments and also does not support Origin Pull (Mirror) method of service, which is the easiest for publishers to deploy.
SteadyOffload offers a convenient and subtle mechanism to offload static content including images, documents and other binary data. Rather than having to upload files, subscribers' static content gets mirrored transparently to the SteadyOffload cache servers. Additional features such as remote image manipulation and thumbnail creation are provided. On a pay-as-you-go model, subscribers only pay for the bandwidth they utilize.
- Using Amazon S3 / Cloudfront to offload images: Amazon S3 and CloudFront with Wordpress, How to make your blog independent from your hosting
- Tutorial on Offloading Images from WordPress
- Reducing Your Website's Bandwidth Usage