Forum Discussion
Reselecting route peer in MRF
Does anyone know how to get the router in MRF to reselect a new peer?
I have MRF working for a custom protocol, and can either have it round robin the mesasges between peers, or always send messages to a particular peer (until it fails). However, what I'd like to get to is at some point be able to tell the router to reselect the peer to use.
The only time I seem to be able to get it to do a reselect properly is when a peer is taken down and the MR_FAILED event is triggered wherein I call
MR::message nexthop none
MR::retry
I suspect I need to delete the route entry that is currently configured, however doing anything with GENERICMESSAGE::route delete doesn't seem to make much difference (within MR_INGRESS)
Wondering if anyone has done something similar with using MRF and can point me in the right direction?
- Peter_Mills_697Historic F5 Account
A new iRule command (MR::message attempted) allows you to specify which hosts cannot be used for routing a message or show which one has already been used. It could be used to retransmit a message to another pool member.
If invoked before a message is routed (MR_INGRESS or MR_FAILED) it can be used to specify which hosts will be ignored. The syntax requires you to also specify either a Virtual Server (virtual) or MR Transport Config (config). The keyword none clears this blacklist.
If invoked after a message is routed (MR_EGRESS or MR_FAILED) the config section shows to which MR transport-config and host the message was routed. The host does not suffice because you may be able to connect using TCP but not SCTP.
The format is the same for MR::message route, MR::message attempted and MR::peer but unlike MR::message route, attempted hosts only contains hosts, so you will not see a pool as a destination
- Peter_Mills_697Historic F5 Account
In the case of SIP can force a new route lookup with
 
SIP::persist replace (13.0)
 
https://clouddocs.f5.com/api/irules/sip__persist.html
 
Similar Diameter iRule command targeted for 14.1
 
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