Forum Discussion

Fabrizio_Chiava's avatar
Fabrizio_Chiava
Icon for Nimbostratus rankNimbostratus
Mar 08, 2011

iRule Load Balancing many services

Hi all,

 

I need to performing load balancing with an iRule that it should discriminate the pool based to host. In addiction, I need to rewrite the URI always based on host and I need in the future to balance services. I create this one:

 

 

when HTTP_REQUEST {

 

switch [string tolower [HTTP::host]] {

 

 

"www.site1.com" {

 

if { [HTTP::uri] == "/" } {

 

HTTP::uri /

 

}

 

pool Pool_1

 

}

 

"www.site2.com" {

 

if { [HTTP::uri] == "/" } {

 

HTTP::uri /

 

}

 

SSL::disable serverside

 

pool Pool_2

 

}

 

}

 

}

 

 

I also create a VS that listen to 443 port that support SSL offload with certificate. The goal is:

 

- If I connect to www.site1.com, BIGIP should balance in HTTPS and then use clientSSL and serverSSL profile.

 

- If I connect to www.site2.com, BIGIP should balance in HTTP (the real server is in HTTP). It should be necessary perform a redirect?

 

 

Thanks in advance

 

Best Regards

 

Fabrizio.

 

 

No RepliesBe the first to reply