Report this

What is the reason for this report?

How to use CDN to prevent visitors from reaching your server?

Posted on September 19, 2014

Does anyone have any experience with CDN? I have been struggling with traffic spikes lately, which would overload Apache/MySQL and kill the server.

To dip my toes into CDN I have been using CloudFlare’s free service, but this hasn’t prevented traffic spikes from killing my server.

I have been reading about assigning a separate domain for static content i.e. images … would this help ease server load? Where can I find more information how to set this up?

Appreciate your help. For reference, the website I am referring to is ASTIG.PH.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Thanks byte232. I realized that CloudFlare does not cache html files.

I have used Cloudflare, but now I use this cdn service, more effective pricing model for me. I pay only for data transfer.

CloudFlare helps. I have used them myself. Have you considered something like Varnish cache?

I am guessing at how to use a separate domain for static content. Since nobody else has answered on the topic, my guess is that you would either have to rewrite your pages to bring in the static content from a separate domain or use a rewrite based on the directories that contain your static content.

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.