cancel
Showing results for 
Search instead for 
Did you mean: 
Login & Join the DevCentral Connects Group to watch the Recorded LiveStream (May 12) on Basic iControl Security - show notes included.

Irule for fire and forget https virtual server

Paul_Z
Altostratus
Altostratus

Hi, I'm trying to setup a virtual server that will accept requests from some internal clients and immediately return a 200 response and also fire the request at some external servers through an irule. We don't care about the response from the external server, the most important thing is that the client gets a quick 200 OK response so they are not interrupted.

I have a simple irule doing a dns lookup and forwarding the request to the external servers, but I'm struggling where to set a response that would prematurely go to the client.

Is this even possible?

5 REPLIES 5

Angelo_V
Cirrus
Cirrus

Hi Paul, have you seen the "HTTP :: respond" statement yet?

It doesn't exactly do everything you ask but it could be a starting point.

Paul_Z
Altostratus
Altostratus

Hi, yes I've tried http::respond clientside at event HTTP_REQUEST_SEND, but the issue is the script stops & the request does not seem to be sent to the external server.

I saw some irules that generated a new request using the "connect" and "send" commands

 

you can prepend them to the HTTP command: respond

 

https://clouddocs.f5.com/api/irules/SIDEBAND.html

Paul_Z
Altostratus
Altostratus

Thanks, I'll look into that, I've just tried TCP::respond (which doesn't close the connection) and this seems better.

Paul_Z
Altostratus
Altostratus

Hi, the TCP::respond wasn't working, I've tried sideband, but whatever I do the connection to the client terminates before the request is sent to the server.

The request to the external server is https, so I have had to put another virtual server in the route as it seems sideband connections have to be non ssl. (I don't have irules LX setup).

Client req https -> virtual -> sideband http -> virtual -> https external server

It seems impossible to do an async fire and forget request!