Forum Discussion

matthew_b_16251's avatar
matthew_b_16251
Icon for Nimbostratus rankNimbostratus
Nov 11, 2015

Irule to redirect certain device types to a specific pool member

Hi all,

 

I have a requirement to create an irule that will redirect all traffic connecting with a specific device type header to a specific member in the pool only. All other traffic must be load balanced with source address affinity.

 

Does the below syntax look correct

 

when HTTP_REQUEST { if { [HTTP::header exists "X-DeviceKey"] } { node xx.xx.xx.xx 80 } else { persist source_addr } }

 

Many thanks in advance Matt

 

2 Replies

  • Looks good, but you may also need to add a

    persist none
    before your node selection so you don't have an unwanted persistence entry. This will also require a OneConnect profile to function as you want it to.

  • Hi Brad thanks for your help.

     

    I will give the below Irule a try over the next few weeks many thanks;

     

    when HTTP_REQUEST { if { [HTTP::header exists "X-DeviceKey"] } { persist none node xx.xx.xx.xx 80 } else { persist source_addr } }