PDA

View Full Version : /clientscripts over to Amazon S3/Cloudfront?


imported_silkroad
08-05-2009, 12:58 PM
We have moved most of our static images over to Amazon Cloudfront/S3 content delivery network (CDN) over the past few months with good results.

Now, I am considering moving all the vB clientside Javascript in the /clientscript directory over to Cloudfront as well.

Anyone else using a CDN for the JS in the /clientscript directory?

Any issues other than keeping in sync with updates anyone can think of?

R1lover
08-05-2009, 01:26 PM
Why would you want to do this?

imported_silkroad
08-05-2009, 01:32 PM
Why would you want to do this?

Because these (clientside) scripts account for (approx) 1/3 of the traffic, so moving them to a CDN will reduce the load on the server and also increase performance (just as it did when we moved most of all the static images).

kmike
08-06-2009, 01:31 PM
You should consider adding "Expires" HTTP header to .js files, so the user browsers won't have to re-check these files for updates on every page load. And by the way, the same could be done for the static images.

For the record, .js files (with the Expires header) account for 0.9% of our bandwidth usage. Forum images take another 1.20%.

R1lover
08-06-2009, 01:45 PM
I would think putting your money in a better setup/server is better then putting your money into another host, in this case the cloud setup.

I agree that static images and .js have little to no impact on any of my servers or sites.

There is more to be had with a good server and proper setup.

imported_silkroad
08-06-2009, 01:56 PM
I would think putting your money in a better setup/server is better then putting your money into another host, in this case the cloud setup.

I agree that static images and .js have little to no impact on any of my servers or sites.

There is more to be had with a good server and proper setup.

We have a good server and have run benchmarks with Amazon S3/CF. You cannot get the same global performance from a single server or local cluster than you can with a global CDN.

While your "opinion" is valuable. It is also incorrect because we have alread run the performance numbers and know the gain realized from the global Amazon CDN.

OBTW, Amazon CloudFront services are not "another host", so it seems you enjoy an "opinion" about something you do not understand. CloudFront is a Content Delivery Network with (seven I think, at last count) global geographic locations. It is not a hosting solutions.

We run over 500 metrics on our configuration and know the performance better than an uninformed third party who, frankly speaking, is just "hip shooting".

In fact, in the vBSEO forum, there are a number of users, like us, who server static content off the main server. Some use other hosts, others, like us, use a global CDN.

Sorry to be so direct. Facts are facts.

Cheers.

R1lover
08-06-2009, 02:06 PM
Not wanting to argue here, but if they are storing your images and then serving them and you are paying for this service, then in fact they are a host... lol

The only benifit I an see is one that you mentioned, being globally located for faster service to people on the other side of the world.

Other then that you are still paying for something you should be able to do yourself.

This all changes as the size of the forum has a large impact on these things as well, but since you didn't mentione this I went with what the aerage user would need and this service for the average user is useless imo.

imported_silkroad
08-06-2009, 03:01 PM
Let's not argue, because you are shooting from the hip and will just keep shooting yourself in the foot my friend :-) I posted here, not do debate performance, but to look for configuration issues related to vBulletin, but I was able to work with the folks on the vBSEO board to fine tune all those issues.

Here are some published data related to CF/S3 performance, you can review yourself.

Amazon CloudFront / S3 Small Object Test Result (http://www.unix.com/virtualization-cloud-computing/112210-amazon-cloudfront-s3-small-object-test-results.html)

Huge client side gains for using CloudFront (across the board), some as high as 95% improvement.

On a different note, related to server side apache GETs (which effects apache workers, load, etc.)

As I posted earlier in this ill-fated thread, our /clientscript traffic accounted for 30% of all our GET requests (before I moved them to S3/CF yesterday). (The static gifs are mostly gone off the server and were already served from CF globally).

Regarding the reason I posted here, I was not looking for a performance discussion, as I know the performance intimately, serving millions of PVs per month.

We are all set now..... We had a very useful discussion over at vBSEO on this.

Cheers.

motowebmaster
08-07-2009, 01:51 AM
I would be interested in the outcome of this strategy.

imported_silkroad
08-07-2009, 12:27 PM
I would be interested in the outcome of this strategy.

The basic outcome has already been published:

Amazon CloudFront / S3 Small Object Test Result (http://www.unix.com/virtualization-cloud-computing/112210-amazon-cloudfront-s3-small-object-test-results.html)

I can confirm that moving the /clientscript also results in better server performance, especially if you have a lot of .js code (from mods, plugins, etc.).

Globally, pulling static objects like images and Javascript results in faster response time for end users (unless they are next to the server, of course, see results above), decreased Apache workers, decreased bandwidth (out from the main server, increased at CF/S3 of course) and a decrease in load average (load results depend on a number of factors and is not easily qualified).

Please note that vB/Jelsoft uses the same strategy (for a long time) in the Server Settings and Optimization Options:

Use Remote YUI
YUI (Yahoo! User Interface Library) script files are hosted locally on your server, you may however have them served from Yahoo's own servers, saving you some bandwidth and potentially decreasing load times.

So, you can see that Jelsoft/vB already use this strategy for the YUI scripts to increase performance, etc. Using a global CDN (like Amazon S3/CF, Limelight, etc). for static content (images, clientside scripts, etc) is the same strategy (but on a larger scale).

:-) Maybe we can convince Jelsoft to serve their scripts in S3/CF and permit all vB customers to pull from the global CDN as part of the license :-)

Webcams
08-23-2009, 04:56 PM
Not knowing all of the fine details involved, is it difficult to set-up to work through vbulletin?
Is the process very intense and is it easy to set-up & test before you actually 'launch' the cloud?
I have set-up the vbulletin to work on my shared server with very few problems I just don't know if this is going to be very intense, or a matter of simply uploading the files to amazon and it will serve them.

Are there timeout issues when the local amazon server is serving images and such quicker then the main server is handling the rest of the process? I am afraid of users timing out on posting new threads and replies.
Sorry if this is to simple minded but I want the best experience for my visitors even if I don't possess the knowledge others do.

royo
08-23-2009, 05:02 PM
There's no advantage to the cloud when compared to regular servers, in fact you will overcomplicate yourself having to learn how that specific cloud works and adapt to it's limitations, and learn how to scale with it. Pricing wise, the bandwidth is very expensive, and will be cheaper to go with a server.

imported_silkroad
08-23-2009, 06:15 PM
There's no advantage to the cloud when compared to regular servers, in fact you will overcomplicate yourself having to learn how that specific cloud works and adapt to it's limitations, and learn how to scale with it. Pricing wise, the bandwidth is very expensive, and will be cheaper to go with a server.

This is definately not the case.

We use S3/CF on a site with around 4M PVs per month, and found using S3/CF was so easy to set it, it was almost trivial, and our users notice faster downloads.

In addition, a good server, no matter how gigantic, cannot outperform a globally distributed content delivery network (CDN) which is what Amazon CloudFront is.

I think Mr. Royo is confusing "cloud computing" with Amazon's CloudFront, which is a global CDN, not a "cloud computing infrastructure".

In addition, I am not posting from "theory", we actually run it, serving millions of users each month from over 200 countries :cool:

tpearl5
08-23-2009, 09:43 PM
silkroad - I recently moved just about all my js files and images to amazon s3 w/ cloudfront - results are good so far. This took an additional 4-5gb a day off of the database server (where they were previously being served)

Basically all I did is search templates for "clientscript" and added the CNAME I created for cloudfront in front of /clientscript

I would like to figure out how to move avatars and other 'dynamic' images over to s3. I read through this thread wich looks like didn't result in much: http://www.vbulletin.com/forum/showthread.php?t=302300

RedWingFan
08-24-2009, 12:28 AM
I posted my experiences with CDN in that thread.

I used replacement variables rather than change the templates, and am using SimpleCDN on a test basis for now. I've noticed the bandwidth usage drop, so I know it's working.

On our server, avatars are in /forums/images/customavatars, so they are served by the CDN thanks to my directing the entire /images directory to SimpleCDN. The difference, though, is that SimpleCDN uses a "mirror" type of delivery where, if an image is requested from the CDN, and it is not cached there, it will grab it from the server. That is why I can safely push the avatars to visitors via SimpleCDN.

I don't know if Amazon has any mechanism like that, or if you could use something like rsync with your avatar directory to an extent where new avatars would appear after a short delay. (If I did it, I would change text to tell visitors that their new avatar would be active within five minutes, and have cron run rsync every five minutes to push the files out to the CDN.) Not ideal, of course.

Just some random thoughts (from a mind that is currently half awake ;) ).

tpearl5
08-24-2009, 02:04 PM
I actually saw your post, redwing, and thought a replacement variable is a better idea. I don't believe Amazon has a mirror type system like SimpleCDN. It may be even simpler for that reason.

RedWingFan
08-24-2009, 02:25 PM
I'm curious about the Amazon solution, so I'll be reading up on that in the future. (I have too many projects going on right now to think about it.) For our purposes, SimpleCDN's service works well enough, and it's low-maintenance enough that I don't have to worry about setting anything up to sync our images between the forum and CDN. (We're all volunteer, so the less time I have to spend on it, the better. ;) ) Even so, it's a bargain. My "free" $15 lasted quite awhile, at least 6 weeks or so.

imported_silkroad
08-24-2009, 04:33 PM
I posted my experiences with CDN in that thread.

I used replacement variables rather than change the templates, and am using SimpleCDN on a test basis for now. I've noticed the bandwidth usage drop, so I know it's working.

Yes, we noticed a drop in bandwidth usage (of course) and also a faster user response time, especially our users in Asia Pacific where there Amazon CF has CDN nodes:


United States

Ashburn, VA
Dallas/Fort Worth, TX
Los Angeles, CA
Miami, FL
Newark, NJ
Palo Alto, CA
Seattle, WA
St. Louis, MO

Europe

Amsterdam
Dublin
Frankfurt
London

Asia

Hong Kong
Tokyo



On our server, avatars are in /forums/images/customavatars, so they are served by the CDN thanks to my directing the entire /images directory to SimpleCDN. The difference, though, is that SimpleCDN uses a "mirror" type of delivery where, if an image is requested from the CDN, and it is not cached there, it will grab it from the server. That is why I can safely push the avatars to visitors via SimpleCDN.

Whoooo, that is very nice! I like that feature very much. The issue we had (have) with SimpleCDN is that they do not have international nodes. We like the Amazon CF CDN because of their 8 CDN nodes in the US, 4 in Europe and 2 in Asia (and they continue to expand and add more). I would consider SimpleCDN if they had a global reach like CF.

I don't know if Amazon has any mechanism like that, or if you could use something like rsync with your avatar directory to an extent where new avatars would appear after a short delay. (If I did it, I would change text to tell visitors that their new avatar would be active within five minutes, and have cron run rsync every five minutes to push the files out to the CDN.) Not ideal, of course.

Yes, there are plenty of command line tools to update Amazon S3 and sync the images between CF/S3 and the server. We currently don't do it, but might consider it in the future. I like the SimpleCDN method on pulling missing files from the original server. That is very nice. So, I'll take this up with Amazon CF.

Cheers.

--------------- Added 1251136521 at 1251136521 ---------------

I actually saw your post, redwing, and thought a replacement variable is a better idea. I don't believe Amazon has a mirror type system like SimpleCDN. It may be even simpler for that reason.

We user RR for this.. Worked great.

--------------- Added 1251137222 at 1251137222 ---------------

Another alternative, of course, is to use mod_rewrite and 301 over to the CDN of your choice, and not bother with editing templates or adding RRs.

..... FWIW

--------------- Added 1251139047 at 1251139047 ---------------

FYI:

http://developer.amazonwebservices.com/connect/thread.jspa?threadID=35547

RedWingFan
08-24-2009, 05:39 PM
Whoooo, that is very nice! I like that feature very much. The issue we had (have) with SimpleCDN is that they do not have international nodes. We like the Amazon CF CDN because of their 8 CDN nodes in the US, 4 in Europe and 2 in Asia (and they continue to expand and add more). I would consider SimpleCDN if they had a global reach like CF.

I think SimpleCDN had one or two in Europe, but I don't remember exactly. But, they did have plans for expanding in the near future, so I'm sure they'll have more resources as time goes on. I figured that having even just a couple of servers spread around the U.S. was better than our single web server, which serves from only one location. Most of our traffic is U.S./Canada based, with a sizeable chunk from Europe, but we only have just a few visitors from elsewhere in the world.

SimpleCDN calls ours a Mirror Bucket. $0.039 US per GB of transfer, with no other fees for storage or setup. So last week, it cost us a whole $1.56 to deliver just over 40GB of files. Now you can see why we like it. ;) Since I have some usage stats, I should compare the costs to Amazon CF.

One thing some users may not like is that SimpleCDN is evolving...quickly. When I signed up over a month ago, the services had different names, but now they have reverted back to their "bucket" naming for their service levels. Their pricing has changed for Mirror Buckets too, although in a good way: once you deliver so much content, your pricing drops to a lower tier. My only fear is that there will be a price JUMP, and knock it out of affordability. But heck, they give you $15 in "play money" to try it out for free. That's why I'm not ruling out Amazon--if anything should happen and we need to host these files somewhere else, I'd like to be prepared with a backup plan.

imported_silkroad
08-24-2009, 05:49 PM
AWS CF charges in many ways ways:

(1) Uploading files to S3 storage (bandwidth).
(2) Pulling from CF to S3 (bandwidth and per request) and
(3) Pulling from the CF CDN (per request and bandwidth).

There are probally more charges. AWS CF/S3 is not cheap.

I wonder if there is a price comparision on the net?

--------------- Added 1251143701 at 1251143701 ---------------

I was checking.... I think I'm going to give SimpleCDN a try and compare with Cloudfront...

Thanks for the tip about "Mirror Bucket" :)

--------------- Added 1251149179 at 1251149179 ---------------

On our server, avatars are in /forums/images/customavatars, so they are served by the CDN thanks to my directing the entire /images directory to SimpleCDN. The difference, though, is that SimpleCDN uses a "mirror" type of delivery where, if an image is requested from the CDN, and it is not cached there, it will grab it from the server. That is why I can safely push the avatars to visitors via SimpleCDN.


OK, I see, you are 301'ing your entire image directory :-)

That explains how you get the customavatars in the CDN. I searched the templates and the phases and could never find how to set a CDN URL for avatars (and a few other hard coded image paths).

I don't understand why Jelsoft hard coded the customavatar domain as the forum domain and made it necessary to 301 those over to a CDN :(

RedWingFan
08-24-2009, 09:01 PM
OK, I see, you are 301'ing your entire image directory :-)

That explains how you get the customavatars in the CDN. I searched the templates and the phases and could never find how to set a CDN URL for avatars (and a few other hard coded image paths).

At first I was editing the templates, but then when I wanted to try getting /clientscript over to the CDN, I discovered replacement variables. From that point on, I went in and changed my templates back to their original directories, then redirected the entire /images directory to CDN using the replacement variables. That also solved the issue with avatars. (My "recipe" is in that thread linked above, but I could repost it here. It was just a handful of entries in replacement variables.)

I have not attempted attachments, though, as we don't have a direct URL that we access them with. (They are stored in the filesystem, however.) I'm sure there's something in vB's code I could modify to retrieve images from the CDN, but since we're just doing this on a trial basis, I'm not that motivated yet.

I don't understand why Jelsoft hard coded the customavatar domain as the forum domain and made it necessary to 301 those over to a CDN :(

I think I asked that very question on vb.com when I was looking for a way to change the avatar directory, and came up empty. And I think someone from vB's staff pointed me to the replacement variables which, at that point, I had no clue as to what they did, or how they worked. Had I known... ;)

imported_silkroad
08-24-2009, 09:18 PM
Default setup for custom avatars is in /customavatars ..... (if you don't change it in the CP) so you would have to either (1) move the user avatars over to the image directory and 301 everything in images or (2) 301 custom avatars, or (3) use RR and replace $post[avatarurl] with http://yourcdn.net/$post[avatarurl]

Anway, I'll read your post where you outlined how you did it....

We used RR for /clientscript when we moved to AWS Cloudfront, then we changed the StyleVars in the templates for the style images. I hand coded a new phrase $vbphase['cdn_image_bucket'] and put that in a few places.....

Guess I'll RR or 301 the custom avatars over to SimpleCDN and give it a go :-)

--------------- Added 1251153995 at 1251153995 ---------------

Note, for customavatars in postbit you can either use an RR or edit the template to change:

<img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" />

To

<img src="$vbphrase[image_bucket_url]/$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" />

Assuming you have your CDN URL in $vbphrase[image_bucket_url] .....

Cheers.

tpearl5
09-01-2009, 03:50 PM
FYI, I managed to trim a couple more seconds off page loads by modifying this:
http://www.vbulletin.com/forum/showthread.php?t=306573

If you wanted to you could add a line in there to make the css file read off of a dynamic bucket simplecdn. This way you wouldn't have to upload a new css file every time you want to change something:


// HACK : START : CSS AS LINK
if ($vbulletin->options['storecssasfile']) {
$cssfilename = 'http://cdnlink.com/clientscript/vbulletin_css/style-' . $adblock_is_evil . '-' . str_pad($styleid, 5, '0', STR_PAD_LEFT) . '.css';
$fullcsstext = '<link rel="stylesheet" type="text/css" href="'.$cssfilename.'" /><link rel="stylesheet" type="text/css" href="http://cdnlink.com/clientscript/vbulletin_important.css?v='.$vbulletin->options['simpleversion'].'">';
}
// HACK : END : CSS AS LINK


but then, like mentioned the WYSIWYG editer doesn't work correctly - I can't figure that one out.

imported_silkroad
09-01-2009, 04:31 PM
If you wanted to you could add a line in there to make the css file read off of a dynamic bucket simplecdn. This way you wouldn't have to upload a new css file every time you want to change something then, like mentioned the WYSIWYG editer doesn't work correctly - I can't figure that one out.

We pull the CSS files from SimpleCDN without any issues at all. The reason is that SimpleCDN has the concept of "Mirror Buckets" so if a file is requested from the CDN and does not exist in the CDN cache, it will get the missing file from the origin-server.

Because of the excellent ways to use SimpleCDN Mirror Bucket, we have moved completely off Amazon CloudFront/S3. You might find this post interesting (more details about Mirror Bucket):

On Demand Files for "Cache Hit" Misses for CF/S3 - Feature Request (http://developer.amazonwebservices.com/connect/thread.jspa?threadID=35547&tstart=0)

tpearl5
09-01-2009, 05:33 PM
Right - are you sure your WYSIWYG editors are working properly?

If you don't use $style[css] at all in headerinclude, css for the editors and vbulletin_important.css do not load. The code above partially corrects this, but for some reason my (and I believe other's) editors don't load a block of css when the main css is hosted on a CDN. I've tried serveral different things with no solution to getting the editor to load properly.

imported_silkroad
09-01-2009, 06:00 PM
Yes, all everything is fine. We have been running in this configuration for nearly a week, no problems at all.

I did have to manually edit some of the Javascript and CSS files.

The way I did it was to simply look at the Apache2 log files and look for any "oddities" or 404 errors from the CDN and then track down the problem and fix it.

One of the "beauties" of Mirror Bucket is that you can see the 404 errors on your Apache server when it tries to grab a file that is missing from the CDN.

When I was debugging, I ran a tail -f on the Apache log file and used grep (egrep with regular expressions, actually) to fine tune the JavaScript paths in the templates and CSS files.

It works, absolutely, but it take a bit of analysis to track down all the hard coded paths in the vB templates, JS and CSS file includes.

Having said that, I think we might have to edit the CSS files manually if we make a change to a vB style, but this is not an issue for us, since we don't change the style CSS often.

--------------- Added 1251831991 at 1251831991 ---------------

As I recall, I used phpMyAdmin to edit the css field in the style table.

PS: I forgot to mention, I don't think we use a WYSIWYG editor, we just use the standard (Advanced and Quick Reply editors - the same editors here in this forum).

Maybe that explains it?

--------------- Added 1251832273 at 1251832273 ---------------

Ah! Sorry, We are not pulling this file from the CDN:

[01/Sep/2009:20:10:10 +0100] "GET /clientscript/vbulletin_important.css?v=374 HTTP/1.1" 200

Maybe that's the reason.... I think that is one of the few files I have not moved to the CDN

tpearl5
09-01-2009, 06:12 PM
PS: I forgot to mention, I don't think we use a WYSIWYG editor, we just use the standard (Advanced and Quick Reply editors - the same editors here in this forum).

Maybe that explains it?

Yeh, that would explain it - to be more specific the class "wysiwyg" doesn't load when the main css is not on the same server. Really strange. I can't track down where this class is coming from.

Ah! Sorry, We are not pulling this file from the CDN:

[01/Sep/2009:20:10:10 +0100] "GET /clientscript/vbulletin_important.css?v=374 HTTP/1.1" 200

Maybe that's the reason.... I think that is one of the few files I have not moved to the CDN
that file doesn't contain the wysiwyg class, but it does have a couple others.

imported_silkroad
09-01-2009, 06:16 PM
OK, I checked the logs again for you....

The only CSS file that is not pulled from the CDN (currently) is ... (interestingly enough!)


/clientscript/vbulletin_important.css

--------------- Added 1251832733 at 1251832733 ---------------

Yeh, that would explain it - to be more specific the class "wysiwyg" doesn't load when the main css is not on the same server. Really strange. I can't track down where this class is coming from.

It can be found in the css field of the style table in the dB.

What we did was use the search function in phpMyAdmin to track down these guys.

Accidentally, this is the only file we did not manually edit or change a stylevar or use a RR, etc.

imported_silkroad
09-01-2009, 06:21 PM
See attached.... screen shot ....

tpearl5
09-01-2009, 06:34 PM
Right - the code above (https://vborg.vbsupport.ru/showpost.php?p=1877851&postcount=23) actually points the hard coded location of vbulletin_important.css to a different location as well.

However, "wysiwyg" class is not contained in that file. This is what it looks like:

.wysiwyg {
-moz-background-clip:border !important;
-moz-background-inline-policy:continuous !important;
-moz-background-origin:padding !important;
background:#F5F5FF none repeat scroll 0 0 !important;
color:#000000 !important;
font-family:arial,helvetica,verdana,sans-serif !important;
font-size:10pt !important;
font-size-adjust:none !important;
font-stretch:normal !important;
font-style:normal !important;
font-variant:normal !important;
font-weight:normal !important;
line-height:normal !important;
margin:5px 10px 10px !important;
padding:0 !important;
}

btw, it's not in vbulletin_editor.css either (path of this can be changed in editor_css template)

Edit: it looks like it's coming out of the database - but that doesn't explain why it won't load when the main css is on a different server.

--------------- Added 1251835311 at 1251835311 ---------------

I think I figured it out - The editor is loaded within an iframe (vB_Editor_001_iframe). It won't load .wysiwyg because it's calling from that iframe and is expecting the class css to be on the root domain.

imported_silkroad
09-01-2009, 07:06 PM
I have been "overly vocal" lately about vBulletin not being "CDN friendly" .... It take a lot of detective work to track down all the hard coded paths to static files.

In addition, if you run vBSEO, vBSEO hard codes a "/" into some of their image rewrites so even when you change a basic vBSEO config var (not all, but one or two) you end up with "/http://... blah blah... "

It is a lot of work to move vB static object to a CDN, so much is hard coded without phrasing or style vars. Some are hard coded in the dB. Some plugins are even worse. I could not get a 100% solution, but I'm happy with the 99% solution for now.

tpearl5
09-02-2009, 11:12 AM
Yeh, I've run into many similar problems. I really wish it was easier to change over attachments.

imported_silkroad
09-02-2009, 07:05 PM
I did not move attachments over yet ... same problem, code not CDN friendly.

john2k
09-09-2009, 01:21 AM
The main goal with CDNs, the way I understand it, is to reduce network latency by reducing the distance between the end user and the content.

CDNs reduce the distance over the wires that the data needs to travel, reduces the number of network hops and helps to avoid your data needing to traverse over congested network equipment (or the chance that it might hit congested equipment on the networks that are skipped).

Reducing latency is very helpful for videos and especially streaming media, which many of the CDN networks like to focus on (more bandwidth income for them with video).

Cloud hosting is defined differently by many hosts. The inconsistency makes it a bit difficult to compare. Not all clouds are the same and not all clouds are also content delivery networks.

imported_silkroad
09-09-2009, 09:23 AM
The main goal with CDNs, the way I understand it, is to reduce network latency by reducing the distance between the end us er and the content..

Actually that is only one "main goal" of a CDN.

We find that using a CDN also significantly reduces the load on the primary server. Here as some example stats from our CDN provider for our site, and this is off peak:

Last 30 Minutes Data Trans: 578.03 MB
Last 30 Minutes Total Hits: 106,167
Last 30 Minutes Hits/sec: 59

Last Hour Data Trans: 1.14 GB
Last Hour Total Hits: 214,881
Last Hour Hits/sec: 60

Last Day Data Trans: 19.73 GB
Last Day Total Hits: 3,739,688
Last Day Hits/sec: 43

Last Week Data Trans: 108.18 GB
Last Week Total Hits: 21,048,256
Last Week Hits/sec: 35

Taking 43 hits per second off any server improves performance. So, CDNs provide both better delivery globally, and better origin server performance.

Also, there is a huge difference between "the theory of using a CDN" and actually using one. I find it a more-than-funny having folks who do not use a CDN to be explaining to me, using a CDN that serve over 20 million objects a week, the benefits of a CDN.

kmike
09-09-2009, 02:02 PM
Taking 43 hits per second off any server improves performance. Just a quick note that 43 hits per second for a seldom changing and relatively small (a few hundred of megabytes in total) static content is nothing for the modern multiplexing web servers such as nginx or lighttpd. They are able to serve tens of thousands concurrent connections, effectively solving the C10K problem (http://www.kegel.com/c10k.html). This kind of load may pose a problem for Apache which isn't really suitable for the static content serving, but a few hundred hits per second for the static content residing in the OS cache (so there is no disk I/O) is peanuts for nginx.

Not trying to downplay your accomplishment, just pointing out there is another way to reduce server load - by switching to the more modern web server software.

imported_silkroad
09-09-2009, 07:27 PM
Not trying to downplay your accomplishment, just pointing out there is another way to reduce server load - by switching to the more modern web server software.

No offense taken, don't worry. So please do not take offense to my direct reply.

First of all, you are replying, making numerous assumptions that might be relevant to your site, but not relevant to another site. So please don't be offended, but when I read your reply it seems you are not talking at all to me and our configuration requirements, but are just talking, to make a statement about web server optimization. Why?

Because you are simply promoting a few high performance web servers without considering the bigger picture. For example, did you consider that we may have solid reasons running Apache2 and that make extensive use of mod_rewrite and mod_geoip and other Apache mods?

Did you consider there are real costs of porting an entire site over to another web server that may or may not have the feature we need versus a few dollars a month for CDN services? A discussion about performance trade-offs without considering costs and other trade-offs is simply academic and generally meaningless.

Furthermore, off-loading static content to a CDN reduces the load on any web server. Even if you run nginx or lighttpd (which have have looked at and frankly do not like them) or Apache or anything under the sun, you will gain performance. Less hits means less load on any web server, independent and orthogonal to other server optimizations.

So, my impression to your post, nothing personal, is that you want to talk past me and make technical statements about web server software without considering the bigger picture (O&M, cost-benefit, features, etc.) of our requirements. The bottom line is that if we wanted to run nginx or lighttpd we would be running them. They are not "state secrets" ROTFL. We prefer Apache server for many reasons and yes, we have looked at both nginx and lighttpd. We prefer Apache2.

And.... as I said earlier, it is pointless (and also technically incorrect) for anyone to argue that moving static content off a server to a CDN is good for Apache but not for nginx or lighttpd. It is good for any configuration. The discussion gets muddled when we are discussing apples and someone wants to talk pasta and wheat bread.

So, if you intend to reply to me about CDN benefits and tradeoffs, then please do so. However, if you just want to talk and advocate your favorite web server technology or optimization strategy, that is a difference story. Go ahead, advocate nginx or lighttpd, but that has little or nothing do to with the discussion of the benefits of a CDN. They are orthogonal discussions.

CDNs benefit all configurations and software, modern or antique from the days of iron Gone-Daddy-Gone. Discussions about web server performance optimization, while interesting, are orthogonal to a discussion on the various benefits of moving static content off the server, any server, to a CDN.

Cheers.

john2k
09-09-2009, 09:03 PM
Actually that is only one "main goal" of a CDN.

I agree from an end-user standpoint but was commenting in regards to the business need that most CDNs appear to be working to solve. All of them seem to be focused on bringing the content as close to the end-user as possible in order to reduce network latency. Running fast non-overloaded equipment is pretty much a necessity for them, however there are times when CDN equipment does get overloaded.

They could easily solve the load problem by having a huge cluster of servers & equipment in a single datacenter, but that does not solve the network problem where latency can cause stuttering with streaming media, etc. This is why the CDNs have as many edge locations as possible, in order to address the network issues.

For example, you could host your images anywhere else regardless of quality and that would still reduce the load on your webserver. VPS, another dedicated server or even a clustered file hosting provider such as http://www.blueturbo.com/file-hosting.php Blue Turbo solves the server load issue, but not the network issue as they run a cluster from a single datacenter. The network issues generally are not nearly as significant for images as they are for video, though, which is why Blue Turbo makes sense for many (I considered using them, but I do not).

To see the real power and benefits of a CDN, we can use Highwinds (http://www.highwinds.com/NewsEvents/PressReleases/tabid/77/articleType/ArticleView/articleId/5/Highwinds-Streams-Live-Inaugural-Coverage-to-Its-Largest-Audience-to-Date.aspx) for an example. They streamed coverage of the presidential inauguration to a peak of 625,000 concurrent visitors using 310Gbps bandwidth. They could have done this from a single datacenter, but the viewing would not have been optimal for some viewers due to the network issue.

In my opinion, that's what CDNs are really being created for. But, I use a CDN for basically the same reason as you. Last month I offloaded just under 50 million image views to a CDN. The sole reason that I began using a CDN wasn't about the network latency benefit but was to reduce load on my webserver until my new server is built & colocated. Even after my new server is online I might keep images running from a CDN but am not certain about that just yet.

imported_silkroad
09-09-2009, 09:22 PM
I use a CDN for basically the same reason as you. Last month I offloaded just under 50 million image views to a CDN. The sole reason that I began using a CDN wasn't about the network latency benefit but was to reduce load on my webserver until my new server is built & colocated. Even after my new server is online I might keep images running from a CDN but am not certain about that just yet.

Actually we use a CDN for a number of reasons (not one reason).


Global delivery from the CDN network (network performance, end user experience globally)
Deliver static content from "other than" origin server (server performance, user experience globally) reducing load (CPU, memory, and device IO) on origin-server.
Network robustness, more secure, content delivered from many nodes globally, not one node or a geographic cluster.


When I started this thread I was using Amazon CloudFront, but now we have ported to SimpleCDN. CloudFront performance is much better than SimpleCDN, but SimpleCDN is much, much cheaper, the near-real time stats are better, cache control is better and getting non-CDN-cached files from the origin server is much better than the upload to S3 AWS model.

OBTW, SimpleCDN mirror bucket service is now cheaper (and must less work) than most budget web hosting based solutions to server static content (and the mirror bucket concept is better that server-server object sync-based solutions, IMHO)

PS: I am now considering GeoIP-based DNS in the future, for distributing origin servers globally, but there is no rush for this at the moment.

I wish one of the free DNS providers like SiteLutions offered GeoIP-based DNS services. Do you know of any?

Cheers!

--------------- Added 1252535963 at 1252535963 ---------------

To see the real power and benefits of a CDN, we can use Highwinds (http://www.highwinds.com/NewsEvents/PressReleases/tabid/77/articleType/ArticleView/articleId/5/Highwinds-Streams-Live-Inaugural-Coverage-to-Its-Largest-Audience-to-Date.aspx) for an example. They streamed coverage of the presidential inauguration to a peak of 625,000 concurrent visitors using 310Gbps bandwidth. They could have done this from a single datacenter, but the viewing would not have been optimal for some viewers due to the network issue.

RE: Highwinds

Highwinds does not appear to publish their pricing model like Amazon and SimpleCDN.

Also, since we are taking vBulletin forums, most forums serve small images (buttons, attachments, icons, avatars), CSS files and JavaScript (as static content).

Forums are not really applications that serve streaming coverage of presidential inaugurations (that is not really vBulletin). Forums, like vBulletin et al, generally have PHP/MySQL origin-server requirements and static content of small images (avatars, buttons, icons, attachments), CSS files and (clientside) JavaScript.

Bringing massive streaming content requirements into the discussion has very little to with a "normal" vBulletin application, frankly speaking, which would be 99.99+ vBulletin sites.

RedWingFan
09-09-2009, 09:41 PM
It is a lot of work to move vB static object to a CDN, so much is hard coded without phrasing or style vars. Some are hard coded in the dB. Some plugins are even worse. I could not get a 100% solution, but I'm happy with the 99% solution for now.

Did you go the replacement variable route, or did you do something else? I realize that I'm probably missing a handful of files, but at least I have the majority of them on the CDN. My solution may be 95%... ;)

P.S. I'm glad it worked out for you! I, too, like the Mirror Bucket method vs. uploading, as it also takes into account what I'd call "semi static" images like avatars, where members are uploading new avatars all day long. No worries on how to sync them.

In my opinion, that's what CDNs are really being created for. But, I use a CDN for basically the same reason as you. Last month I offloaded just under 50 million image views to a CDN. The sole reason that I began using a CDN wasn't about the network latency benefit but was to reduce load on my webserver until my new server is built & colocated. Even after my new server is online I might keep images running from a CDN but am not certain about that just yet.

One drawback (not really a drawback, but...) is that we have our static files out there on the CDN, served out quickly, but the rest of the site is still hosted on a single server. We really aren't exploring the full capabilities of CDN, but if it's serving our needs and doing what we need it to do, who's to argue? ;)

Something that happened last week sort of left me amazed at how some systems administrators are not using CDNs, that could be. When the Beatles remasters were released to radio last week, using the Play MPE service, you can imagine how bogged down their servers got when everyone started their downloads. To fix the problem, they had their host sell them more bandwidth, and IIRC, they may have also had to beef up their hardware.

If this wasn't an application tailor-made to a CDN, I can't think of another! Flexible bandwidth delivery, available on demand. And I'm sure with so many edge servers, delivery itself would have been faster as well.

While they were all FLAC files, still...figure 14 or 15 CDs worth of FLACs being downloaded by hundreds of radio stations...nothing this big is going to come along in the near future, and they'll find their new configuration is overkill for what they would normally use. More expense. With CDN (or at least SimpleCDN), it's essentially "pay as you go". You pay for what you use. They could have handled the spike without needing to do anything on their end.

But what do I know? I just run a lowly music forum on someone's behalf... :D

imported_silkroad
09-09-2009, 10:04 PM
Did you go the replacement variable route, or did you do something else? I realize that I'm probably missing a handful of files, but at least I have the majority of them on the CDN. My solution may be 95%... ;)

Everything... RRs, template edits, CSS edits, stylevars and manual database edits.... it is really a lot (a LOT) of unnecessary work to move content to a CDN with vBulletin. A few configuration variables (like vB does for YUI), and the vB would be CDN friendly. I worked my you-know-what off, and still think we are only 95 percent there.

Plugins are worse. vBSEO is not CDN friendly (and they don't seem to care either, LOL). Most plugins have hard coded paths as well......:( :(

The good news if that if you need a CDN, that is a "good problem to have" ..... so we can't complain too much can we? On the other hand, it would be so simple for Jelsoft to make vB CDN friendly. (((They add features in their releases that are useless for many of us. We just would like to see some simple CDN friendliness, ROTFL, not a bunch of fluffy suboptimal blogs and very little used social networking features ...... :D )))

RedWingFan
09-09-2009, 11:24 PM
Everything... RRs, template edits, CSS edits, stylevars and manual database edits.... it is really a lot (a LOT) of unnecessary work to move content to a CDN with vBulletin. A few configuration variables (like vB does for YUI), and the vB would be CDN friendly. I worked my you-know-what off, and still think we are only 95 percent there.

That's one reason I went with the replacement variable option: I didn't want to invest a lot of work in something that we were only using on a trial basis, and be too difficult to undo if we decided not to go with the CDN after all. By doing a View Source on the vB pages, I could see all the rewritten URLs, and that is how I solved one of my problems (can't recall if it was clientscript, or CSS, or the avatars).

I agree about the amount of work: one of my wishlist features for vB would be configurable paths, which would apply to CDNs and/or hosting images on other servers. The other wishlist feature would be Sphinx search integration, but that's a whole different topic!

john2k
09-09-2009, 11:36 PM
Actually we use a CDN for a number of reasons (not one reason).


Global delivery from the CDN network (network performance, end user experience globally)
Deliver static content from "other than" origin server (server performance, user experience globally) reducing load (CPU, memory, and device IO) on origin-server.
Network robustness, more secure, content delivered from many nodes globally, not one node or a geographic cluster.


I agree with all of this. What initially got me using a CDN was to offload hosting of static content, as you also mentioned a few times in this thread, in order to increase the performance of my server for the dynamic content. However, everything that you mentioned here might be what keeps me using CDNs even after I upgrade my server.

PS: I am now considering GeoIP-based DNS in the future, for distributing origin servers globally, but there is no rush for this at the moment.

I wish one of the free DNS providers like SiteLutions offered GeoIP-based DNS services. Do you know of any?

I've been using DNSMadeEasy for a while since they have a very robust DNS architechture at a great price, but I do not believe they offer GeoIP DNS services. Even some of the CDNs do not use DNS for redirecting viewers to their edge servers but rather do this per each request, probably using a GeoIP database such as the one provided by MaxMind and dynamically selecting which edge server to redirect the viewer to. This is also good in some cases for the CDNs that can dynamically redirect traffic away from congested nodes.

RE: Highwinds

Highwinds does not appear to publish their pricing model like Amazon and SimpleCDN.

I actually first started using Highwinds via SimpleCDN as they promoted Highwinds' Hurricane service as their enterprise offering. The price was something like 7.9 cents per GB + a small storage fee. Highwinds has roughly twice the number of locations as SimpleCDN and I believe they also peer directly with many ISPs (I think it's something like 900 or so ISPs). Highwinds also has a great stats reporting system. SimpleCDN, afaik, has recently stopped using Highwinds, though.

At this point, though, I wouldn't recommend Highwinds for static images because the way they redirect images to their edge servers causes the images to not be browser cache friendly. It's rarely an issue, because they are usually quite fast, but I still think that more efficient use of the browser cache would speed things up even more.


Also, since we are taking vBulletin forums, most forums serve small images (buttons, attachments, icons, avatars), CSS files and JavaScript (as static content).

Forums are not really applications that serve streaming coverage of presidential inaugurations (that is not really vBulletin).

Bringing massive streaming content requirements into the discussion has very little to with a "normal" vBulletin application, frankly speaking, which would be 99.99+ vBulletin sites.

Of course. I was simply explaining the true design purpose for CDNs and the business need that they were created to address. That is, getting the content closer to end users in order to better address the network issues.

imported_silkroad
09-10-2009, 06:41 AM
I was simply explaining the true design purpose for CDNs and the business need that they were created to address. That is, getting the content closer to end users in order to better address the network issues.

I worked with Akamai and their CDN a number of years ago, long before the new CDN players we have now.

The purpose of CDNs have been to improve content delivery. The "top" established CDNs (like Akamai) use proprietary algorithms to determine the best place to serve content. The best node / location to serve content may or may-not be "closer" to the end user.

Most commercial CDNs do not rely on "closeness" but on a type of global performance map that directs users to the best delivery point, regardless of geographic distance.

So, for well designed CDNs (from the beginning of CDN history), network latency, load, bandwidth, etc were all key criteria to determine where to serve content.

Currently, one CDN I know of is serving EU users from the US because their EU nodes have been under a severe DDOS attack (another advantage of using a CDN in practice).

Cheers.

tpearl5
09-12-2009, 03:00 PM
Can anyone help with this problem: http://www.vbulletin.com/forum/showthread.php?p=1786627 ?

hydn
10-16-2009, 12:41 AM
Can anyone help with this problem: http://www.vbulletin.com/forum/showthread.php?p=1786627 ?
Yup mirror the same files AND the same folder structure as your forum root ON the CDN.

OR create a rewrite

Works like a charm.

tpearl5
10-16-2009, 01:00 AM
it's a little more complicated than that. take a look at the wysiwyg problem

imported_silkroad
10-16-2009, 11:59 AM
OBTW, we have experiencing very bad performance problems with SimpleCDN.

PS: We have been running all js and images thru the CDN (including the wysiwyg clientscript).

RCA
10-16-2009, 05:05 PM
timeouts with SimpleCDN here too, seems origin cache bot wasn't working correctly.

At this moment is ok again.

imported_silkroad
10-17-2009, 05:08 AM
Thanks. We can't even get SimpleCDN to respond to any performance related support tickets. We have noticed they are not reliable and are starting to seek a better provider.

RCA
10-17-2009, 07:16 AM
I got answer on support tickets, but they only tell their systems are ok, and is probably origin server problem (but really it's not origin server problem, yesterday was working perfectly all day, and simplecdn was timing out at lot of requests for new content, for some unknown reason their cache agent was failing).

I have been looking for other cdn providers but bandwidth prices are high or don't have mirror option that is much better than upload for our purposes (avatars, etc).

imported_silkroad
10-17-2009, 03:33 PM
I agree.

The "mirror bucket" feature of SimpleCDN is a "game changer" when combined with their significantly lower bandwidth costs.

Most of SimpleCDNs EU content is delivered from the US, and they don't seem to be able to fix or mitigate the problem (which they say is a DDOS attack because they permit adult content)

It is really strange that SimpleCDN cannot serve EU content from the EU!!!

RWerksman
10-17-2009, 10:20 PM
I experienced the same performance related issues with SimpleCDN earlier this week. Looks to be sorted though, and I plan on continuing to use the service... until the next hiccup :)

imported_silkroad
11-01-2009, 02:16 PM
SimpleCDN tends to hiccup a lot; however, you can't beat the price :-) ... and Mirror Bucket service is a great concept.

RCA
11-09-2009, 11:19 AM
someone experiencing problems again?

imported_silkroad
11-09-2009, 11:29 AM
Yes, SimpleCDN has been not performing well lately.

RCA
11-14-2009, 01:31 PM
other day with problems, time to move out until they get a decent uptime with servers

imported_silkroad
11-14-2009, 02:43 PM
other day with problems, time to move out until they get a decent uptime with servers

Yes, we have serious problems today with SimpleCDN.

What is the next best alternative? Is there another inexpensive CDN with mirror bucket service?

RCA
11-14-2009, 04:28 PM
im moving back to dedicated lighttpd server for static content, not a "content delivery network" but cheaper than simplecdn and working without any problems.

imported_silkroad
11-14-2009, 05:52 PM
We should consider to pool a few of us together and share the costs of something like this, pulling the images and clientscript :)

Well, that is just a dream.. too much work to get a cooperative going... hahahaha.

Good idea to use a dedicated lighttpd server for static content.

Monday I will call the SimpleCDN NOC and let them know they are losing customers due to per performance.

--------------- Added 1258228463 at 1258228463 ---------------

Oh! I forgot to mention.

I have been looking for a PHP script that intercepts a 404 error and fetches the missing file from another web server (creating a type of mirror bucket service for a static content server).

Have you seen or heard of a script like this?

RCA
11-15-2009, 11:28 AM
move completed:

https://vborg.vbsupport.ru/attachment.php?attachmentid=106132&stc=1&d=1258291480


is easy code a php script to capture files from one server and move to others (i do in original upload process), vb 3.x only needs avatars and profilepicture if remember correctly, all other files and images are full static.

imported_silkroad
11-15-2009, 04:12 PM
is easy code a php script to capture files from one server and move to others (i do in original upload process), vb 3.x only needs avatars and profilepicture if remember correctly, all other files and images are full static.

That is not what I asked about.

I specifically said in my post "capture a 404 error on one web server and the retrieve the missing file from another web server...." (and then serve it on the first server, of course).

This is non-trivial.

Kaelon
11-22-2009, 06:07 PM
This is the first time I have heard about SimpleCDN and its game-changing "mirror bucket" feature. I definitely am eager to try this out, as I have just switched our Big Board (1.5 million posts, 40,000 users, around 200-300 concurrent a peak) from a dedicated colo over to the Cloud, and would love to migrate all of our static content off of the server.

imported_silkroad
11-22-2009, 06:15 PM
This is the first time I have heard about SimpleCDN and its game-changing "mirror bucket" feature. I definitely am eager to try this out, as I have just switched our Big Board (1.5 million posts, 40,000 users, around 200-300 concurrent a peak) from a dedicated colo over to the Cloud, and would love to migrate all of our static content off of the server.

Give it a try! We get around 4,000 to 4,200 peak users these days, and are reasonably happy with SimpleCDN, but they do "hiccup" from time to time. In the beginning, their team told me it was because of some DDOS attacks against their EU nodes. They told me all that would be resolved in Sept.

September has come to pass, SimpleCDN will not respond alas!

Wake me up, when November ends :-)

Kaelon
11-23-2009, 01:09 PM
I am definitely going to try an upload bucket and see how things go in the short-term before delving in too deeply.

Do you have a back-up plan for when SimpleCDN is on the fritz? Or does your site suffer, and then basically you're stuck with what has come to pass?

imported_silkroad
11-23-2009, 02:46 PM
Do you have a back-up plan for when SimpleCDN is on the fritz? Or does your site suffer, and then basically you're stuck with what has come to pass?

We CNAME alias our Simple CDN mirror buckets and use a short TTL in the DNS. So, if there seems to be a prolonged hiccup with Simple CDN we just repoint the CNAME to our origin server and bypass SimpleCDN until the problem is fixed.

If you host your own nameserver, you could easily automate this.

Kaelon
11-23-2009, 07:09 PM
We CNAME alias our Simple CDN mirror buckets and use a short TTL in the DNS. So, if there seems to be a prolonged hiccup with Simple CDN we just repoint the CNAME to our origin server and bypass SimpleCDN until the problem is fixed.

If you host your own nameserver, you could easily automate this.

This is fascinating. I've already gotten a single Upload Bucket and created a CNAME alias to point to it, for the specific static stuff that I want to serve. I'm thinking of creating a Mirror Bucket for the dynamic-CDN, but I have a lot of directories that have dynamic content in them:

/gallery/files <-- all of my user uploaded galleries
/forums/customavatars <-- custom avatars
/forums/customprofilepics <-- custom profilepics
/forums/signaturepics <-- custom signaturepics
/forums/thumbs <-- generated thumbnails
/forums/albums <-- uploaded albums
/links/banners <-- uploaded banner images
/forums/images <-- all of my other static forum images

What do you think the best way to create a dynamic-CDN "Mirror Bucket" for these would be? Should I change my hierarchies? So far, SimpleCDN is working like a charm.

imported_silkroad
11-23-2009, 07:18 PM
What do you think the best way to create a dynamic-CDN "Mirror Bucket" for these would be? Should I change my hierarchies? So far, SimpleCDN is working like a charm.

We have to be "speaking the same language" first. I don't know what you mean by "Dynamic CDN" when discussing in terms of Mirror Bucket. Every file can be updated based on the cache configuration of the CDN, and any file not found in the CDN cache will go to the original server to get it.

So, your directory for the CDN mirror will MIRROR your origin site.

We use two Mirror Buckets, one for images and the other for clientscript and CSS files, but that is not necessary and we paid for an extra CNAME alias. That way we could track the usage for the clientscript differently from the images.

It is simply a Mirror, so you can Mirror in as many virtual buckets as you like.

Also, if you need to update some javascript, you can delete the script from the CDN cache in the user admin control panel..... :D

Kaelon
11-23-2009, 07:29 PM
Okay, I think I understand this. So, for example, I could have one mirror bucket that basically mirrors my entire domain, but it will only fetch the content that is requested of it. So, does this mean if it is asked to produce /forums/images/21.gif, it will create the forums and images directories for me, and handle everything on its own? If so, then, I suppoes I should be fine with just one mirror for my entire domain given that I have so much user-generated content spread throughout all of my services.

1. Is there any security with SimpleCDN to prevent hot-linking (and thus, raising your bandwidth bills)?

2. How often do Mirror Buckets refresh or update images? For example, if a user uploads a new signature that overwrites the old one, will it be updated?

3. How do you recommend using the no-cache header linking options for your buckets?

imported_silkroad
11-23-2009, 10:22 PM
1. Is there any security with SimpleCDN to prevent hot-linking (and thus, raising your bandwidth bills)?

No, not at this time.

2. How often do Mirror Buckets refresh or update images? For example, if a user uploads a new signature that overwrites the old one, will it be updated?

If a user uploads a signature, the signature resides in the database, so that is not a CDN issue. The CDN does not work for PHP files that access the database. If you are talking about images in the signature, I think you will find that new signatures, like avatars, get a new (version) number appended in the name of the gif.

3. How do you recommend using the no-cache header linking options for your buckets?

We cache all our image and client content to the maximum number of days. This is configurable in the CDN admin panel. This overrides the no-cache header information in your files, as I recall; I suggest you open a ticket with SimpleCDN and ask them questions about how they deal with headers, cache, etc. That way you get the info directly from them.

RedWingFan
12-10-2009, 07:27 PM
Since our $15 "play money" ran out, I disabled using SimpleCDN for now. I have been monitoring our server CPU loads using Cacti, and there has been NO change in loads since we started serving images from our own server again. BUT, I am positive we would still see a result due to decreased disk I/O and a few CPU cycles, so we may revisit this in the near future when we raise the funds to pay into it. Our $15 lasts at least six weeks, maybe more.

All the while, though, I must say that SimpleCDN worked flawlessly. And my replacement variables are easy to reinstall, so I can be serving images from them again with a minimum of work.

I just hope vB4 lets us change things this easily. ;)

imported_silkroad
12-11-2009, 11:34 AM
..... there has been NO change in loads since we started serving images from our own server again. BUT, I am positive we would still see a result due to decreased disk I/O and a few CPU cycles, so we may revisit this in the near future when we raise the funds to pay into it.

That all depends on your traffic. We have 4 to 5 M PVs a month.

If we turn off SimpleCDN, which we can easily do in our DNS if there is an issue with the CDN, we see huge load increases on our server and a very large difference in bandwidth status.

It's all relative, isn't it?

RedWingFan
12-11-2009, 11:50 AM
That all depends on your traffic. We have 4 to 5 M PVs a month.

We certainly don't have THAT much! :D I do see the difference in our bandwidth usage stats though, so I know I had SimpleCDN working correctly. Just eyeballing the stats, we are serving out about 2.5GB to 3GB more per day than when we were using SimpleCDN. (We are still using only about 25% of the bandwidth quota we have on our account, so that's not an issue.)

I estimate our static files (other than attachments) are using about 1/3 of our bandwidth, overall.

Maybe I'm trying to talk myself back into using it... ;)

imported_silkroad
12-11-2009, 12:18 PM
OBTW, I am working on a PHP script that checks the performance of the CDN, and if it not performing, it changes our $vbphrase[image_server] and $vbphrase{client_scriptserver] and the RRs to another server (or back to the original server).

I already have this script working for our OpenX servers, and when there is any issue on the net, it automatically switches over to another server (we replicate the database), or back again.

It is not that much work to even check one CDNs performance and if not up to some standard, switch to another CDN. Then, when the cheaper CDN is performing again, switch back over to that one.

:D

Kaelon
12-13-2009, 05:29 PM
Generally speaking, I have only had a couple of pronounced moments when SimpleCDN stopped performing in the past three weeks. How has everyone else's SimpleCDN performance been throughout late November and early December?

Also, how are you guys changing your image variables? I noticed that imported_silkroad is using a $vbphrase[image_server] phrase (which sounds like a great idea, actually). I am using a CNAME alias and mapping all of my image calls to the cdn.domain.com to point to SimpleCDN's servers. Someone mentioned that simply remapping the CNAME back to our primary server might not be such a bad idea. How are you guys doing this?

Great thoughts all around - please keep them coming. I'd love to use this as a long-term solution to load-balancing on the basis of mitigating requests.

RedWingFan
12-13-2009, 10:22 PM
Also, how are you guys changing your image variables?

Strictly through replacement variables. I didn't even know how that feature worked until one of vB's staff replied in a post (probably in this thread ;) ) that it could "rewrite" HTML before it got sent out to the browser. I had at first changed all the entries in the theme's file, but that was too time consuming and error-prone. This also allowed me to change the paths for other image sets that the themes didn't cover (like smilies, IIRC).

When I was done, all I hadn't done through SimpleCDN were attachments, since they were not called directly via image URLs. And I had zero time or patience to work around it. ;)

imported_silkroad
12-14-2009, 08:00 AM
We use RRs and $vbphrases for images and client script.

We are also just about finished with a PHP script that monitors the CDN's performance and if it falls short of our expectations, automatically changes the DNS A records to a different server. Then, when the CDN is performing well again, it switches back.

I am considering adding a backup CDN so when SimpleCDN hiccups, which is does sometimes, our system will automatically switch over to the second one, which is more expensive. Then, when SimpleCDN is performing again, we switch back to save money.

Kaelon
12-19-2009, 04:48 PM
@imported_silkroad -- What RR's are you using? (.htaccess rewrites, or via vBSEO?)

SimpleCDN recently announced a big shift in how it prioritizes outgoing traffic. So-called "free" accounts (trial accounts with the $15), are placed on their lowest tier networks and often blocked. Once you add money, you are placed into "premium account" status and enjoy all of the network routing, the CDN bounces and triangulation, etc. So, I added some cash to our trial account and noticed a huge improvement in both speed and reliability. It looks like SimpleCDN is definitely delivering for us. Now, I just need to figure out how to leverage it!

So far, I am using an Upload Bucket to handle our site's template imaging. I am thinking of a dynamic/mirror bucket for user-uploaded content (our galleries, etc.). Anything else you can suggest?

imported_silkroad
12-19-2009, 05:11 PM
We are using standard vBulletin RRs in the style manager.

tpearl5
12-21-2009, 11:53 AM
I'm curious what all you guys are seeing in Google webmaster tools site performance:
https://vborg.vbsupport.ru/showthread.php?p=1934514

imported_silkroad
12-21-2009, 01:10 PM
I'm curious what all you guys are seeing in Google webmaster tools site performance:
https://vborg.vbsupport.ru/showthread.php?p=1934514

We have a similar issue and are moving off SimpleCDN to see if the Google Webmaster performance reporting tool changes significantly.

:confused:

VodkaFish
01-21-2010, 08:05 PM
What replacement variables are people using?

Just "images/ and the standard image folder names with the full cdn url before it?

imported_silkroad
01-25-2010, 12:51 PM
images do not need RRs. You can move images to/from the CDN using stylevars.

supermak
02-04-2010, 01:19 PM
images do not need RRs. You can move images to/from the CDN using stylevars.

But how can I move the /icons/ avatars/ folder? any idea?

Another question, I've setted up the cdn within the stylevars, but after running the YSlow plugin from Firefox, it tell's me to move these imgs to a cdn (they already are on a cdn)... sounds crazy.... any tip for this?

imported_silkroad
02-14-2010, 04:01 PM
FYI,

For those interested in how to create automated switchover between a CDN and their origin server (or other CDN or web server) in case of problems with their CDN, see this blog post:

[PHP] Web Failover Code Using cURL and Shared Memory (http://www.unix.com/blog/2010/02/php-web-failover-code-using-curl-and-shared-memory/)

It is pretty easy to take the PHP code in the blog post above and create a vB Plugin.

--------------- Added 1266171883 at 1266171883 ---------------

BAnother question, I've setted up the cdn within the stylevars, but after running the YSlow plugin from Firefox, it tell's me to move these imgs to a cdn (they already are on a cdn)... sounds crazy.... any tip for this?

For the past view months, SimpleCDN is performing very poorly. We have moved most of our traffic off SimpleCDN until (if or when) there service improves.

Our EU traffic is not even served from the EU, it is served from the US. Ditto for Asian traffic, it is not served from Asia, but from the US.

At the moment, SimpleCDN is performing very poorly. I don't recommend them at this time.

ChopSuey
03-04-2010, 02:08 PM
Hi, i have gotten an account, any way to have my files hosted there? Thanks.

WoodiE
03-15-2010, 10:53 AM
Looks like SimpleCDN got bigger faster than they could handle, from SimpleCDN's website:

Due to high demand, new Mirror and Upload buckets are temporarily unavailable.

imported_silkroad
04-03-2010, 02:58 PM
Yes, that is right. If you don't already have a SimpleCDN "Mirror Bucket" you will have to wait. They have grown too fast and also are having trouble serving content in the EU.

Because we are a long time customer, they offered us a free three month trial of their new "Hot Cache" service, which serves correctly in both the US and the EU, so far.

Also, we have moved to using Apache2 mod_rewrite in combination with vB RRs to get content from the CDN. After working with this for quite some time, I have found the following:


Use a CNAME in your DNS so you can easily switch CDN providers.
Use Apache2 mod_rewrite to direct content (like clientscript and images) to the CDN.
Use vB Relevant Replacements (RRs) for some of the ones not easily done with mod_rewrite.We are actually using both Mirror Buckets (for dynamic images like avatars) and HotCache for static ones.

Prices are currently around 4 cents per GB/month for MirrorBucket and cheaper for HotCache if you have 4TB per month plus of content delivered (not cost effective for forums serving less CDN traffic, but cheaper than many others...)

--------------- Added 1270310384 at 1270310384 ---------------

Hi, i have gotten an account, any way to have my files hosted there? Thanks.

With MirrorBuckets, you don't need to host anything. It automatically grabs any file that is not currently in the CDN from the origin server (provide the path is the same... a mirror..)

Kaelon
04-05-2010, 08:03 PM
Has anyone found another service that offers something comparable to SimpleCDN's "Mirror Bucket"? I should've really reserved a Mirror Bucket when I had the opportunity to, since the dynamic storage of images is exactly what our forum needed, but I stuck with the Upload bucket for our main static content.

imported_silkroad
04-06-2010, 07:24 AM
Has anyone found another service that offers something comparable to SimpleCDN's "Mirror Bucket"? I should've really reserved a Mirror Bucket when I had the opportunity to, since the dynamic storage of images is exactly what our forum needed, but I stuck with the Upload bucket for our main static content.

SimpleCDN claims their Mirror Bucket service will be "available for new accounts" in a few months.

Also, they told me they are also working on adding the same feature to their more expensive (for low volume traffic) "Hot Cache" offering, but I would not hold my breath for that one.

MarkJW
04-07-2010, 11:33 PM
MaxCDN has Pull Zones which do the same job as SimpleCDN's Mirror Buckets. Try them. They're also working on a vBulletin plugin, but it's taking a long time.

Kaelon
04-07-2010, 11:46 PM
MaxCDN has Pull Zones which do the same job as SimpleCDN's Mirror Buckets. Try them. They're also working on a vBulletin plugin, but it's taking a long time.
Thanks so much for that. How does MaxCDN compare with SimpleCDN in terms of performance and reliability? They seem very competitively priced.

--------------- Added 1270693151 at 1270693151 ---------------

Use Apache2 mod_rewrite to direct content (like clientscript and images) to the CDN.

Do you have an example .htaccess rule that you are using, and where you are putting it? I'd love to leverage mod_rewrite for as much of my redirection as possible.

COBRAws
04-08-2010, 04:45 PM
MaxCDN has Pull Zones which do the same job as SimpleCDN's Mirror Buckets. Try them. They're also working on a vBulletin plugin, but it's taking a long time.
But they charge 10cents per GB, expensive.

http://www.maxcdn.com/pricing.php

Kaelon
04-08-2010, 09:51 PM
But they charge 10cents per GB, expensive.

http://www.maxcdn.com/pricing.php
Considering its performance is significantly better than SimpleCDN, and it is offering 1000 GB for $10 for introductory sign-ups, I definitely think it's worth taking it out for a spin.

User Album Pictures
Back to CDN -- I noticed that User Album Pictures, even when stored in the file system, are still actually served by the script (they are .picture datafiles, and the script decompresses them). Does this mean that one cannot put pictures from the user albums on the Live! or Pull CDNs? This is strange because I am still able to serve attachment files (which are rewritten considerably) through the CDN.

TheComputerGuy
04-11-2010, 09:16 PM
I just signed up with maxcdn. I'm very interesting to see how this will affect the site.

scottct1
04-15-2010, 04:38 PM
Any tips for setting up with MaxCDN? (I am still on Vb 3.8.5)

--------------- Added 1271361255 at 1271361255 ---------------

I have signed up for MaxCDN today...

And I am having an issue with replacement variables...

I want to change images/smilies to cdn1.myserver.com/smilies but when I do this what is sent by the server is http://www.myserver.com/cdn1.myserver.com/smilies

If I tell it to change images/smilies to http://cdn1.myserver.com/smilies it is sent by the server as http://www.myserver.com/http://cdn1.myserver.com/smilies.

How do I keep it from putting in my servers domain name before the replacement?

Thanks!

imported_silkroad
08-05-2010, 05:34 AM
The The UNIX and Linux Forums (http://www.unix.com/) are now using MaxCDN (switched from SimpleCDN). There is an August 4th, 2010 blog post about their initial impressions of MaxCDN: http://www.unix.com/blog/2010/08/initial-impressions-with-maxcdn/. ------------------ Regarding this query above: I want to change images/smilies to cdn1.myserver.com/smilies but when I do this what is sent by the server is http://www.myserver.com/cdn1.myserver.com/smilies

If I tell it to change images/smilies to http://cdn1.myserver.com/smilies it is sent by the server as http://www.myserver.com/http://cdn1.myserver.com/smilies.

How do I keep it from putting in my servers domain name before the replacement?

Thanks!

in vBulletin, the URL for Smilies are set in the AdminCP.

cmeinck
09-17-2010, 06:02 PM
I signed up for MaxCDN and having a few troubles getting it working on my site (which uses vBSEO). A few issues that are cropping up:

1. All sort of issues with the icons for edit post, reply to post, etc. aren't showing up., but it appears their alt tags appear instead.
2. The attachment manager kicks back a security token error.
3. Edit posts, reply posts buttons don't work on first click -- requires a second click.

Everything works properly when I remove portions of the replacement variables outlined (http://wiki.netdna.com/Implementation/vBulletin) by MaxCDN.

Their support hasn't been help at all.

Any suggestions.

imported_silkroad
09-18-2010, 02:42 AM
We have no problem with MaxCDN for vBulletin and certainly do not rely on their support staff for vB integration.

The problem you are having is with your knowledge of how to move content to a CDN. It has nothing to do with MaxCDN (or any CDN) for that matter.

If you don't understand how your content is served, then you will have trouble with moving content to any CDN.

cmeinck
09-18-2010, 01:32 PM
We have no problem with MaxCDN for vBulletin and certainly do not rely on their support staff for vB integration.

The problem you are having is with your knowledge of how to move content to a CDN. It has nothing to do with MaxCDN (or any CDN) for that matter.

If you don't understand how your content is served, then you will have trouble with moving content to any CDN.

Correct. I do need help and was simply pointing out that MaxCDN offers limited support. I have not doubt it can/will work, but it's not easy or I'd have it working by now.

If you have any suggestions beyond the wiki, I'd love to learn more about your set up and what might be the cause of my setup problems.

imported_silkroad
09-18-2010, 01:53 PM
Thanks. It is not really possible to comment without knowing how you set things up.

With proper set up for the CDN to serve only static content (images, clientscript (java and css files)), there is no reason for any security token errors.

First, you should outline all the steps you have done so far.

For us, we simply change the style variables, change the location of smilies etc in the AdminCP and add a few replacement variables for client script.

Another method which works equally well, is to use Apache mod_rewrite, but we don't do it that way.

imported_silkroad
09-20-2010, 05:18 AM
OBTW, in case you did not read this blog post over at The UNIX and Linux Forum about MaxCDN and their initial impressions on their vB forum:

http://www.unix.com/blog/2010/08/initial-impressions-with-maxcdn/

Trana
03-05-2011, 05:43 AM
Just wondering if anyone has been able to come up with a solution for moving the attachment directories out to S3 or another CDN?

imported_silkroad
03-06-2011, 12:14 AM
There are a number of ways to do this. Perhaps the easiest way is to simply edit the postbit_attachment template and change:

<a href="attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]"<if condition="$show['newwindow']"> target="_blank"</if>>$attachment[filename]</a>to...


<a href="http://your.cdn.com/attachment.php?$session[sessionurl]attachmentid=$attachment[attachmentid]&amp;d=$attachment[dateline]"<if condition="$show['newwindow']"> target="_blank"</if>>$attachment[filename]</a>You could also do this with RRs, but you would need to be careful not to replace the code which uploads the attachment; so I advise you to just edit the template that displays the attachment (above).