[GH-ISSUE #5569] feature request: save SESSION_POOL, USER_POOL, USAGE_POOL in redis when is redis #52704

Closed
opened 2026-05-05 13:47:40 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @itaybar on GitHub (Sep 21, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/5569

Originally assigned to: @tjbck on GitHub.

since redis socket io manager just added, I think it would be great to move the stats pools to be managed in redis as well, this way this statistics will be aggregated along all openweb ui instaces (for k8s envs)

I recommend to use redis-dict 2.5.0 https://pypi.org/project/redis-dict/ since this will be 2 line of code addition for what there is now

if WEBSOCKET_MANAGER == "redis":
    USER_POOL = RedisDict(host=, port=, namespace="openweb-ui:user-pool)
else:
    USER_POOL = {}

and the rest of the code is the same since RedisDict can be accessed like a regular dict

Originally created by @itaybar on GitHub (Sep 21, 2024). Original GitHub issue: https://github.com/open-webui/open-webui/issues/5569 Originally assigned to: @tjbck on GitHub. since redis socket io manager just added, I think it would be great to move the stats pools to be managed in redis as well, this way this statistics will be aggregated along all openweb ui instaces (for k8s envs) I recommend to use redis-dict 2.5.0 https://pypi.org/project/redis-dict/ since this will be 2 line of code addition for what there is now ``` if WEBSOCKET_MANAGER == "redis": USER_POOL = RedisDict(host=, port=, namespace="openweb-ui:user-pool) else: USER_POOL = {} ``` and the rest of the code is the same since RedisDict can be accessed like a regular dict
Author
Owner

@itaybar commented on GitHub (Sep 21, 2024):

and there is also option to add ttl for the data, since in local dict when you restart the application the data will be deleted as well and when it be in the redis it will not be deleted, and there is need to prevent data duplication

<!-- gh-comment-id:2365069980 --> @itaybar commented on GitHub (Sep 21, 2024): and there is also option to add ttl for the data, since in local dict when you restart the application the data will be deleted as well and when it be in the redis it will not be deleted, and there is need to prevent data duplication
Author
Owner

@tjbck commented on GitHub (Sep 22, 2024):

Added to dev, testing wanted here!

<!-- gh-comment-id:2365373889 --> @tjbck commented on GitHub (Sep 22, 2024): Added to dev, testing wanted here!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#52704