{"action":"created","issue":{"url":"https://api.github.com/repos/sockjs/sockjs-node/issues/195","repository_url":"https://api.github.com/repos/sockjs/sockjs-node","labels_url":"https://api.github.com/repos/sockjs/sockjs-node/issues/195/labels{/name}","comments_url":"https://api.github.com/repos/sockjs/sockjs-node/issues/195/comments","events_url":"https://api.github.com/repos/sockjs/sockjs-node/issues/195/events","html_url":"https://github.com/sockjs/sockjs-node/issues/195","id":130941224,"number":195,"title":"Sticky Session with single SockJS server (howto)","user":{"login":"charyorde","id":160010,"avatar_url":"https://avatars.githubusercontent.com/u/160010?v=3","gravatar_id":"","url":"https://api.github.com/users/charyorde","html_url":"https://github.com/charyorde","followers_url":"https://api.github.com/users/charyorde/followers","following_url":"https://api.github.com/users/charyorde/following{/other_user}","gists_url":"https://api.github.com/users/charyorde/gists{/gist_id}","starred_url":"https://api.github.com/users/charyorde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charyorde/subscriptions","organizations_url":"https://api.github.com/users/charyorde/orgs","repos_url":"https://api.github.com/users/charyorde/repos","events_url":"https://api.github.com/users/charyorde/events{/privacy}","received_events_url":"https://api.github.com/users/charyorde/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-03T07:38:40Z","updated_at":"2016-02-10T10:25:21Z","closed_at":null,"body":"I'll like to know how to retrieve an existing SockJS Connection with sticky session turned on. How's this\r\npossible within the body of the SockJS Connection instance?\r\n\r\n```\r\nvar echo = sockjs.createServer({ sockjs_url: 'http://cdn.jsdelivr.net/sockjs/1.0.1/sockjs.min.js' });\r\necho.on('connection', function(conn) {\r\n    // if we can't serialize conn for reuse, how can I leverage sticky session here\r\n    conn.on('data', function(message) {\r\n        conn.write(message);\r\n    });\r\n    conn.on('close', function() {});\r\n});\r\n```\r\n\r\nI appreciate your help. Thanks"},"comment":{"url":"https://api.github.com/repos/sockjs/sockjs-node/issues/comments/182297550","html_url":"https://github.com/sockjs/sockjs-node/issues/195#issuecomment-182297550","issue_url":"https://api.github.com/repos/sockjs/sockjs-node/issues/195","id":182297550,"user":{"login":"syberkitten","id":3462714,"avatar_url":"https://avatars.githubusercontent.com/u/3462714?v=3","gravatar_id":"","url":"https://api.github.com/users/syberkitten","html_url":"https://github.com/syberkitten","followers_url":"https://api.github.com/users/syberkitten/followers","following_url":"https://api.github.com/users/syberkitten/following{/other_user}","gists_url":"https://api.github.com/users/syberkitten/gists{/gist_id}","starred_url":"https://api.github.com/users/syberkitten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/syberkitten/subscriptions","organizations_url":"https://api.github.com/users/syberkitten/orgs","repos_url":"https://api.github.com/users/syberkitten/repos","events_url":"https://api.github.com/users/syberkitten/events{/privacy}","received_events_url":"https://api.github.com/users/syberkitten/received_events","type":"User","site_admin":false},"created_at":"2016-02-10T10:25:21Z","updated_at":"2016-02-10T10:25:21Z","body":"My understanding is that sticky session is something that is enforced on a lower level, thus load balancer or a reverse-proxy which uses the JSESSIONID cookie a token to \"stick\" you to the previous connected server.\r\n\r\n> JSESSIONID cookie sticky sessions. By default SockJS server sets this cookie. Some load balancers understand that cookie and enable session stickyness (for example this is the case for CloudFoundry).\r\n\r\nfrom an article about socks: \r\nhttps://github.com/sockjs/sockjs-client/wiki/%5BArticle%5D-SockJS:-WebSocket-emulation-done-right\r\n\r\nhope this helps...."}}