R
R
Roman Akhmadullin2015-09-17 18:12:18
Nginx
Roman Akhmadullin, 2015-09-17 18:12:18

Why is the server not streaming content correctly when Cloudflare is connected?

Good afternoon, dear participants of this service.
I have the ability to listen to audio on my site, as well as download one file. Until recently, everything was fine, but recently (perhaps after one of my software updates on the server), everything began to work a little incorrectly. When playing audio, the ability to skip to other seconds of the track being played was lost, and also, after about a minute, its playback stops altogether.
The static is provided by Nginx 1.8.0 on Ubuntu 12.04, without any additional modules.
It seems that the server began to give the browser content in some kind of streaming mode. When I download a file, its size is not displayed by the browser, it's like downloading a database dump from phpmyadmin, when the browser just shows the number of bytes downloaded, and so on until the file download is completed.
Recently, I also connected proxying through Cloudflare to the site at a free rate in order to get myself https. Now I'm thinking about what might be the problem.
Can anyone help with advice on this topic?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Roman Akhmadullin, 2015-09-17
@saggid

I solved the problem, it turns out that when using Cloudflare and streaming any content from my server, this very content needs to be moved to a subdomain so that it is not proxied by their servers.
There is a short article on this on their website.
In case the link to the article becomes outdated, I will write the text from it here, since its size is quite small, at the same time I will translate it into Russian:
CloudFlare can greatly help in speeding up and protecting your site. However, content streaming sites should move that same content to a subdomain that will have proxying disabled in the DNS settings. If you created a subdomain like "streams.yourdomain.ru", you should add something like this DNS entry to your domain's CloudFlare settings:
CNAME streams is an alias of yourdomain.com
(make sure the cloud icon is greyed out for this entry).
We are seeing performance issues due to the high number of connections when the content being played is run through the CloudFlare proxy.
Note: Embedded services such as YouTube and Vimeo on your site do not require special configuration of your server, because their content is not played through your server, but directly.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question