Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-5233

Optimize marshalled size of web sessions

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Done
    • Major
    • 10.0.0.CR1
    • 10.0.0.Beta2
    • Clustering
    • None

    Description

      There are a couple of marshalling optimizations that we can make in the current web session clustering code:

      • We currently marshal session identifiers as UTF-8 strings. For the default session id length, this result in 42 bytes for each cache key. Since session ids use a limited alphabet (modified base64) we can easily reduce this to 30 bytes (31 to support variable length).
      • We currently store the metadata of a session in a single cache entry. The metadata is composed of:
        1. Creation timestamp (long)
        2. Last access timestamp (long)
        3. Max inactive interval (int)

      #1 is static. #2 updates every request. #3 is "effectively" static. If we split the metadata cache entry into two: one containing static metadata, the other dynamic metadata; we can reduce the size of the data that needs to be replicated for a read-only request. Additionally, #2 can be represented as a duration of time since #1, and thus can be expressed as a short or integer instead of a long. Thus, for requests that do not modify the session, we only need to replicate 4 bytes or less instead of 20.

      Attachments

        Activity

          People

            pferraro@redhat.com Paul Ferraro
            pferraro@redhat.com Paul Ferraro
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: