Skip to content
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

Merged
merged 1 commit into from
Nov 7, 2023

Conversation

groybal
Copy link
Contributor

@groybal groybal commented Oct 24, 2023

…ustering / replication / failover.

Checklist
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.

@groybal groybal force-pushed the clustered-session-support branch 3 times, most recently from 31d2721 to a134862 Compare October 24, 2023 22:28
@jgribonvald
Copy link
Contributor

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 ;)

@bjagg
Copy link
Member

bjagg commented Oct 26, 2023

@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?

@jgribonvald
Copy link
Contributor

@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 ?

@groybal groybal force-pushed the clustered-session-support branch from a134862 to 1a6065c Compare October 27, 2023 19:25
@groybal groybal force-pushed the clustered-session-support branch 4 times, most recently from 8f2aa14 to e670a19 Compare November 4, 2023 03:24
@groybal groybal marked this pull request as ready for review November 4, 2023 03:25
@groybal groybal force-pushed the clustered-session-support branch from e670a19 to e9a71af Compare November 4, 2023 04:35
…ion clustering/replication/failover with Redis
@groybal groybal force-pushed the clustered-session-support branch from e9a71af to 623ed02 Compare November 7, 2023 07:44
Copy link
Member

@bjagg bjagg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎖️

@bjagg bjagg merged commit 0bc424b into uPortal-Project:master Nov 7, 2023
18 checks passed
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