Limit_rate for different resolutions !!

Francis Daly francis at daoine.org
Sun Jul 21 20:13:12 UTC 2013


On Sun, Jul 21, 2013 at 02:29:26PM +0500, shahzaib shahzaib wrote:

Hi there,

> Well the rate_limit was 180K before for all the files because i added it
> into the server{} block and these location blocks were actually means the
> rate_limit 180k will apply to any flv,mp4,jpeg file and after adding -720
> before the location ~\.(mp4)$, the only 720p files will be served on
> limit_rate 500k and the rest would remain the same which is 180k in my case.

Good stuff -- each directive has a meaning, and if you wanted most
requests to have the 180 rate limit, then you put it in the right place.

Changing the "mp4" location to be "~ -720\.mp4$" means that those ones
will have the higher rate; but if you don't have a second location{}
for the other mp4s, they won't see the "mp4" directive, and so may not
be served correctly.

> I didn't used curl instead wget.

That's fine -- wget does a similar task to curl; and it's always good
to be able to demonstrate that the change you made fixed what was broken
(and didn't break what was already right).

Cheers,

	f
-- 
Francis Daly        francis at daoine.org



More information about the nginx mailing list