Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Iphash1Balancer ¶
type Iphash1Balancer struct{}
*
- Iphash balancer
func (*Iphash1Balancer) Elect ¶
func (b *Iphash1Balancer) Elect(context core.Context, backends []*core.Backend) (*core.Backend, error)
*
- Elect backend using semi-consistent iphash strategy. This is naive implementation
- using Key+Node Hash Algorithm for stable sharding described at http://kennethxu.blogspot.com/2012/11/sharding-algorithm.html
- It survives removing nodes (removing stability), so that clients connected to backends that have not been removed stay
- untouched. *
type RoundrobinBalancer ¶
type RoundrobinBalancer struct {
// contains filtered or unexported fields
}
*
- Roundrobin balancer
Source Files ¶
Click to show internal directories.
Click to hide internal directories.