twemproxy icon indicating copy to clipboard operation
twemproxy copied to clipboard

New option "auto_eject_drop"

Open mezzatto opened this issue 11 years ago • 10 comments
trafficstars

A boolean value that controls if auto ejected hosts should be dropped from the hash ring. If set to false, failing hosts will immediately reply timeout. Defaults to true.

See https://github.com/twitter/twemproxy/issues/213 for more information

mezzatto avatar Apr 04 '14 22:04 mezzatto

:thumbsup: will love to see it in master.

pankajsethi avatar Apr 16 '14 19:04 pankajsethi

@manjuraj, when do you plan to accept this pull? Did you understood the feature? Please tell me if you need some more explanation.

mezzatto avatar Jul 02 '14 14:07 mezzatto

:+1: definitely a good one! nice job.

ghost avatar May 05 '15 13:05 ghost

Am I reading this change correctly that auto_eject_drop is only implemented in the modula distribution? That seems like a pretty big caveat.

codekitchen avatar Jun 09 '15 21:06 codekitchen

@codekitchen, that's right.

In ketama distribution, this option doesn't seem to make sense (or does it?).

In random distribution, the implementation is indeed not done yet (but it's trivial to get done). I had no practical application for it when I first implemented the original code, so I though that the less code I touched the faster the pull would be accepted... :)

mezzatto avatar Jun 09 '15 21:06 mezzatto

Heh well, I can't speak for the maintainers but I would certainly want the limitation to at least be documented.

I'm curious why you say it doesn't make sense for ketama -- to venture a guess, I think you're saying that why would you be using consistent hashing if you don't plan on modifying the ring on failure? In our case, it's because we want consistent hashing for when we explicitly resize the ring, but we also prefer this behavior of not modifying on node failure, rather just failing fast.

codekitchen avatar Jun 09 '15 21:06 codekitchen

@manjuraj, would you be willing to accept this pull If I documented that this feature is only for the modula distribution? Or do you think that, for completeness, it would be for the better to make the changes in ketama distribution as @codekitchen raised some valid use cases?

mezzatto avatar Jun 23 '15 16:06 mezzatto

After all theses years, revisiting this PR made me realize that it's a https://en.wikipedia.org/wiki/Circuit_breaker_design_pattern

mezzatto avatar Apr 07 '17 14:04 mezzatto

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Daniel Mezzatto seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Jul 18 '19 15:07 CLAassistant

@CLAassistant you are a bot robot. Of course I'm a github user :D

mezzatto avatar Jul 18 '19 19:07 mezzatto