Welcome! Log In Create A New Profile

Advanced

Patch limit_rate_max: for your review

All files from this thread

File Name File Size   Posted by Date  
limit_rate_max.patch 5.4 KB open | download crirus 10/26/2012 Read message
October 26, 2012 03:14AM
Hello

I have a new patch for Nginx. I use this server to stream videos. I needed
a way to burst the rate with limit_rate_after but controlled from config,
not at full throttle. Eg.: send 4Mb with 500KBps and the remaining with
90KBps.

This is useful when sending mp4 that have a 2 to 6MB of index data at the
beginning of the file and playback only starts after this is received. This
way I can start the video playback faster not after 20 seconds or so.
However, if you have 500 new users per seconds you can choke the bandwidth
so the need to control the burst speed.

I created a new config directive limit_rate_max that applies to initial
burst speed.
Another change I made is to put the limit_rate_after in server variables.
I need this to control the burst quantity on the fly based on url param.

if ($arg_burst){
set $limit_rate_after $arg_burst;
}

The index for each file is different and with this I control how much burst
we need, useful when users seek a lot and index is recalculated on seek for
each file...

If anyone can review this and find it useful, let me know, it works for my
needs.

I thank to Andrei (Latzease) for his contribution to this... he made it
happen.
---------------------------------------------------------------
Cristian Rusu
Web Developement & Electronic Publishing

======
Crilance.blogspot.com
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Attachments:
open | download - limit_rate_max.patch (5.4 KB)
Subject Author Posted

Patch limit_rate_max: for your review Attachments

crirus October 26, 2012 03:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 298
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