ahmed-ys
Feb 27, 2023Altostratus
F5 LTM
Hi Team I want to ask how can do load balancing for both servers in the following path: https://192.168.10.1:8080/path1/ https://192.168.10.2:8080/path1/ I don't know how can put the path in the...
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.
Hi Paulius
actually, I need to do a load balance with /Path1 for both servers
https://192.168.10.1:8080/path1/
https://192.168.10.2:8080/path1/
so I can go with VS for example 10.10.10.10:8080 and the backend will be both servers, so how can achieve the load balance with /path1/ .. this is my equation because I did a LTM with only ports not include path
Thanks
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