I added some features to version 1.2.3, but since nginx moves forward,
like to see if there’s a way to put those as permanent patch

The features refers to limit_rate_after directive and a new one
limit_rate_max, both used to control bandwidth.

I changed limit_rate_after to take a variable as well, not just config.
I also added limit_rate_max to control the speed of the initial bytes
that are defined with limit_rate_after.

So basically right now I can send 2MB at a speed of 600KB and then slow
down at 100KB.

This is extremely useful for video streaming websites with huge traffic,
save a lot of bandwidth and get able to serve many more users at the

My config looks something like:

limit_rate_max 600k;
if ($arg_u) {
set $limit_rate_max $arg_u;

limit_rate_after 2m;
if ($arg_burst) {
set $limit_rate_after $arg_burst;

Here I can tell through the url what speed and when to slowdown, based
user account, so premium users receive the video and start playback
Is anyone interested to push this changes/features to nginx dev team?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs