Uploaded image for project: 'Keycloak'
  1. Keycloak
  2. KEYCLOAK-8904

Avoid backpressure in RemoteCacheSessionsLoader

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.6.0.Final
    • Fix Version/s: 4.8.0.Final
    • Component/s: None
    • Labels:

      Description

      As pointed by William Burns:

      Also a side note for keycloak, I would recommend adding some backpressure support at [3] - if the puts are too slow you could end up with a large amount of entries in memory at the same time.
      
      [3] https://github.com/keycloak/keycloak/blob/4.6.0.Final/model/infinispan/src/main/java/org/keycloak/models/sessions/infinispan/remotestore/RemoteCacheSessionsLoader.java#L111
      

      I think we can improve it by calling synchronous "cache.putAll" (it is synchronous, but still avoids lots of unecessary network communication). Another possibility is to remove a need for preloading entirely - this can be possible if we have a way to skip saving sessions on KC side at all and have them saved just on remote JDG server.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mposolda Marek Posolda
                Reporter:
                mposolda Marek Posolda
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: