For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Oguzhan_K's avatar
Oguzhan_K
Icon for Nimbostratus rankNimbostratus
Jul 28, 2025

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

  • 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>"
        }
    }