PDA

View Full Version : How to setup a CDN for vbulletin


final kaoss
01-13-2011, 10:00 PM
To edit your vBulletin style to enable CDN, follow these steps:

* Open admincp by visiting http://mywebsite.com/admincp/ > Select Styles & Templates > Replacement Variable Manager:
* Click on [Add New Replacement Variable] link and set it as follows:
o Set Search for Text to href="clientscript
o Set Replace with Text to href="http://cdn.mywebsite.com/clientscript

You need to repeat this step for images, javascript and other shared media as follows:
Search for Text Replace with Text
src="customavatars/ src="http://cdn.mywebsite.com/customavatars/
src="customprofilepics/ src="http://cdn.mywebsite.com/customprofilepics/
src="images/ src="http://cdn.mywebsite.com/images/
url("clientscript url("http://cdn.mywebsite.com/clientscript
src="clientscript/ src="http://cdn.mywebsite.com/clientscript/
href="clientscript/ href="http://cdn.mywebsite.com/clientscript/
url(./images/ url(http://cdn.mywebsite.com/images/
url(images/ url(http://cdn.mywebsite.com/images/
var imgdir_misc = "images/misc"; var IMGDIR_MISC = "http://cdn.mywebsite.com/images/misc";

Avatars & Pictures - Storage Type

* Visit Avatars > Storage Type and set them as follows to match your above CDN rules by moving all of them to file systems:
o Avatars are currently being served from the filesystem at ./customavatars
o Profile pictures are currently being served from the filesystem at ./customprofilepics
o Signature pictures are currently being served from the filesystem at ./signaturepics

How Do I Test Images And Other Media Files Are Cached Or Not By CDN? Use curl to test HTTP headers (look for Etags, max-age and Expires headers):

$ curl -I 'http://cdn.mywebsite.com/clientscript/vbulletin_important.css?v=385'
$ curl -I http://cdn.mywebsite.com/customavatars/avatarx_y.gif

Credit for this nice & short tutorial goes to these guys.
http://wiki.netdna.com/Implementation/vBulletin

final kaoss
01-15-2011, 04:18 PM
After you finish with this, I suggest you complete the steps in this article if you're looking to max out the speed of your vbulletin.
https://vborg.vbsupport.ru/showthread.php?t=237025

List of Paid CDN's:

Amazon CloudFront (http://aws.amazon.com/cloudfront/) $0.150 per GB. A decent offering from Amazon. But supports origin pull ONLY from Amazon S3 which you have to pay extra.

High Winds CDN (http://www.vps.net/cdn-signup) $0.075 per GB. One of the cheapest you can get. No POP (point of presence) in Asia Pacific, yet. VPS.NET is reselling this. Original price is $0.50

Cachefly (http://www.cachefly.com/) $0.39 per GB ($99 plan prorated). Expensive because it is a monthly plan. Said to be of high performance. Decent POP list. 30day trial available. There is a high volume plan and price can go as low as $0.03.

Limelight Networks (http://www.rackspacecloud.com/cloud_hosting_products/files/) $0.22 per GB (PAYG). Similar to CloudFront. You need to keep the files with them. They have $0.01 for each request if your file sizes are smaller than 250kb! Rackspace is a reseller.

Internap (http://www.softlayer.com/cloudlayer/cdn/) $0.18 per GB (250GB plan). They have good coverage around the world. SoftLayer is reselling Internap accounts.

Voxel (http://www.voxel.net/products-services/voxcast-cdn) $0.20 per GB. They have good coverage around the world. Also offers pro-apache support through their extension.

MediaTemple (http://mediatemple.net/labs/cdn/) This service is $20/Month. This includes 200GB bandwith/month. If you go over that limit, here is the pricing for that [$.15/GB up to 10TB] [$.10/GB over 10TB]. They claim to be "25% faster in delivering content when benchmarked against competitive CDNs".

sross
01-15-2011, 07:12 PM
Is there a way to have all attachments stored at a cdn?

final kaoss
01-16-2011, 12:02 AM
I'll have to look that up & post back.

Alfa1
01-16-2011, 01:34 AM
Have you tried this yourself? The instructions are meant to work for their pull zones.

AFAIK this does not work for css files, avatars, attachments, custom profile pics, signaturepics nor any other user generated files. The issue is that vbulletin has only one location for files and cannot set a different location for writing the files to (your server) and reading the files from (the CDN).

OldSchoolDSL
01-17-2011, 03:27 PM
I'll be the noob and ask....

cdn ?

final kaoss
01-17-2011, 03:43 PM
Read up here then.
http://www.vbulletin.com/forum/showthread.php/371232-why-using-a-CDN-%5C-sub-domain-%5C-Other-server-for-static-content
Or here
http://en.wikipedia.org/wiki/Content_delivery_network

LuisManson
01-19-2011, 07:40 PM
i made a thread to do something like this, but i use a plugin to rewrite the URLs on the templates
maybe that can be usefull here too

final kaoss
01-19-2011, 10:36 PM
A plugin for this would be helpful for alot of people, is it your own? If not, can you give us a link to it?

LuisManson
01-20-2011, 05:10 PM
A plugin for this would be helpful for alot of people, is it your own? If not, can you give us a link to it?

hi, near middle of the article under "plugin" https://vborg.vbsupport.ru/showthread.php?t=246277

CvP
01-25-2011, 03:42 PM
I wonder how a CDN based on geoip will do.
for example, using examplex.com for country x and exampley.com for country y.
ofc examplex and exampley are two different servers hosted on two different countries.
the main problem seems to be the synchronization between files/writing files.

cuocsongso
03-01-2011, 12:47 AM
To edit your vBulletin style to enable CDN, follow these steps:

* Open admincp by visiting http://mywebsite.com/admincp/ > Select Styles & Templates > Replacement Variable Manager:
* Click on [Add New Replacement Variable] link and set it as follows:
o Set Search for Text to href="clientscript
o Set Replace with Text to href="http://cdn.mywebsite.com/clientscript

You need to repeat this step for images, javascript and other shared media as follows:
Search for Text Replace with Text
src="clear.gif" <src="http://cdn.mywebsite.com/clear.gif"/td>
src="customavatars/ src="http://cdn.mywebsite.com/customavatars/
src="customprofilepics/ src="http://cdn.mywebsite.com/customprofilepics/
src="images/ src="http://cdn.mywebsite.com/images/
url("clientscript url("http://cdn.mywebsite.com/clientscript
src="clientscript/ src="http://cdn.mywebsite.com/clientscript/
href="clientscript/ href="http://cdn.mywebsite.com/clientscript/
url(./images/ url(http://cdn.mywebsite.com/images/
url(images/ url(http://cdn.mywebsite.com/images/
var imgdir_misc = "images/misc"; var IMGDIR_MISC = "http://cdn.mywebsite.com/images/misc";

Avatars & Pictures - Storage Type

* Visit Avatars > Storage Type and set them as follows to match your above CDN rules by moving all of them to file systems:
o Avatars are currently being served from the filesystem at ./customavatars
o Profile pictures are currently being served from the filesystem at ./customprofilepics
o Signature pictures are currently being served from the filesystem at ./signaturepics

How Do I Test Images And Other Media Files Are Cached Or Not By CDN? Use curl to test HTTP headers (look for Etags, max-age and Expires headers):

$ curl -I 'http://cdn.mywebsite.com/clientscript/vbulletin_important.css?v=385'
$ curl -I http://cdn.mywebsite.com/customavatars/avatarx_y.gif

Credit for this nice & short tutorial goes to these guys.
http://wiki.netdna.com/Implementation/vBulletin

I met a problem after when I do it, please view attachment images

How to fix it? Thank you

A.Chakery
04-29-2011, 03:39 PM
solved, thanks so much for the tip :)

8thos
07-25-2011, 06:39 PM
Today I started using Cloudflare which comes with URLJET. Not sure if it's working yet.

final kaoss
07-28-2011, 06:33 PM
Yes as long as you setup cloudflare properly it does fine.

16,066 requests saved by CloudFlare
32,112 total requests


But be aware that it is not a recognized CDN according to pagespeed, yslow & gtmetrix.
http://wordpress.org/support/topic/high-server-load-w3-total-cache-or-wp-super-cache
It's important to understand that CloudFlare is *not* a CDN, nor is it their intension to be. Furthermore nothing replaces properly tuning your web site before adding other services as next or final steps.

He is the guy at http://www.w3-edge.com/ aka the company who made the popular w 3 total cache plugin for wordpress.

8thos
07-30-2011, 02:24 AM
Google has a CDN now. Should I switch to them? http://googlecode.blogspot.com/2011/07/page-speed-service-web-performance.html

final kaoss
07-30-2011, 12:40 PM
As soon as they fix their sign up form, I'll be able to check it out.

We're sorry.

You can't access this form because it is in violation of our Terms of service. If you feel this is in error, please contact us.

Find out more at the Google Docs Help Center.

At this time, Page Speed Service is offered to a limited set of webmasters. You can request access to the service by filling this web form. (which is broken)

final kaoss
07-31-2011, 01:46 PM
Now it's working!

Alfa1
08-01-2011, 06:10 AM
Google has a CDN now. Should I switch to them? http://googlecode.blogspot.com/2011/07/page-speed-service-web-performance.html
Its sure worth a try.

sivaganeshk
11-27-2011, 05:00 PM
http://wiki.netdna.com/Implementation/vBulletin

The CDN plugin mention here is not available :(
any help. I have MaxCDN but don't have vbSEO

A.Chakery
11-27-2011, 05:12 PM
http://wiki.netdna.com/Implementation/vBulletin

The CDN plugin mention here is not available :(
any help. I have MaxCDN but don't have vbSEO
there is no need for vbseo plugin, cause vbseo has released a stand alone plugin for vbulletin.

if you can't find it I can share it with you here .

Its free !!!

sivaganeshk
11-27-2011, 05:21 PM
Please share.

--------------- Added 1322418145 at 1322418145 ---------------

https://vborg.vbsupport.ru/external/2011/11/9.jpg
:(

A.Chakery
11-27-2011, 05:32 PM
well, so let me ask vbseo team about this issue ?

briansol
11-27-2011, 08:24 PM
See: https://www.vbulletin.com/forum/showthread.php/390548-Missing-MaxCDN-product

A.Chakery
11-28-2011, 06:18 AM
See: https://www.vbulletin.com/forum/showthread.php/390548-Missing-MaxCDN-product

Thank you Brian for the fast reply ...

vBSEO really rokcs ...:up:

Jackchan
08-05-2013, 05:38 AM
I'm using VB 4.2 and the guide does not cover all expects. After replaced there still have many images and scripts not served from CDN.

Also, replace src="clear.gif" by <src="http://cdn.mywebsite.com/clear.gif"/td> will cause error here https://vborg.vbsupport.ru/showpost.php?p=2168058&postcount=12

A.Chakery
08-05-2013, 06:11 AM
I'm using VB 4.2 and the guide does not cover all expects. After replaced there still have many images and scripts not served from CDN.

Also, replace src="clear.gif" by <src="http://cdn.mywebsite.com/clear.gif"/td> will cause error here https://vborg.vbsupport.ru/showpost.php?p=2168058&postcount=12

You should try to use Relevant Replacements to serve your static files,

oh and another option is to use the paid version of vboptimize which IMO really worth it.

it also has a Guest cache which decreases the page load time.

Here is the plugin :
http://www.dragonbyte-tech.com/product/1-vb-optimise

Plus it has a great support.

Jackchan
08-05-2013, 06:30 AM
You should try to use Relevant Replacements to serve your static files,

oh and another option is to use the paid version of vboptimize which IMO really worth it.

it also has a Guest cache which decreases the page load time.

Here is the plugin :
http://www.dragonbyte-tech.com/product/1-vb-optimise

Plus it has a great support.

I did check out vboptimize but I found no demo/site using this plugin so I don't how great the performance is.

The dragonbyte-tech.com forum itself does not use this plugin I guess as the forum is loading really slow.

Most paid SEO plugin out there are just simple configs which I can do by myself and I afraid this plugin may in the same categories.

A.Chakery
08-05-2013, 06:38 AM
I have it on my own forum, but unfortunately I had to disable the Guests full cache since I am using highly customized plugins which should not be cached, on a simple (regular) vbulletin installation you will not have any problems with this feature ...

Here is my forum :

Pet Owners and Veterinarian Cmommunity (http://www.VetArena.com)

Jackchan
08-05-2013, 06:45 AM
I have it on my own forum, but unfortunately I had to disable the Guests full cache since I am using highly customized plugins which should not be cached, on a simple (regular) vbulletin installation you will not have any problems with this feature ...

Here is my forum :

Pet Owners and Veterinarian Cmommunity (http://www.VetArena.com)

You have a good forum. :)

I check it out now. Thank you.

A.Chakery
08-05-2013, 07:06 AM
You are welcome :)

But please note that I used relevant replacements to serve my static files from CDN ...

Good luck

nikosb
06-19-2014, 09:23 AM
I met a problem after when I do it, please view attachment images

How to fix it? Thank you

https://vborg.vbsupport.ru/attachment.php?attachmentid=127053&stc=1&thumb=1&d=1298947603

i have the same problem

A.Chakery
06-19-2014, 10:28 AM
Would you please provide us with your relevant replacements ?

nikosb
06-19-2014, 10:34 AM
src="clear.gif" <src="http://cdn.mywebsite.com/clear.gif"/td>
src="customavatars/ src="http://cdn.mywebsite.com/customavatars/
src="customprofilepics/ src="http://cdn.mywebsite.com/customprofilepics/
src="images/ src="http://cdn.mywebsite.com/images/
url("clientscript url("http://cdn.mywebsite.com/clientscript
src="clientscript/ src="http://cdn.mywebsite.com/clientscript/
href="clientscript/ href="http://cdn.mywebsite.com/clientscript/
url(./images/ url(http://cdn.mywebsite.com/images/
url(images/ url(http://cdn.mywebsite.com/images/
var imgdir_misc = "images/misc"; var IMGDIR_MISC = "http://cdn.mywebsite.com/images/misc";

The problem was the
src="clear.gif" <src="http://cdn.mywebsite.com/clear.gif"/td>

and remove this.