Skip to content

Commit

Permalink
Merge pull request #110 from loxilb-io/lc-support
Browse files Browse the repository at this point in the history
LB least-connection mode support
  • Loading branch information
UltraInstinct14 authored Mar 4, 2024
2 parents 74e3c48 + b8cfddb commit c6a36b1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/agent/manager/loadbalancer/loadbalancer.go
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,8 @@ func (m *Manager) addLoadBalancer(svc *corev1.Service) error {
epSelect = api.LbSelHash
} else if eps == "persist" {
epSelect = api.LbSelRrPersist
} else if eps == "lc" {
epSelect = api.LbSelLeastConnections
} else {
epSelect = api.LbSelRr
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/api/lb.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ const (
LbSelPrio
// LbSelRrPersist - persist connectons from same client
LbSelRrPersist
// LbSelLeastConnections - select client based on least connections
LbSelLeastConnections
)

type LbMode int32
Expand Down

0 comments on commit c6a36b1

Please sign in to comment.