Forum Discussion

John_Masgalas_4's avatar
John_Masgalas_4
Icon for Nimbostratus rankNimbostratus
Aug 29, 2006

Help with iRule

I am new to all of this and am not "fluent" with writing iRules. I have played with a few small tests. Our company just purchased a Big IP to load balance applications. For now we want to test the switch with a web app we have called the IS Portal.

 

 

Here is the scenario:

 

 

We have two servers:

 

 

Server 1, 172.17.40.159 serves the app via http://encarta:8080/ISPortal

 

Server 2, 172.17.40.160 serves the app via http://ralph:8080/ISPortal

 

 

I created a pool using these two servers. I've also created a virtual server with an IP of 10.16.22.17 named Director. I am using round robin load balancing.

 

 

We need all requests for http://director to go to the proper server using the round robin method. How can I do this using an iRule?
  • Jason_Roppolo_3's avatar
    Jason_Roppolo_3
    Historic F5 Account
    I think I will need more information in order to assist you.....

     

     

    However, if I understand what you are asking based on the information provided it looks like you want all requests to http://director to go to http://director/ISPortal. The request will then be proxied to the two servers in the pool encarta and ralph on port 8080.

     

     

    You can do this with this iRule:

     

     

    when HTTP_REQUEST {

     

    HTTP::redirect "http://director/ISPortal"

     

     

     

    If your virtual server is listening on port 80 this will work fine since the requests will automatically be proxied to the pool members on port 8080 and there is no need for the user to put in http://director:8080/ISPortal they can simply go to http://director and be directed to http://director/portal

     

     

    Please let me know if this does not accomplish what you are trying to do and I will see what else I can do to assist you.

     

  • I don't want http://director to go to http://director/ISPortal. Let me see if I can explain this more clearly.

     

     

    We have two servers that host applications. Both are hosting ISPortal but at two different URLs. Server 1 is hosting at http://encarta:8080/ISPortal. Server 2 is hosting at http://ralph:8080/ISPortal.

     

     

    I need to load balance the above two URLs. So that when a user goes to http://Director they get sent to one of the above URLs.

     

     

    In other words I want http://director translated to either http://encarta:8080/ISPortal or http://ralph:8080/ISPortal depending on which server is next in line to recieve a request.

     

     

    Let me know if this is unclear or if you need more information.
  • Jason_Roppolo_3's avatar
    Jason_Roppolo_3
    Historic F5 Account
    Contact me at j.roppolo@f5.com I would be more than happy to help you with this.