-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Twemproxy " Connection refused " in logs on failure of one redis instance #530
Comments
Twemproxy is a key distributing proxy. When you have two servers half the keys (roughly) go to one, the other to the other. When one of those is down you don't have access to those keys. If you are looking for master/slave availability you'll need to use Redis' native replication to handle that rather than Twemproxy. |
@therealbill shouldn't i get a cache miss for that case instead of connection refused? |
I think my issue is related to this. I'm proxying memcached, but I have the same problem where if one of the servers goes down the proxy doesn't use the second server: #534 |
i think my issue is that, for example: |
Even am facing the same issue. I get the below error when one of the Redis instance is down.
I have configured Redis Sentinel . Am I misunderstanding anything with respect to twemproxy?? Any how after some frequent connect requests, I get the response back. |
That syslog is hard to read but expected - the connection to the server closed, and twemproxy attempted to reconnect to that server( Aside: #608 will significantly refactor the way reconnection is implemented in a future 0.6.0 release (heartbeat, failover).
Redis sentinel support hasn't been merged in from a fork yet, but is planned as part of #608 for 0.6.0 - even when the sentinel client implementation is merged in you'd have to configure the list of sentinels. Closing this because the original question was answered |
I have configured twem proxy with 2 redis servers.
When one of these redis server fails the twem proxy gives a error saying " Connection refused"
My twem conf
beta:
listen: 127.0.0.1:22122
hash: fnv1a_64
hash_tag: "{}"
distribution: ketama
auto_eject_hosts: true
timeout: 400
redis: true
servers:
i am trying to get a key from redis. If i kill one instance of redis and then try to run the get command then it gives the following error:
[2017-07-26 16:25:24.548] nc_core.c:237 close s 15 '127.0.0.1:6381' on event FFFFFF eof 0 done 0 rb 0 sb 0: Connection refused
The text was updated successfully, but these errors were encountered: