Apache 2.2 vs Apache 2.4

Off topic - what CDN do you recommend?

Uhā€¦ this is where I admit, I donā€™t use oneā€¦ :sweat_smile: at work we commissioned a few of our own servers to be a CDN, as 99% of our work is for internal use.

Iā€™ve heard good things about CloudFlare and MaxCDN. So I think Iā€™ll go with those suggestions :smile:

1 Like

@cpradio, I am trying to get caught up on the homework you gave meā€¦

From a video I watched online, I thought that Varnish was used to cache static content that is repeatedly requested?

Can CDNā€™s be trusted?

That is putting a lot of your presumably proprietary images and files on the ā€œcloudā€, right?

And why does it appear that a CDN is more beneficial than Varnish?

Also - havenā€™t gotten to that link yet - but since I assume you have to pay for a CDN, does it really provide any cost savings versus buying more RAM and Servers?

Yes, it is true that Varnish is preferred for static content, but you can use it for dynamic content as well, it is just that the dynamic content will be cached for a much shorter period of time.

Yes. Amazon has S3, CloudFlare and MaxCDN are very reputable, etc.

Yes, you are, and thatā€™s a benefit (next answer tells you why)

Location, Location, Location. Most CDN providers have servers all around the world or at least in various areas. So the content they are serving is near the user visiting your site. Closer proximity to the server, means quicker transfer of data, and thus the images, stylesheets and javascript get served faster.

Varnish runs on your servers, so you still have distance playing a factor. That is the biggest difference. If you want to forgo a CDN server, Varnish is a good alternative and will suit your needs however youā€™ll never be able to solve the issue with distance affecting transfer speeds with that solution.

CloudFlare offers a free version, which will be good to start out. Granted Varnish is ā€œfreeā€ too, you simply host it on your VPS, however, you may have to up your RAM if you are running Varnish and Apache together, so the cost increase for more RAM/CPU versus a CDN is also something to consider.

Hopefully that provides more food for thought.

1 Like

My understanding of how Varnish works is that it stores files which come up often (e.g. Company Logo) in your Serverā€™s CPUā€™s Cache space, and that CPU Cache is faster than RAM or Disk Storage. Correct?

If that is how it works, it seems like Server CPU Cache space - especially on a VPS - must be awfully smallā€¦

So my web host should be able to install Varnish on my VPS share?

Why would a CDN offer free storage?

From a copyright standpoint, are there any risks that my clients data will get stolen or pirated or misused? (Amazon has a reputation for being real bastards on lots of thingsā€¦ Many see them as a ā€œbullyā€ā€¦)

Actually I believe it gets written to RAM. So yes, it would use a chunk of your limited RAM that is available.

Yes. You could likely install it as well, as you should get root access to your server.

Same reason anyone does. To get you to use it, get hooked and eventually up sell as you learn to like it, then love it, then canā€™t live without it.

No more risk than what you have when you publish your site. Anyone go to a site and save it off to another destination. If you copyright your content, be prepared to fight for it, otherwise youā€™ll just get run over.

If my clientā€™s entire website runs over https, does that cause any conflicts with Varnish or this approach?

No to both. SSL works for both CDNs and Varnish.

@cpradio,

I just finished watching this video on YouTube: Varnish - How to cache your dynamic pages

Somewhat interesting presentation, but way over my head as a developer!!

If Varnish is something that my web host could install and configure for me - at least initially - and is something that I can run it for my clientā€™s sites without using the ā€œEdge Side Includesā€ then I might consider using it.

But if I have to add XML into my finished code-base, and have to step through everything this guy did over the 75 minute presentation then that is just too much for me! :frowning:

Which is why I see it as a secondary step (if you want to go that route). Give yourself plenty of time to play around with it before putting it on a live site.

If you simply want caching of static objects, Iā€™d push harder at a CDN instead of Varnish. It is simply drag and drop the files you want onto the CDN and bam! They are there, ready for use. The only configuration you have is setting the cache time period, and you can set it globally or at a folder level (I think). So that hardly takes much time.

Then you simply update your site to use the files off the CDN instead of off your server and you are all set! :smile:

To automate the use of the CDN is a bit more work, but it is doable and would be again, a good secondary step. You can always manually update the CDN until you have time to create a process that does it automatically.

If I were to start off, Iā€™d start with a CDN for static objects. It sounds like that is what youā€™d use Varnish for anyway. However, if you just canā€™t get to trusting a CDN, then Varnish is your only option left.

@cpradio,

Just to give me something to think about down the road, how hard would it be to create my own ā€œprivate CDNā€? (I believe you said you did that.)

I realize that would require an extra VPS, but if it is doable, I think it would provide a great balance of performance and privacy.

You donā€™t necessarily need a new server (we went that way because we have hundreds of servers that would need to use the CDN).

You can use a sub-domain as described at http://www.websitemagazine.com/content/blogs/posts/pages/create-your-own-content-delivery-network.aspx (when it gets to the W3 Total Cache part, stop reading, that doesnā€™t apply to you unless you are using WordPressā€¦)

Keep in mind that this wonā€™t solve the biggest problem most CDNs solve. Location, Location, Location. We did it because well, our location is irrelevant. Most of our applications are internal so Locationā€¦ well everyone using them is in the headquarters! So it made it a no-brainer that we could self-host it.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.