-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new 'uPortal-session' submodule which adds support for session cl… #2699
Add new 'uPortal-session' submodule which adds support for session cl… #2699
Conversation
31d2721
to
a134862
Compare
Nice starting work ! Also you should watch on the CAS lib to link the session to the CAS ticket to be able to interpret the CAS logout (not lib for CAS in a distributed context exist for with redis but it won't be too much to do) Also for working with redis in a HA and fail-over context I would advice to use redis (cache mode and not database) + sentinel. And using HAProxy could be powerfull for optimizing where to make read of write request (https://www.willandskill.se/sv/articles/setup-a-highly-available-redis-cluster-with-sentinel-and-haproxy) For code examples I've pushed some years ago a conf + unit test on CAS around that, watch there if it can help: apereo/cas@171cf34 and follow the history of change around https://github.com/apereo/cas/commits/master/support/cas-server-support-redis-core/src/main/java/org/apereo/cas/redis/core/RedisObjectFactory.java After that you would be able to put the cache into redis too and it will consume really less server ressources ;) |
@jgribonvald could we break out your suggestions into Issues that can be tackled at a later date? We just want to get the basic session replication support in before our next release. Anything you think is really needed for this PR? |
Don't worry 😉 it's OK for a first introduction of the feature. But maybe one thing is missing, the test ? |
a134862
to
1a6065c
Compare
8f2aa14
to
e670a19
Compare
uPortal-session/src/main/java/org/apereo/portal/session/redis/RedisSessionConfig.java
Outdated
Show resolved
Hide resolved
uPortal-session/src/main/java/org/apereo/portal/session/redis/RedisSessionConfig.java
Outdated
Show resolved
Hide resolved
uPortal-session/src/test/java/org/apereo/portal/session/redis/RedisSessionInitializerTest.java
Outdated
Show resolved
Hide resolved
e670a19
to
e9a71af
Compare
uPortal-session/src/test/java/org/apereo/portal/session/redis/RedisSessionInitializerTest.java
Outdated
Show resolved
Hide resolved
…ion clustering/replication/failover with Redis
e9a71af
to
623ed02
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎖️
…ustering / replication / failover.
Checklist
CHANGES.md
Description of change
A new uPortal-session submodule was added, which uses Spring Session in order to store the web sessions externally in Redis. This is disabled by default, but can be enabled with an environment variable or system property. The Redis connection can be configured for standalone, cluster, or sentinel modes.