8000 KEYCLOAK-11019 Offline Session Lazy Loading by y-tabata · Pull Request #190 · keycloak/keycloak-community · GitHub
[go: up one dir, main page]

Skip to content

KEYCLOAK-11019 Offline Session Lazy Loading - #190

Closed
y-tabata wants to merge 1 commit into
keycloak:masterfrom
Hitachi:KEYCLOAK-11019
Closed

y-tabata wants to merge 1 commit into
keycloak:masterfrom
Hitachi:KEYCLOAK-11019

Conversation

@y-tabata
Copy link
Copy Markdown

This PR is for KEYCLOAK-11019 Offline sessions preloading still slow in some cases.
In a large number of Offline Sessions environments, we can shorten the startup time by tuning some parameters or adding indexes, but there is a limit we can shorten.
In this PR, we'd like to consider resolving the root cause, that is, consider changing the offline session loading method from preloading all offline sessions in the startup, and consider something like "Offline Session Lazy Loading".

@pedroigor
pedroigor commented Nov 19, 2020 •
Copy link
Copy Markdown
Contributor

@y-tabata I also think the moment requires being a bit conservative and hold drastic changes for later once we discuss the overall design on how we store and manage sessions.

So, back to your proposal:

  • I agree to have a switch for enabling/disabling pre-fetch. I don't like it very much but it should help for now to solve the problem while still supporting the current behavior. I think we should disable by default, document this change, wait for feedback, work on improvements, and then finally remove pre-fetch from startup.

  • Maybe we could start a background process during startup to fetch offline sessions from the database. Maybe this should help to avoid changing code too much with a possible impact on user experience where sessions would be eventually restored as they are loaded from the database

  • I remember @mposolda mentioning some impacts on the admin console where you need session counts, etc. I'm OK to sacrifice that if the user wants to. For me, the benefits justify the risks and users can always choose what works better for them by using the switch.

@thomasdarimont
thomasdarimont commented Feb 15, 2021 •
Copy link
Copy Markdown

Just wanted to link this to the PR 7722 KEYCLOAK-11019 Initial support for lazy offline user-session loading which is currently WIP.

@hmlnarik
Copy link
Copy Markdown
Contributor

Closing this PR as outdated. The PR would have to contain description of the approach to be mergeable. The keycloak/keycloak#8033 (based on keycloak/keycloak#7722) has implemented lazy offline session loading and for this PR to be mergeable, it would need to be aligned with the code PR. If desired, feel free to reopen this PR with the details describing the implementation.

@hmlnarik hmlnarik closed this Jun 17, 2021
@y-tabata
y-tabata deleted the KEYCLOAK-11019 branch June 17, 2021 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0