Forum Discussion

Elias_O_16228's avatar
Elias_O_16228
Icon for Nimbostratus rankNimbostratus
Apr 22, 2013

Redirecting request based on port number

I have two application servers as pool members to multiple pools. I want to be able to load balance based on port.

 

For example, If a user click first link, load balance staging pool. If user is in staging_pool and if user decides connect to development_pool from there, click the link that is in staging application.

 

Note: This is working currently but because I have to create Virtual Server for each pool. I don't want that.

 

when HTTP_REQUEST {

 

switch -glob [HTTP::host] {

 

http://example.mtd.today.com:8088/tuesday/ { pool Stagin_Pool }

 

http://example.mtd.today.com:8089/wednesday/ { pool Management_Pool }

 

http://example.mtd.today.com:8090/thursday/ { pool Development_Pool }

 

http://example.mtd.today.com:8091/friday/ { pool Test_Lab_Pool }

 

default { pool Production_Pool }

 

}

 

}

 

 

Thanks for your help.

 

18 Replies