Forum Discussion

Harris_Hassan_3's avatar
Harris_Hassan_3
Icon for Nimbostratus rankNimbostratus
Feb 20, 2008

Issues load balancing web servers

Hi guys ,

 

 

Appreciate some help for one of my installations that didn't go as planned due to some oversight on both my and customers end.

 

 

Initially it seems like a normal web server LTM setup , however , instead of load balancing a single site for both servers ,it seems that each server caters to a seperate website (HouseLoan & StudentLoad). Shocked on the prospect that no load balacing could be done , i was relieved however that the application team explained that contents for both sites were on the same server.

 

 

Implementation date was rescheduled and i would like some advice on how to set this up. Beforehand , some details i managed to get (plus i attached a diagram , no real IPs so correct me if you feel IP's are a bit iffy) :

 

 

DNS access is as diagram. However , on internal LAN , when keying in http://10.2.1.3, i get directed to http://10.2.1.3/HouseLoan. Reverse works for 10.2.1.4 and Student Loans.

 

 

According to application , it is scripted in the servers that once a http request is made to the server it'll serve 10.2.1.3/House and 10.2.1.4/Student per server. I am however, able to access 10.2.1.3/Student & 10.2.1.4 when keying in manually.

 

 

Thing is , how do i do load balancing in this kind of situation? Is an irule needed to do the pointers ?

 

 

Initially , i set up a normal pool and Vs for the web servers , able to ping and telnet to port 80, but unable to access the pages. Was thinking of setting up 2 different Vs's , each with a VIP of 10.2.1.3 and 10.2.1.4 but access the same pool (web_pool), this method did not work however.

 

 

Do inform me if you require further clarification. Appreciate any help given and apologies for the english.

 

 

Thanks
  • There are several designs. The one of them is shown in the following.

     

     

    Name-based virtual hosting is used on the HTTP server. (Refer to Click here )

     

    Number of VIP on the BIG-IP is enough by one.

     

    NOTE: It is necessary to test by using not ip address but the host name.

     

     

    taro
  • Hi Harris,

     

     

    wondering where is the backend server default gw? it's point to F5 floating IP? if not, you might need to either change the server gateway point to F5 or enable snatautomap. this is because we need to force the return path back to F5 LTM.

     

    maybe you might want to test telnet backend server port 80 from F5 LTM, just to make sure not layer 2 problem.

     

     

    for your first question, wondering is both backend servers consists both applicaitons (houseloan and studentloan) content? if yes, we can use iRule to insert the particular uri for the applicaiton when it hit the correct VS.

     

    example:

     

    assuming your have VS 10.2.1.3 is for houseloan and 10.2.1.4 is for studentloan.

     

     

    VS

     

    ------

     

    VS_houseloan (pool members webserver1 and webserver2)

     

    VS_studentloan (pool members webserver1 and webserver2)

     

     

    write an irule,

     

    when HTTP_REQUEST {

     

    if { [HTTP::uri] contains "houseloan" } {

     

    pool houseloan_pool

     

    } else {

     

    HTTP::redirect "http://[HTTP::host]houseloan"

     

    }

     

    }

     

     

    * note: you might need to tweak the irule base on your application behavior

     

     

    associate this irule to VS_homeloan.

     

     

    with this configuration, F5 will do the uri redirection instead of backend server.

     

    once the traffic get load balance to the backend server with the correct URI, backend server should be able to send the request to the correct path, in this case will be houseloan path.

     

     

    do the same steps for studentloan.

     

     

    hope it works for you.

     

     

    regards,

     

    KY