package peers

import "github.com/uber/tchannel-go/peers"

Package peers provides helpers for managing TChannel peers.

Index

Functions

func NewHRWScorer

func NewHRWScorer(clientID uint32) tchannel.ScoreCalculator

NewHRWScorer returns a ScoreCalculator based on Rendezvous or Highest Random Weight hashing. It is useful for distributing load in peer-to-peer situations where we have many clients picking from a set of servers with "sticky" semantics that will spread load evenly as servers go down or new servers are added. The clientID is used to score the servers, so each client should pass in a unique client ID.

Source Files

doc.go prefer.go

Version
v1.12.0
Published
Nov 14, 2018
Platform
js/wasm
Imports
1 packages
Last checked
10 hours ago

Tools for package owners.