Hi,

I am trying to write some throttles that would limit concurrent connections
for Range requests + specific urls. For example I want to allow only 2
concurrent range requests downloading a file
/public-api/v1/fs-content-download

I have a working rule:

stick-table type string size  1M expire 10m store conn_cur
tcp-request inspect-delay 5s
acl is_range  hdr_sub(Range) bytes=
acl is_path_throttled path_beg /public-api/v1/fs-content-download
tcp-request content track-sc1 base32 if is_range is_path_throttled
http-request deny if { sc1_conn_cur gt 2 } is_range is_path_throttled

Just wanted to see if there is a better way of doing this? Is this efficient
enough. 

I need to include the query string as well in my tracker, but I could not
figure that out.

Thanks
Sachin




Reply via email to