• 赤色のリンクは、まだ日本語Codexに存在しないページ・画像です。英語版と併せてご覧ください。(詳細

このWikiはいつでも誰でも編集できます

WordPress の最適化/オフロード

提供: WordPress Codex 日本語版
移動先: 案内検索

この記事は WordPress の最適化シリーズの一部です。

オフロードとは、ロード(負荷)をオフにする(外す)という意味で、サーバーの処理を分散させてレスポンスを高速化するためのテクニックのひとつです。オフローディングと呼ばれることもあります。

静的コンテンツ

静的コンテンツはすべて、他のサーバーにオフロードできます。例えば、静的画像・JavaScript・CSS ファイルは他のサーバーに移すといった方法です。これは非常に高パフォーマンスのサイトで一般的なテクニックです(例: Google、Flickr、YouTube など)が、ひとつのサーバーでは裁ききれない状態の小さなサイトでも役に立つでしょう。また、これらのコンテンツを他のホストネームに移動することで、将来的に複数サーバーに移行する土台を作ることできます。

特に静的ファイル向けに最適化されている publicfilelighttpd などの Web サーバーもあり、Apache などのより複雑な Web サーバーよりもかなり効率的にファイルを処理できるでしょう。

複数のホスト名

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.

Likewise any static javascript and CSS files can be offloaded to separate hostnames or servers.

フィード

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.

外部リソース

最新英語版: WordPress Codex » WordPress_Optimization/Offloading最新版との差分

このページ「WordPress の最適化/オフロード」はまだ書きかけで、情報が不足しています。続きを書いて WordPress を手助けしましょう.


このページ「WordPress の最適化/オフロード」は未翻訳です。和訳や日本語情報を加筆してくださる協力者を求めています