Forum Discussion

max_59289's avatar
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?


3 Replies

  • Hi Max,


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



    I hope this helps






  • Hamish's avatar
    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).



  • 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_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 ? 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.