Forum Discussion
LTM - iRule to check monitor status and route traffic accordingly.
Hello,
I have a request from a customer for a VIP with only one backend server on port 443. They want 2 monitors assigned: HTTPS and TCP_8300 (check if its listening on port 8300). Requested configuration: If only TCP_8300 is down, reroute to server on port 8200 or if only HTTPS monitor is down reroute to server on port 8200 – (I assume create another pool with server on port 8200)? If both are down - pool should be considered off-line (use default pool which has server on 443)
Is there an iRule that can check individual monitor status and route traffic accordingly? I have looked in dev-central and I haven’t got anything relevant.
7 Replies
- Samir_Jha_52506
Noctilucent
Without irule you can achieve this senerio.
Option 1.
Create pool with different memebers pors(i.e 443,8200,8300, etc.)
Add the highest ratio to 443 member port then next member ratio. And tune the config during non business hour.
Option 2.
Create port based pool. i.e. pool_443
Apply the irule.
- jaikumar_f5
Noctilucent
Samir,
From your Option 1 suggestion, that would be mean 443 member would take traffic, then followed by 8200 and lastly 8300.
I think the requirement is more of depends on...
- Send traffic to 443 port if both 443 & port 8300 are up.
- 443 port member has dependency on port 8300, if port 8300 is down. Then send traffic to member port 8200.
- 443 port member has dependency on port 8300, if port 443 itself is down. Then send traffic to member port 8200.
- Samir_Jha_52506
Noctilucent
Jay, as per above comments customer may be asking, if 443 port is down move traffic to 8300 port n if above ports(443,8300) down then move traffic to last member. Ratio weight method is good option here.
irule is another options to solve issue but need to understand exact requirement.
Happy to write iRule if user want.
- Jay_Vajjhala
Nimbostratus
can you please suggest an Irule for this
- AbhishekMarat_2
Nimbostratus
The server should only be configured on 443 in the default pool. The default pool is assigned two monitors - HTTPS and TCP check to see if its listening on 8300. If either of 443 or 8300 monitor is down send traffic on port 8200. If both 443 and 8300 is down then mark pool offline (use default pool). So, i created the pool with the server on port 443. Assigned it both monitors. Set availability to 'ALL' which take down the pool and then through iRule I can route it to 8200. However, what i am not able to achieve is 'when both monitors are down, use the default pool'.
- jaikumar_f5
Noctilucent
Is this your requirement, look for the send traffic points.
port if both 443 & port 8300 are up.Send traffic to 443
- 443 port member has dependency on port 8300, if port 8300 is down. Then
.send traffic to member port 8200
- 443 port member has dependency on port 8300, if port 443 itself is down. Still
.send traffic to member port 8200
- Are you saying when both 443 & 8300 are down, you dont want to send traffic to anything. Simply drop the packet.
- AbhishekMarat_2
Nimbostratus
Yes, thats exactly what the customer has requested. Thanks!
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