ltm rule command ONECONNECT detach
iRule(1) BIG-IP TMSH Manual iRule(1)
ONECONNECT::detach
Detaches server-side OneConnect connections.
SYNOPSIS
ONECONNECT::detach BOOL_VALUE
DESCRIPTION
Controls the behavior of a server-side connection when a OneConnect profile is on the virtual server. The
default behavior is that the server-side connection detaches after each response is completed, and a new load
balancing decision and persistence look-up are performed for every request. Disabling detaching prevents this
behavior. Note: the use of the terms "request" and "response" imply the presence of a supported layer 7
profile (e.g. the HTTP profile) on the virtual server. An iRule can also detaching the server-side connection
using the LB::detach command. Note that this command has no impact on whether or not the server-side
connection will return to the idle connection pool when the client connection closes. The ONECONNECT::reuse
command controls this behavior.
Syntax
ONECONNECT::detach [enable | disable ]
* When disabled, the server-side connection will not detach.
* When enabled, the server-side connection detaches after each layer
7 transaction.
RETURN VALUE
VALID DURING
EXAMPLES
when HTTP_REQUEST {
set headreq 0
if { [HTTP::method] == "HEAD" } {
# We are a head request. Set the flag for checking in the response.
set headreq 1
}
}
when HTTP_RESPONSE {
if { $headreq } {
# Response to HEAD request. Detach after done.
ONECONNECT::detach enable
ONECONNECT::reuse enable
}
}
HINTS
SEE ALSO
CHANGE LOG
@BIGIP-9.0.0 --First introduced the command.
BIG-IP 2020-06-23 iRule(1)