spring-projects / spring-projects/spring-framework

Investigate possibility of SockJS without sticky sessions [SPR-12936]

Open
#17,529 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: web type: enhancement
Dominant language
Java
Stars
60.2k
Forks
38.8k
Avg merge
5d 2h
Merged PRs (30d)
27

Description

Johan Frick opened SPR-12936 and commented

(This was posted on Stackoverflow as well, before we realized that you had a Jira. Let us know if you want us to remove it from Stackoverflow.)

We are trying to use spring-websocket with STOMP using SockJS as a fallback option. We have based our solution on this guide: https://spring.io/guides/gs/messaging-stomp-websocket/.

The environment is running multiple tomcats without sticky session.

The problem we have run into is that it is not possible to use the fallback from websocket due to the xhr requests ending up on separate tomcats where the original session does not exist, causing it to retry with a websocket connection and it will continue in this loop.

Is there a preferred way of solving this issue?

We were hoping that spring-session would be an answer but it does not seem to help in this case.


Affects: 4.1.5

Reference URL: http://stackoverflow.com/questions/29743065/spring-websocket-with-fallback-over-load-balancer

Issue Links:

  • #16243 Support user destinations with multiple WebSocket servers

0 votes, 8 watchers

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by investigating spring-websocket's SockJS fallback and session handling across multiple Tomcats without sticky sessions, then review the spring-session context and linked issue #16243. Done means establishing whether this deployment is supported and documenting the preferred solution or the required change.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.