Forum Discussion
iRule Pool URI single node
Hello DevCentral,
I want to ask you if is possible to do the following with an iRule:
I virtual server that have a pool with a single node ( 10.x.x.x ). Virtual server listens on port 443, Node listens on port 8443 but have different apps identified by : & how i can manage the request on the VS in order to have the following flow:
--> node1/app1 --> node2/app2
There is something like : pool/app1 , pool/app2 ?
Thanks in advance
Best regards,
M.
4 Replies
- Samir_Jha_52506
Noctilucent
I never tired but its bit difficult to send traffic to same port & Node with 2 different apps. If you will have two ports(services) with same node then iRule can help.
- Stefan_Klotz
Cumulonimbus
You mentioned that you have just ONE node in the pool, but in your example you are referring to TWO:
https://virtualserver/app1 --> node1/app1 https://virtualserver/app2 --> node2/app2Assuming you have really just ONE node in the pool, there is nothing you must adjust with an iRule, because the incoming URI (/app1 or /app2) will be used towards the node/server as well.
But if you really have different nodes/servers for different URIs you can create a dedicated pool for each URI and handle the pool assignment via iRule (no default pool configured on the VS). Depending on the amount of different URIs you can either work with the switch-statement or just with simple if-statements.
when HTTP_REQUEST { if { [HTTP::uri] starts_with "/app1" } { pool } elseif { [HTTP::uri] starts_with "/app2" } { pool } .... } when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/app1*" { pool } "/app2*" { pool } ... } }As you mentioned that your VS is running on port 443, I assume you have the certificate installed on the BIG-IP.
Ciao Stefan 🙂
- MDPF52_180608
Nimbostratus
No, sorry was a typo. This is correct : --> node1/app1 --> node1/app2
- Stefan_Klotz
Cumulonimbus
You don't need to direct differently, because there is only ONE node available.
Everything will be handled on webserver level, means if the incoming URI starts with /app1 server will respond with content of app1 and if it's /app2 server will respond with content of app2.
So if the app-separating URI will already used to access the VS, nothing special needs to be configured on the BIG-IP.
Ciao Stefan :)
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com