-
Notifications
You must be signed in to change notification settings - Fork 683
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
plugin for fetching cache dump from any node after joining legion #221
Conversation
what about simplyfing it for being only a legion action ?
Even the legion-cache name seems a bit too generic, maybe legion-cachedump ? |
sure, if there are no objections to the code I can move it into core/legion.c as an action I not good at naming things so yes, a better name would be nice ;)
I would love if scroll code be more structured, simple key:value would be enough. So we would have:
and action would fetch "legion-cache" entry from scroll. |
it can remain an external plugin (it will be good even as a reference for cache and legions usage in plugins) Just remove the options in favour of rawly setting the scroll |
ok, I'll push update later, is legion-cache-fetch as a name for action and legion_cache_fetch as a name for plugin ok? |
yes it's ok |
Pushed stripped version of plugin, now it's just an action for legion subsystem. Full example: lc1.ini
lc2.ini
|
is not enough to use the lord scroll directly ? (without iterating all the nodes) If we have a lord its up by definition |
each node has different data in its own scroll, every node puts its own ip:port address of uwsgi socket it has spawned, so I iterate so that cache-sync will try to fetch dump from all nodes. |
ok, seems fine but you should free the memory allocated by the kvlist parser for the cachedump item |
Do you mean |
effectively the action is run only one time per startup, i can merge as is, maybe in the future we can improve it to not leak memory (the string_list too is not freed) |
plugin for fetching cache dump from any node after joining legion
I'll fix leaks today/tomorrow morning |
This plugin allows to fetch copy of cache content from any node joined to legion.
It allows for example to hot-add new SSL frontend server with already populated session cache (you just need to set lower frequency for legion so it joins faster).
Usage:
Please review.