Forum Discussion
Persistence options for UDP Application
Hey Fellas,
I scoured the forums to find some info on achieving persistence for udp applications.
The VS I am using is standard, but the protocol profile is UDP with least conn - member as the load balancing algorithm.
I applied the default universal persistence profile and this irule but could not see any persistence records using
show ltm persistence persist-records virtual
when CLIENT_ACCEPTED {
set src_IP [IP::client_addr]
if { [session lookup uie $src_IP] equals "" } {
session add uie $src_IP [UDP::remote_port] 1800
log local0. "added client port [session lookup uie $src_IP] for client ip $src_IP "
} else {
log local0. "existing client port [session lookup uie $src_IP] for client ip $src_IP"
}
}
Do I have to apply this irule to the VS or to the universal persistence profile itself?
The profile also has an option to include an irule!
- davidfisherCirrus
Came across this
command, can that be used with the current irule or do I need to change something more?persist uie
Also does the irule go to the profile or to the virtual server?
- Andy_McGrathCumulonimbus
First why are you using
persistence profile if you all you need/want is source address persistence? If you are using source IP then you do not need to make is this complex withuie
and simply use source address.uie
Second the commands
andpersist
do different things,session
is purely for creating, looking up and removing persistent records (core session table records). Thepersist
is used for storing arbitrary/additional information in the session table.session
Use
instead ofpersist
for what you are trying to achieve, for example:session
when CLIENT_ACCEPTED { set src_IP [IP::client_addr] if {[persist lookup uie $src_IP]} { persist uie $src_IP log local0. "existing client port [persist lookup uie $src_IP] for client ip $src_IP" } else { persist add uie $src_IP 1800 log local0. "added client port [persist lookup uie $src_IP] for client ip $src_IP " } }
NOTE: this is just a UIE version of source address persistence and at that more complex than needed as the following does the same:
when CLIENT_ACCEPTED { persist uie [IP::client_addr] 1800 }
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