CDN

Jafo

Active member
Will there be any considerations for CDNs? I had to create a product for our sites to utilize origin pull over at Softlayer and even so, found it tricky to hook in everywhere I needed too (i.e. public attachments). Will there be any thought given to this in development?
 
agreed, would love CDN support, should focus on the cost effective ones to start

maxcdn is what i use 1000GB for US$10 special and now they have 1000GB for US$39.95

tried simplecdn, rackspace cloud, amazon s3/cloudfront, and maxcdn. Maxcdn is easily my pick :D

Kier for price of entry into cdn, maxcdn would be a nice starter to look into adding cdn support :)

+1
I have MaxCDN and would love to have support for the forum site.
 
You can also edit the output file manually or use a plugin;

$output = str_replace($xenforo_link_to_cdn, $_xenforo_remote_link_to_cdn, $output);


Changing src='whatever/file.css' to end up as src='http://cdn.whatever/file.css'
 
I am using this on vBulletin actually, you can go there and look at the source code on wetalk.tv and the .css should be linked to something like wetalknation.net/path/to.css We can host it on a second server, second account, under files.wetalknation.net/css/global.css - but we're still making too many tweaks to export once and store remote (or find time to automate that process live).
 
I have moved all static files including images, css and js to a CDN (edgecast). Works great. With attachments I am having my doubts... currently I have attachments stored on the local filesystem in an area that is not accessible from the Web. Upon request, the attachment is sent to the user via X-Sendfile (Lighty). If I wanted to have users download the attachments directly from a CDN, those files would be always accessible from outside, meaning, it'd be enough for a user to pass a link to someone else without access control. Not sure how to solve that unless you have a "smart" CDN host that allows scripting (header/cookie authentication perhaps).

We only host our PUBLIC attachments on the cdn. :)
 
I'm not so sure about that. I'm not trying to take a position that obviously belongs to you and Mike. I don't want to excuse myself but maybe there was a misunderstanding with the language. Sometimes it's hard to express myself in english and these kind of situations occur. I'm really sorry.

Mis interpretations vi@ A loss in translation. (AVB should quote me on that one in the future)

And I think it was mighty nice of you to respond as you did. High tension around here and lots of pressures I can imagine.
 
I think even basic CDN would help. Attachments, Avatars, etc even. Obviously the main benefit of a CDN would be around the database. If we could somehow split the database, you may be able to offload areas that have high read/write such as posts. Though this would likely be a mamoth task and probably cause more problems than it's worth.

In fairness, the 'big boards' do ok without CDN. I know it isnt a big board, but webdesignforums.net (my site) currently resides on a small 512mb RAM VPS server. Its not even close to hitting half its RAM limit. Baring in mind we've always got around 100 users online too, and have most of the 'heavy cpu' features enabled.

All I'm saying, is that its not a show stopper if CDN isnt included...only about 0.5% of people will have a need for it. Some will use it for the sake of it.
 
No offense, but 100 users online is not that big. Sites I work with have sometimes 20-30 thousand users online and a CDN definitely comes in handy.

Ahh...no I didnt mean it was a lot of users online. I was doing it by perspective. 100 users = approx 200mb RAM, etc. Based on how our server handles that many people, a decent sized 2xQuad Xeon w/12 GB RAM server would handle 20-30k easy. I've worked with a few big communities that use vb3.x and they handle it fine. Some have opted for a slave MySQL server, which helps a fair bit.

I'm not saying CDN isn't needed - I'm saying its not a MAJOR problem if its not included in v1.0
 
Ahh...no I didnt mean it was a lot of users online. I was doing it by perspective. 100 users = approx 200mb RAM, etc. Based on how our server handles that many people, a decent sized 2xQuad Xeon w/12 GB RAM server would handle 20-30k easy. I've worked with a few big communities that use vb3.x and they handle it fine. Some have opted for a slave MySQL server, which helps a fair bit.

I'm not saying CDN isn't needed - I'm saying its not a MAJOR problem if its not included in v1.0

But you are only considering load in your equation. The big value of a CDN is delivering content fast EVERYWHERE.. So users in say Australia get images, css, js, attachments etc just as fast as users close to your servers. A good CDN will have many nodes all over the world. Since VB pipes its attachments through PHP most of the time, you can save load with a CDN on public attachments but that IMO is a secondary benefit.

I don't imagine specific CDN providers will be tailored to, but I do hope things are coded so we can plug in our own CDN's easily. For example, stylevars make it easy to do this.
 
Yes - sorry I didn't take into account its usage for location speed improvements. From that respect, its a valuable thing to have. But solely on load balancing, it serves little demand. We've all managed with the existing solutions for years so I cant see it being a major problem if we have to continue using our own methods.
 
Even if CDN support isn't pre included there's an easy way of routing requests to use the CDN, assuming you use an origin pull based service. Just run str_replace on the output buffer to rewrite URLs.

This is what I do on vB to route image requests to my Akamai account..

Code:
function callback($buffer){

return (str_replace("image/dir", "http://static.net/forums-client", $buffer));}

ob_start("callback");

Doing it for attachments might be more tricky, but similar logic can be applied.
 
The problem with that method is it is resource intensive. Whenever you have to search and replace in text it adds quite a bit of load.

Adds a bit of overhead sure, but I wouldn't call it resource intensive. We're talking quarters of a millisecond, really. Makes no measurable difference in our avg server load with over 100 guests online.

Having said that, I'd still prefer a built in solution of course, but that method would suffice until then.
 
Top Bottom