Forum Discussion

route_to_null_0's avatar
route_to_null_0
Icon for Nimbostratus rankNimbostratus
Feb 23, 2009

Coke selection based on url

I want selct persistance cokes if the request is not a .wav.

 

exm

 

http://192.168.4.70/myurl/4.8.9.11443.p14/Main/Audio/jb_00504.wav.

 

 

and selece cokes none if it is above.

 

need irule for the same

4 Replies

  • Here is an example for using cookie persistence based on the path in the request:

     
     when HTTP_REQUEST { 
      
         Check requested path 
        if {[HTTP::path] ends_with ".wav"}{ 
      
            Use cookie persistence (session - no timeout) for this request 
           persist cookie insert my_persist_cookie 0 
      
        } else { 
      
            Use no persistence for this request 
           persist none 
        } 
     } 
      
      
     Aaron
  • This was a great help.

     

    I have another q,

     

    How can I bring the node down gracefully - means after all exsiting connections are closed but not droped, node stop accepting new connections and so without lossing any conenction i can bring the node down or out of pool.

     

    Thanks

     

    Shyam
  • hi Shaym,

     

     

    You can change the state of a node to one of the following:

     

     

     

    From the online help:

     

     

    State

     

     

    Specifies the current state of the node.

     

     

    * Enabled (All traffic allowed): Specifies that the node can handle any connection.

     

    * Disabled (Only persistent or active connections allowed): Specifies that the node can handle only persistent or active connections.

     

    * Forced Offline (Only active connections allowed): Specifies that the node can handle only active connection.

     

     

     

     

    Aaron