Alteon group selection by HTTP Host header using AppShape++
On the previous post I have used Content Rules to configure group (server pool) selection based on the Host header in HTTP.This lab is also based on the lab setup I am using.
This time I'll do the same, but with AppShape++, which is similar to F5's iRules.
I want a2.dans-net.com to be served by SRV1 and b2.dans-net.com to be served by SRV2, any other host should be served by all web servers.
I'll use VIP 10.86.3.10 as the VIP. Here is how I edit my /etc/hosts files, which is c:windowssystem32driversetchosts :
10.136.6.10 a2.dans-net.com
10.136.6.10 b2.dans-net.com
/c/slb/group a2_dans
add 1
/c/slb/group b2_dans
add 2
Next I'll write the AppShape++ script which will select a group based on the Host header:
attach group a2_dans
attach group b2_dans
when HTTP_REQUEST {
switch -glob [HTTP::host] {
"a2.dans-net.com" {
group select a2_dans
}
"b2.dans*" {
Continue reading