Forum Discussion

max_59289's avatar
max_59289
Icon for Nimbostratus rankNimbostratus
Jun 29, 2011

Selecting another server on server_data

Hi all, I'd appreciate any thoughts/suggestions with this:

 

 

 

When I receive a client request (POP3) containing their credentials, I need to first do a query to determine the pool to use for their login request. So I don't find out which pool gets the original request until server_data, but at that point, I can't use things like pool, node, LB::reselect. Does anybody know of some other way to pass a tcp payload to another server in server_data?

 

  • Hi Max,

     

    Have you tried using the LB_SELECT event which is triggered when LB has selected a pool member?

     

     

    I hope this helps

     

     

    Bhattman

     

     

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus
    You can drop an existing connection and create a new one as well... In the middle of the stream... IIRC there's an LDAP proxy iRUle there that does this (Even saves your credentials and re-presents them).

     

     

    H
  • Hello,

     

     

    I need to process a query before pooling, and by that point, I'm already in the server_data event, and the client request still needs to be sent to the proper pool. My workflow is something like:

     

     

    Client:

     

    Irule:

     

    client_data: send query to determine pool

     

    server_data: parse results to determine pool to use, then ??send credentials to pool??

     

    server_data: pass authentication results back to client

     

     

    I was going through the TCP/LB command list and didn't see anything that would let me establish a connection to another server in server_data. Calls to node/pool do nothing, and LB::reselect isn't supported in server_data either. Is there some other command that I should be using to do this?

     

     

    And Hamish, are you talking about http://devcentral.f5.com/wiki/default.aspx/iRules/LDAPProxy.html ? That rule seems to handle pooling on the client_data end... What calls can be used to create a new connection in server_data? That would pretty much solve my problem.

     

     

    Thanks,

     

    Max