Home > Programming, Servers & Scripts >

Rackspace CDN Slower Than Dedicated Server (16)


04-06-2013 06:11 AM #1 mi6430 (Member)
Rackspace CDN Slower Than Dedicated Server

Hi Guys

I just signed up with Rackspace Cloud CDN and tested some image load times and it was much slower than loading the same images from my Dedicated Server. I don't see the purpose of using a CDN to load images and CSS if your on a dedicated server. What do you guys think?


04-06-2013 07:00 AM #2 zeno (Administrator)

The point of a CDN is really for international distribution. If your server is in X country then a CDN is probably not going to be much faster loading in X country, in many cases I think it can be slower because of the extra connect times to another server vs loading from a local dir.

If you are sending traffic from South Africa and your server is in the US... well a CDN is probably going to out-perfrom your dedicated for static content in that situation.


04-06-2013 10:43 AM #3 caurmen (Administrator)

Yep, exactly.

I'd go so far as to say that a CDN will usually be slower than a regular VPS or dedicated server if the VPS/dedi server is in the same country as the person requesting the content from it. It's only if your server is in another country or on another continent that a CDN - which is designed to have servers all over the world - becomes faster.

To give you a specific example I've been testing recently: a simple landing page app running on Google App Engine (which is essentially on a CDN by default) has about a 400ms load time from the US. If I buy another US server and put my LP on that, I can get load times below 100ms.

However, if I load that Google App Engine page from Shanghai, Brisbane, Sao Paulo or Prague, it'll still load in about 400ms. My page on a US server, by contrast, may take up to 2 seconds to load from some of those locations.


04-06-2013 01:09 PM #4 polarbacon (Moderator)

cdn's do make a diff but you have to make sure pages are built for them....


I have seen very few cases where across the board CDN's aren't faster.....

for example....

if you server is in Cali and someone in NY tries to load you page....there is absolutely no reason why a cdn shouldn't be faster...it has nothing to do with the loading of images....It has to do with the latency of the internet.....and the cashing that the CDN provides....

the latency between coasts of the US is gonna be in the 100-200 mil range....while loading from a CDN edge location in NYC is gonna take about 20-30 mil ....and do remember its not just 1 request its like most lps make multiple requests,....so you could be saving quite a bit of overhead....by removing that latency entirely...aka the CDN

as far as setup is concerned.....you have the choice of push or pull zones.....

if you setup a push zone then all your content is "pushed" to servers....if you setup you pages correctly like they are 100% fully hosted off the CDN....there is no way your dedi will load faster on avg unless your connecting to the dedi from a location that is very close to the dedi....aka doing a speed test from dallas and the dedi is located in dallas....

if your doing PULL zones it take a while before all of your content is PULLED to the CDN edge locations.....keep this in mind when your testing fresh pages....like pages you just made or uploaded to your server

the other point here i will make is your server under load.....remember your dedi doesn't only load html it does all of your tracker shit as well.....as you increase in requests you will get more and more timeouts.....one of the biggest advantages of a cdn are just offloading those requests to a different server entirely (the cdn).....


there is about 0 reason not to do inline CSS for what we do....our pages on avg are very very basic....and all it does it ad an additional request that in my opinion isn't needed....I know that sounds counter to all that is holy in HTML and yes my code looks like shit and amateurish.....but fuck that....every test I have done shits loaded faster when the CSS is in the HTML .....and I eliminate and entire request.....

also since many of us use PHP on pages to do things....CDN + PHP = suck......CDN's aren't meant to run PHP the request gets forwarded back to the server (if you using the CDN as a PULL zone) ......so you for the fancy smanchy web stuff you need to do you need to use JS instead of php so it can be loaded off the CDN and run client side....or you need to eliminate the fancy smanchy stuff.....


04-08-2013 11:03 AM #5 caurmen (Administrator)

@polar - interesting stuff!

there is about 0 reason not to do inline CSS for what we do.
Yes, yes, a million times yes. Unless you've got some kind of super-funky repeated-visit funnel, inline CSS all the way!

if you server is in Cali and someone in NY tries to load you page....there is absolutely no reason why a cdn shouldn't be faster
I'm very interested in this, because my hunch was exactly the opposite. Given the minimal latency across the US if you've bought a VPS that's intelligently located (I managed to get a VPS with a maximum 70ms latency to any major US city for my follow-along, for example), and given that a CDN has to do more lookups and processing than just linking straight to a simple domain, I'd have assumed that the situation would be exactly the reverse of what you've described.

Would you mind if I do a benchmark on this, using a well-set-up single domain and, say, the Rackspace CDN? I'd be very interested to see the results.

remember your dedi doesn't only load html it does all of your tracker shit as well.
Yes, very true. To be honest, I'd recommend a completely separate box for your tracking most of the time - and in an ideal world, a separate box again for the database as opposed to the rest of the tracking code.

I'm actually working on a tracking solution that gets around the high load problem almost completely, but it's in the early stages right now.


04-08-2013 11:36 AM #6 szmudo (Member)

Quote Originally Posted by caurmen View Post
I'm actually working on a tracking solution that gets around the high load problem almost completely, but it's in the early stages right now.
Funny! Me too lol, bit further in tho, alpha almost complete


04-08-2013 04:47 PM #7 rafael (Member)

I remember from my adult webmaster days, most of the TGP and traffic trading scripts were written in C for maximum speed. I wonder if the performance gains from writing scripts in C are now null because of the increase in CPU power.
I mention this because I was thinking that there might be a market for new tracking scripts and one of the adult guys could write one easily.


04-09-2013 02:43 AM #8 szmudo (Member)

Honestly, if it's compiled or not makes no difference since we track http requests, there are many other bottlenecks than the speed of the code execution. PHP might be slower in benchmarks, but in the real world it makes zero difference in this usage case.


04-09-2013 10:51 AM #9 caurmen (Administrator)

Indeed - PHP execution is a matter of a few milliseconds. It's far more interesting and important to track the CPU/memory load for each language.

Database access times, on the other hand...


04-09-2013 08:32 PM #10 BeyondHosting-Tyler (Member)

Rackspace cloud services in general are hype and low performance... I've yet to see rackspace do anything faster. Their network sure as hell isn't impressive. 100M ports are still bleeding edge technology over there. Were offering 10G to customers!


04-10-2013 10:47 AM #11 caurmen (Administrator)

OK, I'm setting up a benchmark between CDN and single server in the continental US! Watch this space for the post!


04-11-2013 06:28 AM #12 mi6430 (Member)

Great cant wait


04-17-2013 06:42 PM #13 MJDUB (Senior Member)

Quote Originally Posted by caurmen View Post
OK, I'm setting up a benchmark between CDN and single server in the continental US! Watch this space for the post!
Any updates on this? I'm incredibly anxious for the results.


04-19-2013 10:46 AM #14 caurmen (Administrator)

Snowed under at present, but I've talked to some people and I'm going to attempt to schedule this as soon as possible. I'll try and get 'em done before the F5 Meetup in May!


04-20-2013 03:44 PM #15 BeyondHosting-Tyler (Member)

Quote Originally Posted by caurmen View Post
Snowed under at present, but I've talked to some people and I'm going to attempt to schedule this as soon as possible. I'll try and get 'em done before the F5 Meetup in May!
Y U NO reply EMAIL?


04-22-2013 01:37 PM #16 caurmen (Administrator)

Yeah, sorry about that, Tyler! I'm adding you on Skype literally right now, and we can sort out the details ASAP!


Home > Programming, Servers & Scripts >