Forum Discussion

Chris_Wentland2's avatar
Chris_Wentland2
Icon for Nimbostratus rankNimbostratus
Aug 17, 2005

Map Class to Node

Hey,

 

 

I'm migrating an environment from 4.5 to 9.0. The 4.5 environment uses the map class to node function under Node Select Expression to map connections to the node they were originally connected to. We are parsing the weblogic cookie and mapping based on a unique value. Anyone know how I can do this in version 9???

 

 

Node Select Expression Value in 4.5:

 

 

mapclass2node(getfield(http_cookie("WebLogicSession"), '/', 2), plmqa-2050_class)

 

 

Sample Class File Content:

 

 

plmqa-2050_class

 

 

String

 

 

52456140 3.32.106.204:2050

 

52456141 3.32.106.205:2050

 

52456142 3.32.106.206:2050

 

52456143 3.32.106.207:2050

 

52456144 3.32.106.208:2050

 

 

Thanks in advance!
  • I will try this tomorrow!! One other question. We have 23 applications that are on the same VIP, but 23 separate ports. We have 23 separate class files as well. And this is all done 3X for QA, Load Test, and Prod. Is there an easy way to remove the port from the class file, so I can have one class file for everything instead of one per VIP?

     

     

    Thanks again!!

     

     

    Chris
  • unRuleY_95363's avatar
    unRuleY_95363
    Historic F5 Account
    Yes, you can leave the : part out of the class and then add it in the iRule. Something like this assuming the destination port is the same:

    
    when HTTP_REQUEST {
       set id [getfield [HTTP::cookie "WebLogicSession"] "/" 2]
       node [findclass $id $::plmqa_2050_class " "] [TCP::local_port]
    }