Forum Discussion

Phil_53695's avatar
Icon for Nimbostratus rankNimbostratus
Sep 01, 2011

irule to send requests for another port to another pool in vip




If I have a pool that uses port 8080 in it and want to also process 8081 to the same nodes (IIS servers) would it be possible to use an irule to do so?



Thanks for any input

6 Replies

  • I forgot to mention that I believe I would simply create another pool in the VIP and setup the nodes for 8081. So for instance if they come in on port 80 it automatically sends to the port 8080 currently. With adding another pool in and if they use the url with the :8081 then I would want the irule to send it to the 8081 pool.
  • Hi Phil,



    What logic do you want to use to select the pool members on port 8080 versus 8081? Is the client making requests on two different destination ports or two different hostnames?



  • when HTTP_REQUEST {


    if {[HTTP::uri] equals {}} {HTTP::uri {pool www_domainl_net_8081_pool}







    I believe this should work. This is given they use the syntax.. Any other request would just put them into the default 8080 pool that is currently running. I have not tested this yet though.
  • The URI will never be exactly You could have a hostname of exactly Or you could have a URI with an absolute URI like



    I'm still not sure what you want to do or how you have your virtual server configured. If what you have there doesn't work, can you give some more detail on what logic you're trying to implement? What is the relationship between the client requests and the 8080 pool and 8081 pool?



  • Thanks for the reply. OK what I am trying to accomplish.


    1. I have an existing VIP that has a pool in it that sends the users to the nodes using 8080.


    2. I'm looking to use the same VIP and add a 2nd pool with node members for port 8081.


    3. I assume if I setup an irule to redirect any incoming 8081 requests to send them to the 8081 pool nodes.


    Does that make sense?


  • why won't u create 2 virtual servers?

    is there anything i missed?

    [root@edelweiss:Active] config  b virtual bar80 list
    bvirtual bar80 {
       pool foo8080
       ip protocol tcp
    [root@edelweiss:Active] config  b pool foo8080 list
    pool foo8080 {
       members {}
    b[root@edelweiss:Active] config  b virtual bar8081 list
    bvirtual bar8081 {
       pool foo8081
       ip protocol tcp
    [root@edelweiss:Active] config  b pool foo8081 list
    pool foo8081 {
       members {}