Forum Discussion
JRahm
Mar 01, 2005Admin
Terminal Server Persistence
I have msrdp persistence working without a rule, but only within a single vip. Globally, I don't have persistence to the client, so a client could potentially be assigned to the wrong vip, and even though session directory sends the client the routing token, and the client sends this routing token to the BigIP, it is being ignored if the client hits the wrong vip. Here's what the cookie looks like in hex and ascii:
0040 00 43 6f 6f 6b 69 65 3a 20 6d 73 74 73 3d 38 31 .Cookie: msts=81
0050 33 39 36 34 30 34 32 2e 31 35 36 32 39 2e 30 30 3964042.15629.00
0060 30 30 0d 0a 00..
The 813964042 is the server IP (dec->hex(reverse pairs)->dec(by octet)) and the 15629 is the tcp port (dec->hex(reverse pairs)->dec)
If I can't persist across virtuals with the msrdp cookie with the gui, then I'd like to build a rule that will persist across virtuals. I don't want only one vip because I will have aprox. 750 servers, and I'd like to pool these by rack.
Is there a command within iRules to return a node from the msrdp cookie? I saw in the config guide that there is one for BEA WebLogic and I didn't know if there was one for MS Terminal Services since the BigIP has the ability to do this already. Thanks.
- rapmaster_c_127Historic F5 AccountYes, it only fires after the 3-way handshake. (CLIENT_ACCEPTED.) That's why we built the event driven hooks for iRules rather than firing them all the time.
- rapmaster_c_127Historic F5 AccountJust one note: your rule code is only *entered* on the CLIENT_ACCEPTED event. Thereafter, CLIENT_DATA is fired upto the point you call TCP::release. At that point you have no more rule entry points and since you haven't hooked any more events, there will be no further rule processing impact.
- JRahmAdminSince removes the connection from load balancing statistics, would it be better for me to define all my servers in an external data group, then use
- unRuleY_95363Historic F5 AccountI'm not sure I follow what you mean by "define all my servers in an external data group".
- JRahmAdminYour assumption is correct. I am only concerned about the statistics as BigIP considers the load on a server. If I have 60 actual connections on a server, 30 of them being sent to the server via the rule line (use node $node), and I am using least connections, will those 30 connections sent to the server via the rule be considered in the decision or not? Thanks.
- drteeth_127330Historic F5 AccountGood question. If you use the member least connection LB method, then the 30 connections from the rule will not be accounted for since your rule uses direct node selection. If you use the least connection LB method, which operates on a node-address basis, then they will be.
- James_Wrubel_48NimbostratusThis rule looks like exactly what I need, but I am having trouble getting it to work as written. I think this is because when you set the value of this cookie in the properties of the msrdp control, it sets it in Unicode. So if the value was Cookie: msts=2248151212.15629.0000 The rule doesn't ever get the node and port. Did you encounter the same problem? I think they may have changed the behavior of this property in a recent update, so this may not have been a problem when this rule was written.
- JRahmAdminIt worked verbatim when I tested, but that was 18 months ago. We never implemented this code in production, so I'm not sure if there have been changes to the application behavior or not.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects