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 Redis session handler and/or better: Let plugins define session handlers #6800
Comments
I noticed this is already possible to do by setting the following save_handler in
and in php.ini configure the save_handler manually as mentioned above eg.
How could we better promote this for "clusters" (using multiple front nodes)? I also worked for 15 min on a plugin and it would be easily doable to write a simple plugin for this as well. Would be maybe the best / easiest way to promote this kind of session handler to show how other people could add their own session handlers? |
For most people the database session handler is enough I think. I guess redis session handler will be most useful for power users like InnoCraft who use redis also for the tracker API via https://github.com/piwik/plugin-QueuedTracking Therefore maybe it'd be enough to document it in a new FAQ similar to that one.. and link it from there, and from this one. thoughts? |
Hi, I didn't mean that we use Redis for frontend admin session. |
@trucleavinetworks you make a good point, maybe we could use Redis to cache the visitors in the last |
It should be at least recommended in an article where it is described how to setup "Piwik with multiple front nodes" and in case there is an article "Piwik high performance" as it is good to use it even when not using QueuedTracking. Should be also mentioned as you said where "setup alternative to file sessions". I'd have a plugin here that I developed quickly as mentioned and it works. Only problem that I didn't solve was to restore the original session handler again in case someone wants to disable the plugin again. But do not plan to release it for now. Waiting for #6609 . Otherwise if someone enters a wrong save path in "Plugin Settings" it would be no longer able to access Piwik I think. In case someone is interested in the code ping me. |
this new features will be documented as a FAQ in #7767 |
I think it makes sense to offer the possibility to use Redis to manage sessions as mentioned in #6637 and later by another user in #6075. Redis is just perfect for storing sessions when using multiple frontend nodes as an alternative to database. All operations are performed in memory making reads and writes blazing fast.
It is very easy to configure in case the Redis extension phpredis is installed which is required for Queued Tracking #6075 anyway.
The text was updated successfully, but these errors were encountered: