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

Add New Node Locator - Round Robin #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

amcrn
Copy link

@amcrn amcrn commented Nov 3, 2017

Adds a new round-robin based node locator. A round-robin node locator
is useful for a couple of usecases:

  • Read-only applications that want to round-robin across nodes to
    spread load across memcached instances.
  • Applications that are pointing to mcrouter endpoints vs. memcached
    endpoints. mcrouter is a memcached compliant protocol router for
    scaling memcached (see https://github.com/facebook/mcrouter).

Only supported for FailureMode.Cancel and FailureMode.Retry.

@amcrn amcrn force-pushed the enh/round-robin-locator branch from a50290f to 79e7543 Compare November 3, 2017 19:03
Adds a new round-robin based node locator. A round-robin node locator
is useful for a couple of usecases:

* Read-only applications that want to round-robin across nodes to
  spread load across memcached instances.
* Applications that are pointing to mcrouter endpoints vs. memcached
  endpoints. mcrouter is a memcached compliant protocol router for
  scaling memcached (see https://github.com/facebook/mcrouter).

Only supported for FailureMode.Cancel and FailureMode.Retry.
@amcrn amcrn force-pushed the enh/round-robin-locator branch from 79e7543 to c91c9ab Compare November 3, 2017 19:37
@ingenthr ingenthr self-assigned this Mar 27, 2018
@ingenthr
Copy link

ingenthr commented Apr 2, 2018

Review at http://review.couchbase.org/#/c/91955/

@@ -357,6 +357,15 @@ public NodeLocator createLocator(List<MemcachedNode> nodes) {
return new ArrayModNodeLocator(nodes, getHashAlg());
case CONSISTENT:
return new KetamaNodeLocator(nodes, getHashAlg());
case ROUND_ROBIN:
if (getFailureMode() != FailureMode.Cancel

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amcrn what is the reason for excluding Redistribute FailureMode ? RoundRobin seems like a good fit for Redistribute as well.

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

Successfully merging this pull request may close these issues.

3 participants