0

session stored in redis

asked 2020-06-23 09:36:18 +0800

salmon gravatar image salmon
1 1

updated 2020-06-23 09:36:45 +0800

I want to store the session in redis, what should I do? Thank you Currently using springbootzk, the configured session is stored in redis, but it will prompt that the session cannot be serialized, please advise

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-06-23 13:53:03 +0800

cor3000 gravatar image cor3000
5250 2 7
ZK Team

seems you already asked the right question in https://forum.zkoss.org/question/112434/serializablesession/

After that you'll likely run into follow-up issues (in case you want to configure clustering), using the default redis session repository.

  1. ZK can only work reliably if you use "sticky" sessions in your cluster.

  2. ZK will only be able to synchronize concurrent requests to a session when the session returned by your session repository is the same instance. A deserialized session for every request will eventually result in missing components and component state. (A custom session repository implementation is necessary most likely)

  3. ZK sessions can become quite big (in complex applications) so that eager session replication is likely to cause significant performance overhead (goes hand in hand with 2)

depending on your goals to integrate with redis you might not be able to achieve all of them ...

Since this is a rather complicated and individual topic this forum might not provide all the detailed answers you need. If that's the case please contact our support for dedicated assistance.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2020-06-23 09:36:18 +0800

Seen: 8 times

Last updated: Jun 23

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More