Forum Discussion

Daniel_01_13443's avatar
Daniel_01_13443
Icon for Nimbostratus rankNimbostratus
Sep 26, 2013

Virtual Server with Multiple Service Ports?

Hi,

 

I have two nodes (A and B) which offer two services through two different TCP ports (X and Y). I've created a Virtual Server with a dest_addr persistence profile for service X. This way, if all connections are in node A and it fails, they will go to node B and whenever node A becomes active, existing connections will remain on B and new ones will still be routed to B. The purpose for this V.Server is solely high availability.

 

My problem arises when trying to balance service Y depending on how X is being balanced: I want service Y to be routed to the active node on service X. For my application, both services must be on the same node and I can't find a way to do so. The only solution I would get is to configure the virtual server with two different service ports using the X service as the criteria for the load balancing.

 

Many thanks in advance.

 

Daniel

 

8 Replies

  • I'd suggest you use the Priority Group Activation feature at the Pool level to set a single server as active and one as passive. You can also use the Manual Resume feature to prevent automatic failback if a failed node returns to service.

     

    Alternatively you could use 'Match Across Services' option with the persistence profile but I'm not sure this fulfils all your needs.

     

  • Hi, many thanks for your answer.

     

    Actually the sticky persistence and the failback is working as I expected for my virtual server. The problem is whenever I want to create a second virtual server (for service Y) that routes all connections to the active node in service X. It would be great to know how to create that dependency through iRules or something.

     

    Thanks

     

  • Would the Match Across Virtual Servers or Pools features not help? I guess there's always the risk they will hit service Y before they hit X though?

     

    Alternatively, why not use just one VS with a wildcard Service Port?

     

  • Hamish's avatar
    Hamish
    Icon for Cirrocumulus rankCirrocumulus

    You want to configure a persistence profile using source-ip with match across services enabled. That should then match two services with the same IP address to persist to the same node IP.

     

    There's also options there for match across VS's (Which ignores the VS IP's) and match across pools.

     

    H

     

  • Thanks guys for the answers. The match across servers/pools might do the trick. I guess I cannot use a single VS with a wildcard because each service is exposed from a different IP address (one is for external use and the other for internal use). So I guess the I must use two VS's?

     

  • Hi, I always had the Match across VS enabled. However, enabling the Match across Pools option won't work. I'm trying to find out how to do it from the F5 but maybe this can only be done at application level :(

     

  • Probably because you're using dest_addr persistence. I guess you could try enabling CARP with it although after that the Match Across options are redundant I think. An iRule is an option but it'll be hard to mimic typical load balancing in code.