-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
How do I weight servers? #7
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
Comments
Hello Andrew, There is no way to do this other than by hand, but it isn't that complicated. The session handler creates a "connection pool", where each server has a weight. Let's say that server A has weight 1, B has weight 2, and C weight 3. The sum of these weights is 6, so when a session is created, the session ID is transformed into a number (you can use The reason why phpredis doesn't implement this for the key/value interface is that some of Redis' commands can map several keys (see There will be a way to do it directly from phpredis in the future when part of the key is reserved for this specific purpose, but that's not the case at the moment. |
Got it. I'll have to think about the best way to abstract this out. It seems it would be pretty easy to implement the server-key matching, even in a lightweight php script. |
Hi,
I can see you can weight servers in the php session config settings, but how do you weight servers yourself? Sorry if I'm missing something, I don't see this documented.
It would be nice to do something like this:
The text was updated successfully, but these errors were encountered: