Not logged in. · Lost password · Register
Forum: MatriX and XmppDotNet RSS
Avatar
jlew #1
Member since Jun 2011 · 8 posts
Group memberships: Members
Show profile · Link to this post
Subject: Load Balancing & Session Prebinding
Hi,
We are using Matrix.NET to do a server pre-bind of a BOSH session which is handed off to a browser.  We are in the process of clustering our server (Isode M-Link), and they have advised us that the BOSH session should be sticky for a particular BOSH session.  We were going to do this by using the cookie-based stickiness mechanism that our load balancer (F5 BigIP) supports, but I realized that since the session is actually started by the web server, the first connection from the browser may well hit a different back-end node.  Would it be possible to make the cookie collection available in the PreBindEventArgs so that we can hand this off this cookie to the browser as well?  (Or any other suggestions as how to make this work?)

Thanks,
Jeremy
Avatar
Alex #2
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
In the current versions there is an event when MatriX creates new Web requests. In this event you can add your cookies. Or do you need the opposite and read special headers in the response?

Alex
Avatar
jlew #3
Member since Jun 2011 · 8 posts
Group memberships: Members
Show profile · Link to this post
Yeah, I need the opposite.  The response from the XMPP server will have a header added by the load balancer that is used for session persistence.

-Jeremy
Avatar
Alex #4
Member since Feb 2003 · 4449 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Ok understand. I think this can be useful for other user as well. Not only with prebind, also with regular BOSH sessions. I can add an event which fires for every response. There you have access to the complete WebResponse including the cookies then.

Alex
Avatar
jlew #5
Member since Jun 2011 · 8 posts
Group memberships: Members
Show profile · Link to this post
After thinking about it a little more, I'm not sure this is going to work for us anyway.  Our XMPP server is not the same domain as our web application, so I think we would not be able to place the cookie in the correct domain in the browser.  We're going to have to look at having a load balancer rule try and parse out the SID from POSTS and use that as the basis for session affinity.  Thanks anyway
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters: