27-Feb-2023 11:58
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 pool to attach it in Virtual server and also how add
27-Feb-2023 15:18
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.
27-Feb-2023 16:00
@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.
27-Feb-2023 23:42
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
28-Feb-2023 06:42
@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
28-Feb-2023 03:33
Thanks Hooni, my problem with load balancing for URL Path
28-Feb-2023 12:06
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
06-Mar-2023 08:49
Thanks, Mike maybe my question is not clear, the question is the following, is the path of the server should be put into consideration when we will configure the virtual server? if the path is the same in two backend server
06-Mar-2023 11:01
Hi, @ahmed-ys
In F5, you have the option of considering the HTTP path to perform load balancing decisions - for instance, URIs matching /path1/* are load-balanced to one pool, URIs matching /path2/* are load-balanced to a different pool. Just google it, and you'll find multiple examples of how to do that using iRules.
But if you need to do it in this scenario, I cannot say. It depends on the needs of the application itself. The best person to answer that question is the application owner/developer. Did they give you any specific instructions regarding HTTP path?
/Mike
30-Apr-2023 02:22
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