Skip to content
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

auto_eject_host not working. #438

Open
leunamnauj opened this issue Dec 2, 2015 · 2 comments
Open

auto_eject_host not working. #438

leunamnauj opened this issue Dec 2, 2015 · 2 comments

Comments

@leunamnauj
Copy link

I have 3 redis servers + sentinel and I thought on put twemproxy over for load balancing and HA somehow.
I understand that auto_eject_host directive is used to remove a server from the pool when is failing but this is not the case, when I put down one of Redis servers twemproxy still trying to query on it and I got "(error) ERR Connection refused"

Honestly I'm not sure if I set something wrong of if I misunderstand the behavior of the tool.
Thanks in advance

This is my config:

redis1:
listen: 0.0.0.0:6379
redis: true
hash: fnv1a_64
distribution: ketama
auto_eject_hosts: true
timeout: 400
server_retry_timeout: 2000
server_failure_limit: 1
preconnect: true
servers:

  • privip1:6380:1
  • privip1:6380:1
  • privip1:6380:1
@charsyam
Copy link
Contributor

charsyam commented Dec 4, 2015

hi, @leunamnauj
auto_eject_hosts works like below:

  1. eject server.
  2. after sometime add it again without checking
  3. loop 1

so, I think you met this kind of situation.
If you want checking of conneciton.
try this: #428

in mycase, It works fine.

@yumitubi
Copy link

yumitubi commented Dec 4, 2017

@charsyam thank you for your patch!

Do you use this changes in production? Can I add this code to my installation of twemproxy?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants