Forum Discussion
Bandwidth controller - maximum number of users/connections?
Hello
We currently have a bandwidth policy applied to one of our virtual servers in order to limit the amount of bandwidth each unique source IP gets. The iRule is as follows:
when CLIENT_ACCEPTED {
set CDNcookie [IP::remote_addr]
BWC::policy attach CDN_throttling $CDNcookie
}
The bandwidth policy is named CDN_throttling, has a maximum rate of 500mbps and a maximum rate per user of 250mbps. The issue we're seeing is that when too many devices from the same source IP download files from the virtual server, their transfer rate is so slow that it times out. Is it possible to limit the number of users or connections that can connect simultaneously? For example, rather than have 100 devices connect and download simultaneously, only allow 20 at a time and once a connection is freed up allow a new one.
Thanks
AK
Ah okay. Maybe you could use the iRule in this article:
https://devcentral.f5.com/s/articles/advanced-irules-tables-20451
- littlebunnyNimbostratus
Hi Niels
Rather than an overall connection limit, we want to have a limit per-unique source IP. For example if 100 devices try to connect with a source IP of 1.1.1.1, only 20 of them should be allowed simultaneously. If another 100 devices try to connect at the same time with a source IP of 2.2.2.2, they should also be allowed 20 connections. Is there a way to do this using the method you suggested or does it require an iRule?
Thanks
AK
Try making the following changes:
Set the connection limit of the pool member to 20 connections.
Additionaly you could enable 'Request Queueing' on the pool itself. Instead of rejecting a new connection when the limit of 20 is reached, it will queue the connection and send it to the pool member when there is some capacity again.
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com