Forum Discussion

karan12_154818's avatar
karan12_154818
Icon for Nimbostratus rankNimbostratus
Jul 25, 2014

LTM with Virtual Server with Pool Member listensing on different port Numbers

Can i configure Virtual Server on LTM with pool Members going to different port numbers and then use i-rule using URI contains to use service from different node.Like as below:-

 

when HTTP_REQUEST { if { [HTTP::uri] contains "HYPPLANNING" } { node 10.x.x.x%x:x } if { [HTTP::uri] contains "DRM" } { node 10.x.x.x%x:y>>>>>>>>>>same pool member listening on different port numbers. } }

 

I mean i use nodes added to pool member listening on different service port x and y and use URI contains to get service from different node.

 

6 Replies

  • Yes you can, have a look : https://devcentral.f5.com/articles/irules-101-05-selecting-pools-pool-members-and-nodes

     

  • Thanks but after adding same pool member on different service port and making i-rule as below:-

     

    when HTTP_REQUEST { if { [HTTP::uri] contains "HYPPLANNING" } { node 10.x.x.x%x:x }

     

    if { [HTTP::uri] contains "DRMSERVICE" } { node 10.x.x.x%x:y } }

     

    Though 1st URI conatins works fine and open url but second one listening on different service port does not works fine.With curl test gives 404 or 405 and intermittently code 200 but does not opens up.But when i give other way round in i-rule to make it work like below matching part of URI path

     

    if { [HTTP::uri] starts_with "/oracle-epm-drm-webservices" } { node 10.x.x.x%x:y

     

    It displays the xml page from 10.x.x.x opening up on service port y but does not opens up the URL.

     

    • MiLK_MaN's avatar
      MiLK_MaN
      Icon for Nimbostratus rankNimbostratus
      Make sure you have oneconnect enabled on your virtual server or it will not send the traffic to different node for the same connection flow. SOL9800: Using an iRule to load balance HTTP requests to multiple pools http://support.f5.com/kb/en-us/solutions/public/9000/800/sol9800.html
  • Thanks for the reply!!BUt i have already enabled Oneconnect on the virtual server still the same issue is there!!

     

  • I have enabled onceconnect on the Virtual Server.Also ports are open from BIGIP self ip towards the backend server.Still HTTP uri matching DRMSERVICE is not showing up.It throws HTTP 404 code again and again.On trying to get TCPDUMP see RST from BIGIP self Ips dont knw why this is happening through backend listening ports are open on firewall.Also in the TCPDUMP also shows code 404 on going towrads DRMSERVICE uri.Further modfied i-rule as below:-

     

    when HTTP_REQUEST { if { [HTTP::uri] contains "DRMSERVICE" } { HTTP::respond 301 Location "https://170.x.x4.x/oracle-epm-drm-webservices/DrmService?wsdl" node 10.x.x.x%x:y } elseif { [HTTP::uri] contains "HYPPLANNING" } { node 10.x.x.x%x:z } Any ideas to troubleshoot this issue or any more ideas do i need to make persist cookie insert in i-rule or use switch -glob [HTTP::uri] kind of i-rule will that help!!

     

  • You could probably make your life a little easier by creating separate pools for each port service and then switching on that:

    when HTTP_REQUEST {
        log local0. "request URI: [HTTP::uri]"
        switch -glob [string tolower [HTTP::uri]] {
            "*hypplanning*" {
                log local0. "going to hyp_pool"
                pool hyp_pool
            }
            "*drm*" {
                log local0. "going to drm_pool"
                pool drm_pool
            }
        }
    }
    

    This has the added benefit of allowing you to 1) scale out each service independently, and 2) assign individualized health monitors per pool. If you see traffic going to the DRM pool (or node) but you're getting a 404 or 405 response, that likely indicates something is wrong with the request. A 404 is a "file not found", so I'd look closely at the URI that you're sending in the request.