[consulting] CDN question and recommendation
Michael Goldsmith
ixlr8 at comcast.net
Mon Dec 14 14:45:35 UTC 2009
To answer your first question, yes. A CDN will ease some of the performance
issues you'll have. But it's not always as simple as that.
The long and short of it, is that it works something like this. These are
just broad strokes, and I'm probably missing some stuff here, but it's
enough to give you the gist of it. OK, you hit a web page from New York.
The web page is hosted in a data center in Dallas, TX. Your request goes
through a bunch of hops through various routers to get to the web server
that hosts the page, it makes the request, and generally, the packets turn
around go back through the same routers to get to your computer. I say
generally, in that sometimes they take alternate paths, but that's beyond
the scope of this explanation.
Generally, this happens very quickly. However, let's say that you were in
London, instead of New York. Your request is going to go through a lot more
hops than it would if you were in NY. This takes longer to load your pages.
Also, if you're serving a lot of static files- images, video- anything that
doesn't change very often, you're pushing out these files over and over
again to each person who's making the request.
So here's where a CDN can make things easier for you. A company, sets up a
bunch of high powered servers all around the world. And when a piece of
content is made available to the CDN, it makes a copy on every one of the
servers. So if you're making a request from London, it looks at
cdn.example.com for the image, instead of example.com, and some fancy DNS
rules tell it to make the request to the CDN server in London, instead of
making the request to Dallas. If it doesn't find the piece of content on
the local cdn server, then it defaults back to making the request from the
server in Dallas. Also, it eases a lot of load off of your web server,
since most of your static files are hosted on other servers, they're not
hitting you for the load and bandwidth on your machine.
There are a bunch of different ways to set this up. The CDN module does a
lot of the heavy lifting on your end to rewrite the urls of images. As far
as which method to use, that's going to depend on how you set up with the
CDN company. Each company does things slightly different, so you'll want to
talk with them to figure out what is the best option. I've found that
they're very helpful and will walk you through the process if you ask them.
You might even be able to set up a reseller account with a specific company,
so you can make some money on referrals.
As far as specific CDN's are concerned, it depends. It depends on how much
data you're pushing, what kind of data you're pushing, etc. Some CDN's
don't care what you're pushing, others have some requirements. It also
depends on how much your client can afford. Generally, larger CDN's tend to
cost more than smaller ones. But they'll probably have more servers on
their network, so they'll be faster. I've found that the rule of thumb is
that you get what you pay for. You can get a CDN that costs about $20/
month. Or you can get one that costs $200/ month, or more. You'll see the
difference, but it really comes down to what your client needs.
Now I said that it's not always as simple as that. The caveat to this, is
that let's say you're in NY, and you're testing your site, and everything
you see is fine. Let's say something gets corrupted, or cached wrong on the
way to the London server, which happens every once in a while. You won't
see what's wrong, because everything you see is coming from the NY server.
That's an extreme case, but dealing with CDN's can sometimes be a bit of a
pain when you're making changes to one of those files, say a CSS file, for
example, and you're clearing your Drupal cache, but the file is just not
updating. You'll bang your head against a wall until you remember that you
have to clear the cdn's cache too, and then the files need to repopulate,
which means a whole bunch of servers are going to be pinging your local
server trying to get this new file while the new copy rolls out through the
CDN, which can take a little while to do. Hope you didn't need to do that
during a peak traffic hour. I'm sure you see where I'm going with that.
All in all, CDN's are great if you can afford them, but there is definitely
a price to pay for it. If your client isn't tech savvy and you're not
managing the site, they might have some difficulty wrapping their head
around the concept, and sometimes there are weird hiccups that takes some
esoteric knowledge to fix. It doesn't happen often, but it's something that
should be noted.
Thank you very much for your time and consideration,
Michael Goldsmith
(732) 619-6865 - mobile
ixlr8 at comcast.net - email
http://www.platypustheory.com <http://www.ixlr8.org/> - website
From: consulting-bounces at drupal.org [mailto:consulting-bounces at drupal.org]
On Behalf Of Christian Pearce
Sent: Monday, December 14, 2009 8:56 AM
To: A list for Drupal consultants and Drupal service/hosting providers
Subject: [consulting] CDN question and recommendation
I have a potential customer that is going to have traffic from around the
world. It is my understanding a CDN will ease a lot of the pain while using
the site. First is this true? Second I plan on using this module
http://drupal.org/project/cdn, I imagine origin pull is going to be the best
method. Does anyone have experience using this? Can you make a
recommendation for a particular service to use?
--
Christian
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 9.0.716 / Virus Database: 270.14.107/2564 - Release Date: 12/14/09
02:37:00
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.drupal.org/pipermail/consulting/attachments/20091214/4358c145/attachment.html
More information about the consulting
mailing list