Asynchronous multiplexing client requests in oneconnect session
We are in a process of the virtual server configuration that is able to multiplex many client TCP sessions into one server side session. The TCP payload is simple, non-HTTP and session is single request/response oriented. So far we were successful in configuring TCP client session multiplexing using oneconnect profile and customized pool (request queuing) and member (connection limit) options. The communication between clients and server is synchronized, the first client is served first, the second is next and so on. All client's requests beside serviced client are being held in pool queue until serviced client releases the server side of connection.
The next task is to achieve asynchronous communication meaning that each client can send its request through oneconnect session toward the server without waiting for previous request to complete.
We were successful in sending asynchronously client requests using iRule and LB:detach in CLIENT_DATA event (see bellow). The problem is to reattach server and client side session when server response arrives. When response arrives LTM has no client side connection to send data to.
We are thinking to use iRule that keeps global session table with unique id field (taken from client request and which can be found in server response) and any client session identification (that F5 keeps in its connection table), if possible.
There are numerous iRule functions that lack any kind of description or example code. Some of them are LB::connect, LB::context_id, LB::src_tag and LB::dst_tag that can be found useful. Is it possible while hitting server side event in iRule to "see" all client side sessions and to reconnect with the specific one?
The other approach I have not tested yet is to use UIE persistence with unique data from the request to pair server and client side.
Is there a way to reattach client and server side connection using iRule? Or any other mechanism known to you?
Thanks for any help.
iRule that enables asynchronous requests in one oneconnect session.
when CLIENT_ACCEPTED {
TCP::collect
}
when CLIENT_DATA {
TCP::release
TCP::collect
TCP::notify request
}
when USER_REQUEST {
LB::detach
}
when LB_FAILED {
log local0. "LB_FAILED"
}