Cloudflare – Is it right for video script?

April 20, 2016 at 10:52 pm

cloudflare

I’ve seen some webmasters who tried to enable Cloudflare service for their domain with website based on some video script. But the question is if Cloudflare is right choice for such type of website.

Well, the answer is “Yes” and “No”.

“Yes” is for those who carefully followed Cloudflare rules and are able to modify their scripts to work well with Cloudflare service.

“No” is because Cloudflare is not a CDN service to stream video files well and has small limits for uploading large files that video files usually are. Without understanding this and without modifications to video script Cloudflare becomes almost useless for video script.

Cloudflare is certainly great service to accelerate website, it also provides great level of protection.
With network routing technology and many data centers around the world, Cloudflare routes customers to the closest datacenter, caches static content on your website like images, JavaScript and CSS, optimizes your web content for Mobile devices. It’s filtering malicious traffic before it hits your server, including: comment spam, email harvesting, SQL injection, cross-site scripting, and DDoS (denial of service) attacks.

However Cloudflare is clear about media files streaming, that it may hit your site performance when running though Cloudflare proxy. They rather suggest to move streaming content to a subdomain they don’t proxy in DNS settings. Read more at the source:

https://support.cloudflare.com/hc/en-us/articles/200169706…

But even more important thing is that Cloudflare has small limit for uploading content. It’s 100 MB for free account and 500 MB for maximum paid Enterprise Plan, which is quite expensive. These days it’s really not much as for video content.

If you try to upload bigger video file, it will simply fail to upload, no matter what your server settings are. Additionally if your script has option for upload progressbar, it will not work.

Does it mean that Cloudflare is useless for a website with video script?

No!

You need to modify your script to use subdomain for uploading video content, and should remember that one day you may need to move your streaming content to subdomain.
Second is rather less trouble as it’s easier to change script configuration and modify paths for video content upload and storage. But first usually requires much more knowledge and experience to change the script so it can upload video files through subdomain instead of main domain upload script.

I did experienced all of what is described above. Luckily I was able to modify video script for a private website to work well with Cloudflare. This concerned a script like AVS/Clipshare video script, but generally concerns any video script.

Once all modified my video website seems to load about 30%-50% faster, but even more important is that it’s much more protected now than before.