Information Technology Reference
In-Depth Information
CDNshaveextremelylarge,fastconnectionstotheinternet.Theyhavemorebandwidth
to the internet than most web sites.
CDNs often place their cache servers in the datacenters of ISPs, in arrangements called
colocation .Asaresult,theISP-to-ISPtrafficisreduced.ConsideringthatISPschargeeach
other for this traffic, such a reduction can pay for itself quickly.
Typically, an image in the middle of a web page might come from a URL on the same
server. However, this image rarely, if ever, changes. A web site that uses a CDN would up-
load a copy of this image to the CDN, which then serves it from a URL that points to the
CDN's servers. The web site then uses the CDN's URL to refer to the image. When users
load the web page, the image comes from the CDN's servers. The CDN uses various tech-
niques to deliver the image faster than the web site could.
Uploading content to a CDN is automatic. Your web site serves the content as it nor-
mally does. A link to this content is called a native URL. To activate the CDN, you replace
the native URLs in the HTML being generated with URLs that point to the CDN's servers.
The URL encodes the native URL. If the CDN has the content cached already, it serves the
content as one expects. If this is the first time that particular content is accessed, the CDN
loads the content from the native URL, caches it, and serves the content to the requester.
The idea to encode the native URL in the CDN URL is quite smart; it means that there is
no special step for uploading to the CDN that must be performed.
Best practice is to use a flag or software switch to determine whether native URLs or
CDN URLs are output as your system generates web pages. Sometimes CDNs have prob-
lems and you will want to be able to switch back to native URLs easily. Sometimes the
problem is not the CDN but rather a configuration error that you have caused. No amount
of marketing material expounding the reliability of a CDN product will save you from this
situation. Also, while a new web site is in the testing phase, you may not want to use a
CDN, especially if you are testing new, secret features that should not be exposed to the
worldyet.Lastly,havingsuchaswitchenablesyoutoswitchbetweenCDNvendorseasily.
CDNsaregreatchoicesforsmallsites.Oncethesitebecomesextremelylarge,however,
it may be more cost-effective to run your own private CDN. Google initially used a third-
partyCDNtoimproveperformanceandachievedanorderofmagnitudebetteruptimethan
it could achieve when it was a young company. As Google grew, it established its own
datacenter space all over the world. At that point Google built its own private CDN, which
permitted it to achieve another order of magnitude better uptime.
CDNs didn't appear until the late 1990s. At that time they focused on static content
delivery for images and HTML files. The next generation of CDN products added video
hosting. In the past, file sizes were limited, but video hosting requires the CDN to be able
to handle larger content plus deal with protocols related to skipping around within a video.
Search WWH ::




Custom Search