Skip to content

Conversation

@murali-reddy
Copy link
Contributor

@murali-reddy murali-reddy commented May 20, 2019

Fixes #105 rate-limit routes calculation done when a gossip topology update is received

Copy link
Contributor

@bboreham bboreham left a comment

Choose a reason for hiding this comment

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

I would like a comment on the "magic numbers" 2 and 4, and maybe a comment on the TODO, but can merge now and fix that later.

routes.go Outdated
type broadcastRoutes map[PeerName][]PeerName

var limiter = rate.NewLimiter(2, 4)
var pendingCalculate = false
Copy link
Contributor

Choose a reason for hiding this comment

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

can these be members of routes rather than globals

@murali-reddy
Copy link
Contributor Author

Sorry, current fix seems to cause some regression. I did some scaling tests (>100 nodes). Connections seems to go into pending, retrying state forever. Narrowed down problem is due to limiter.Wait. Strangely moment delay is introduced due to wait, connections are not established. though routes calculate() is an asyn activity to connection processing.

I need to investigate further.

@murali-reddy
Copy link
Contributor Author

murali-reddy commented Oct 1, 2019

On further testing rate limiting as solution did not provide predictable workload irrespetice of cluster size. Closing thie PR in favour of in #117, #118

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.

rate-limit routes calculation done when a gossip topology update is received

2 participants