Forum Discussion
irule to respond custom http code when all of the pool members reach their connection limit
Hello,
We have a Virtual Server that is heavily used by clients. (There are approximately 180,000 to 250,000 active connections at all times.)
We load balance six servers on this Virtual Server, and a connection limit is applied to them.
We wanted to create an irule that would return special HTTP codes (like HTTP 429) to clients when all members in the pool reached their connection limit.
We generated it via the LB_FAILED event, but this didn't work as expected. We responded to some clients with special HTTP codes, even though the servers weren't within their limit.
We're currently testing LB_QUEUED, but we're not sure if it will work.
Do you have any suggestions?
Thanks
1 Reply
- Teerarat
Cirrostratus
Hi
Can you try irules below,
when HTTP_REQUEST {
if { [active_members [LB::server pool]] == 0 } {
HTTP::respond 200 content "<html><head><title>Service Unavailable</title></head><body><h1>Sorry, our service is temporarily unavailable. Please try again later.</h1></body></html>"
}
}
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