Uploaded image for project: 'Spring Data Redis'
  1. Spring Data Redis
  2. DATAREDIS-860

DefaultCookieSerializer sets the jvmRoute for the Cookie but not the HttpSession identifier

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Invalid
    • Affects Version/s: 2.0.9 (Kay SR9)
    • Fix Version/s: None
    • Component/s: Core, Jedis Driver
    • Labels:

      Description

      I have implemented Spring Session with Redis on my legacy application as per the docs and it works very well for loadbalancing and preventing users from being kicked out during downtime of one of my Java nodes.

      I implemented the Default cookie serializer as per this link https://docs.spring.io/spring-session/docs/current/reference/html5/guides/java-custom-cookie.html because I wanted to have the jvmRoute added to the Session identifier. 

      This does provide some server affinity, however my application uses Talend to create sqlite dbs for some reporting and we pass the session id to Talend, so that it may call my application again, but since the sqlite db's are created locally, it needs to make sure those calls go to the same server.

      The issue we have is that the jvmRoute is set in the cookie in the ServletRequest and Response, but the actual session information (HttpSession) that we store in Redis does not have the jvmRoute so I only see the hex session Id.

      Tomcat used to keep the jvmRoute in the SessionID which allowed our application to work.

      It would be really useful if we could preserve this suffix in the HttpSession identifier.

        Attachments

          Activity

            People

            • Assignee:
              mp911de Mark Paluch
              Reporter:
              dguiney4 David Guiney
              Last updater:
              Mark Paluch
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: