Mobile app version of vmapp.org
Login or Join
Goswami781

: Using a CDN for CMS software (multiple sites) I'm currently researching ideas for the media management side of a CMS I'm writing. I was looking at having images served from a CDN which is

@Goswami781

Posted in: #Cdn #Css #Images #Performance #Php

I'm currently researching ideas for the media management side of a CMS I'm writing. I was looking at having images served from a CDN which is fine on a single site, but I want all sites that run the CMS to make use of a CDN (which will most likely be a custom developed one, rather than a third party service like S3).

My main question is: Is a multi-site CDN a good idea? I can't think of a downside, but have probably missed something - obviously they won't share the same folder, as I invisage the requests to be css.cdnsite.com/example.com/style.css or something along those lines. Having multiple sites in the same place will obviously make it easier for us to manage, as well as being cheaper, but then I wonder if it'll be worth it...

Long story short: How should the CMS handle user uploaded media (separate installations)

Just keep a local copy of all assets and serve them from the same site, like in days of yore?

Keep a local copy, force site to use and have CDN subdomains per site?

Or use a single separate CDN for all sites?

Apologies for the length of this question, not sure if this should be multiple questions or not, as all parts are kind of related and could affect each other.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Goswami781

1 Comments

Sorted by latest first Latest Oldest Best

 

@Nimeshi995

While sharing containers across multiple sites isn't a huge problem its less than ideal for administration purposes. It should be just as easy to create multiple containers for each of the sites rather than creating multiple folders within one container.

Also many people use cdn.branding.com to look nice while this isn't a major problem its worth noting there's nothing wrong with using the url's issued by the CDN for example L922921.rackspace.cdn.com in fact its best not to use a custom domain if you want cutting edge speed since by using a custom domain your adding an additional DNS lookup which can unessacary add to page rendering.

Additionally I noticed your using css.domain.com and I assume your might use image.domain.com for the images, while this looks neat - it's a mistake by many, more cdn's means more lookups meaning less speed so my advice would be to use 1249124a.rackspace.cdn.com/css/example.css and use the same container but with a sub folder for other contents such as: 1249124a.rackspace.cdn.com/images/myimage.jpg. If this isn't planned by you then simply ignore this part and it'll make a good read for others.

Going back to your original question about using multiple sites within one container the other thing to look at is that your allowing all sites to have access to the same container and this could cause problems if your using the API since one change could do something unintended to the files and folders of other sites, so again my personally opinion is that you should keep them separated and using the API correctly it makes no extra work other than adding them differently in each of the sites to begin with.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme