ashk
Sep 15, 2023Cirrus
iRule for sending traffic to a different pool based on the Hostname.
Team,
I have a virtual server with port 8899 configured as PerformanceLayer4 and FastL4. I am using couple Host names to drive thru this Virtual Server.
I want to send the traffic to pool_magnus when the traffic is coming with host magnus.com.
I wrote an Irule as below but its not working I can see the host coming and still going to the default pool. I think the traffic coming is not http traffic its TCP traffic. Need assistance. 🙂
when HTTP_REQUEST {
set host [string tolower [HTTP::host]]
if { $host eq "magnus.com" } {
pool pool_magnus
}
}
you need to ensure that you have http profile binded to the VIP in order to have irule attached thats all you need.
If you are planning to use traffic policies then you can refer the below