Forum Discussion

adrian_171483's avatar
Jul 23, 2015

irule not working

Hi I have deployed the following Irule.. but I am struggling to see why it wont drop traffic onto the correct pool

 

Traffic is hitting the https virtual server and matching against something in the Irule .. I can see hits on it.. but it doesn't seem to be dropping on the 5001 pool for some reason ? the 5001 Pool is listening ok, I was wondering if it needs to drop to a virtual server for 5001 instead of the pool ? or how could I check if its matching against the /dash at all and not just dropping straight onto the default pool.

 

when HTTP_REQUEST { switch -glob -- [string tolower [HTTP::uri]] { "/dash" - "/gateway" { pool 5001 } "/something*" { pool 9080 } default { pool 2443 } } }

 

2 Replies

  • Hi Adrian!

    The rule looks ok to me.

    Have you checked the routing? Where is the client coming from? The easiest way to exclude routing is to use the snat pool automap. Also, check the server netmask to make sure it's correct and routes back to the load balancer.

    Rewrote it with nicer syntax in case someone else has a comment.

    when HTTP_REQUEST { 
        switch -glob [string tolower [HTTP::uri]] { 
            "/dash" - "/gateway" { pool 5001 }
            "/something*" { pool 9080 } 
            default { pool 2443 }
        }
    }
    

    /Patrik

  • What happens if you logon to the load balancer shell and attempt to fetch the page from there?

    curl http://[server ip]:5001/dash

    /Patrik