You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Jason Brown (JIRA)" <ji...@apache.org> on 2015/04/17 22:08:59 UTC
[jira] [Comment Edited] (CASSANDRA-9206) Remove seed gossip
probability
[ https://issues.apache.org/jira/browse/CASSANDRA-9206?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14500571#comment-14500571 ]
Jason Brown edited comment on CASSANDRA-9206 at 4/17/15 8:08 PM:
-----------------------------------------------------------------
Actually, if all we really care about doing is increasing the fanout from a fixed 1 to 2 nodes per gossip round (to aid in convergence), we could just select two peers at random, rather than always selecting one random peer plus one seed (as per the change in this ticket). This way seeds do not get the extra load, and we still achieve the increased gossip sessions via a larger fanout.
Granted, this would increase the number of gossip sessions per round from a current max of 3 to a max of 4, but then gossiping to a seed and an down node are probabalistic anyway.
was (Author: jasobrown):
Actually, if all we really care about doing is increasing the fanout from a fixed 1 to 2 nodes per gossip round (to aid in convergence), we could just select two peers at random, rather than always selecting one random peer plus one seed (as per the change in this ticket). This way seeds do not get the extra load, and we still achieve the increased gossip sessions via a larger fanout.
> Remove seed gossip probability
> ------------------------------
>
> Key: CASSANDRA-9206
> URL: https://issues.apache.org/jira/browse/CASSANDRA-9206
> Project: Cassandra
> Issue Type: Improvement
> Reporter: Brandon Williams
> Assignee: Brandon Williams
> Fix For: 2.1.5
>
> Attachments: 9206.txt
>
>
> Currently, we use probability to determine whether a node will gossip with a seed:
> {noformat}
> double probability = seeds.size() / (double) (liveEndpoints.size() + unreachableEndpoints.size());
> double randDbl = random.nextDouble();
> if (randDbl <= probability)
> sendGossip(prod, seeds);
> {noformat}
> I propose that we remove this probability, and instead *always* gossip with a seed. This of course means increased traffic and processing on the seed(s), but even a 1000 node cluster with a single seed will only put ~1000 messages per second on the seed, which is virtually nothing. Should it become a problem, the solution is simple: add more seeds. Since seeds will also always gossip with each other, this effectively gives us a poor man's spanning tree, with the only cost being removing a few lines of code, and should greatly improve our gossip convergence time, especially in large clusters.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)