Forum Discussion

10 Replies

  • Don't think you would look at the URI when configring VS. You would create a New Virtual server with the pool members 192:168.10.1 and 192.168.10.2 port 8080. You can use the "path" to create a https monitor and apply it on the pool. Don't know if that answered your question. 

  • Hi Guys

    I tested it and it's working If the path is the same for both backend servers so no extra configuration is needed, just put the VS with the port number in the configuration.

    This was my question and now it's working

    Thanks All for the help

  • ahmed-ys What I understand is that you have two pool members one with 192.168.10.1:8080 and another pool member on 192.168.10.2:8080 in a pool which is associated to a virtual server. Typically you send an HTTP request to a virtual server which might come in as "https://192.168.20.20/path1" or "https://192.168.20.20/path2" which automatically will load balance out to both pool members on their respective IP. Now if you only want "/path2" to go to the .2 server and "/path1" to go to the .1 server I would configure two seperate pools, one with the .1 in it and another with the .2 in it and then point to those pools with an iRule dependent on the path. Keep in mind that you do have to perform SSL termination on the F5 to do this. If I missunderstood your configuration or your question please provide some additional detail and we might be able to assist further.

      • Paulius's avatar
        Paulius
        Icon for MVP rankMVP

        ahmed-ys If you configure your virtual server (VS) to listen on 10.10.10.10:8080 and your pool members to be 192.168.10.1:8080 and 172.168.10.2:8080 and a request comes in for https://10.10.10.10:8080/path1 this should be balanced to either pool member without any additional configuration as long as your pool members are both passing the health monitor or if no health monitor is associated to the pool or pool members it will send traffic to the next available pool member. If this is not working you might consider running the following tcpdump to see if you can figure out why it isn't working. This particular tcpdump will capture all traffic coming from you client IP and destined to port 8080 which will include the VS IP, pool member IPs, and if you have SNAT configured it will show where the traffic is sent after the SNAT is applied.

        tcpdump -nni 0.0:nnp host <your_client_ip> and port 8080

         

  • The url path does not problem at load balancing.
    but if you want add the another path to each server, you resolve the add or rewrite method in iRule.

    • ahmed-ys's avatar
      ahmed-ys
      Icon for Altostratus rankAltostratus

      Thanks Hooni, my problem with load balancing for URL Path

      • Mike757's avatar
        Mike757
        Icon for MVP rankMVP

        Hi, ahmed-ys 

        Do you mean that only requests coming to /path1/* should be load-balanced, and any other requests should be denied?

        If so, you need an iRule (or a policy) that would enforce it.

        You also need an HTTP profile in your virtual server, and if the traffic is encrypted, you need Client and Server SSL profiles.

        /Mike