Forum Discussion

gtfx_34287's avatar
gtfx_34287
Icon for Nimbostratus rankNimbostratus
Dec 28, 2009

Disabel node for a specific request

Hello,

 

 

I have a virtual server that manages many hosts on Apache level with virtual hosts. What i need to do is the following:

 

 

When a request comes for a specific [HTTP::host] i want it to load balance it on all the members of the pool for that specific VIP. On any other cases i want to leave one specific member out of it just for that request.

 

 

What is the best way to do it?

 

 

Thanks in advance.

 

Leonid
  • What are the conditions you want so that you leave that member out of the request?

     

     

    Bhattman
  • for instance i have 5 domains that are getting handled by that VIP.

     

    When a request comes to 'a', 'b' and 'c' domains i want to use this specific member as part of the pool. When the request is for other domains, do not use it.

     

     

    I hope this is more clear.

     

     

    Thanks
  • I suppose you can do the following

    define pool which does not contain the member that will be used for by A, B and C.

     
     when HTTP_REQUEST { 
       switch -glob [HTTP::host] { 
          "www.domaina.com" - 
          "www.domainb.com" -  
         " www.domainc.com" - { node 10.1.2.200 80 } 
         default { pool pool_others } 
        } 
     } 
     

    I hope this helps

    Bhattman
  • From what i understand, this will redirect all thhe traffic to the node. I want to be part of the pool, just as any other member in some cases and out of the pool at the other.

     

     

    Currently i"m thinking about creating two almoust identical pools with this node only in one of them and doing this method.

     

     

    Thanks
  • It will only direct Domain A, B and C to that node and the rest to the pool that does not contain the node. Unless you need the opposite. Then you would do the opposite with the irule.