Welcome! Log In Create A New Profile

Advanced

Optimize nginx stream

January 19, 2013 08:32AM
we're running high traffic streaming website similar to youtube, due to
large number of streams on daily basis, our server is consuming 10~12TB
bandwidh per day. We're using nginx-1.2.1 and want to restrict users to
download videos but don't want to restrict streams from our website. We
also tried "limiting download connections per ip (limit_conn addr 1), but
the problem is if 2~3 users are streaming videos from our site on same Lan
with single ip, the stream will stop working for 2 others and will display
(stream not found) error .I am newbie to nginx, can anyone help me on
optimizing bandwidth security for nginx? My particular host config settings
are given below :-

limit_conn_zone $binary_remote_addr zone=addr:5m;
server {
listen 80;
server_name content.com;

client_max_body_size 800m;

limit_rate 100k;
# access_log /websites/theos.in/logs/access.log main;

location / {
root /var/www/html/site;
index index.html index.htm index.php;

}
location /files/videos {
root /var/www/html/site;
limit_conn addr 1;
}

location ~ \.(flv)$ {
flv;
root /var/www/html/site;
limit_conn addr 1;
valid_referers none blocked content.com;
if ($invalid_referer) {
return 403;
}
}

I think the above config is enough to identify the issue. please let me
know if you understand about what i am trying to explain.
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Optimize nginx stream

shahzaib1232 January 19, 2013 08:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 265
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready