Skip to content

Commit

Permalink
fixes: conntrack aging related
Browse files Browse the repository at this point in the history
  • Loading branch information
TrekkieCoder committed Mar 21, 2024
1 parent 4fed199 commit 796d5e2
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
2 changes: 1 addition & 1 deletion loxilb-ebpf
28 changes: 16 additions & 12 deletions loxinet/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,19 @@ const (

// constants
const (
MaxNatEndPoints = 16
DflLbaInactiveTries = 2 // Default number of inactive tries before LB arm is turned off
MaxDflLbaInactiveTries = 100 // Max number of inactive tries before LB arm is turned off
DflLbaCheckTimeout = 10 // Default timeout for checking LB arms
DflHostProbeTimeout = 60 // Default probe timeout for end-point host
InitHostProbeTimeout = 15 // Initial probe timeout for end-point host
MaxHostProbeTime = 24 * 3600 // Max possible host health check duration
LbDefaultInactiveTimeout = 4 * 60 // Default inactive timeout for established sessions
LbMaxInactiveTimeout = 24 * 3600 // Maximum inactive timeout for established sessions
MaxEndPointCheckers = 4 // Maximum helpers to check endpoint health
EndPointCheckerDuration = 2 // Duration at which ep-helpers will run
MaxEndPointSweeps = 20 // Maximum end-point sweeps per round
MaxNatEndPoints = 16
DflLbaInactiveTries = 2 // Default number of inactive tries before LB arm is turned off
MaxDflLbaInactiveTries = 100 // Max number of inactive tries before LB arm is turned off
DflLbaCheckTimeout = 10 // Default timeout for checking LB arms
DflHostProbeTimeout = 60 // Default probe timeout for end-point host
InitHostProbeTimeout = 15 // Initial probe timeout for end-point host
MaxHostProbeTime = 24 * 3600 // Max possible host health check duration
LbDefaultInactiveTimeout = 4 * 60 // Default inactive timeout for established sessions
LbDefaultInactiveNSTimeout = 20 // Default inactive timeout for non-session oriented protocols
LbMaxInactiveTimeout = 24 * 3600 // Maximum inactive timeout for established sessions
MaxEndPointCheckers = 4 // Maximum helpers to check endpoint health
EndPointCheckerDuration = 2 // Duration at which ep-helpers will run
MaxEndPointSweeps = 20 // Maximum end-point sweeps per round
)

type ruleTType uint
Expand Down Expand Up @@ -1206,6 +1207,9 @@ func (R *RuleH) AddNatLbRule(serv cmn.LbServiceArg, servSecIPs []cmn.LbSecIPArg,
return RuleArgsErr, errors.New("service-args error")
} else if serv.InactiveTimeout == 0 {
serv.InactiveTimeout = LbDefaultInactiveTimeout
if serv.Proto != "tcp" && serv.Proto != "sctp" {
serv.InactiveTimeout = LbDefaultInactiveNSTimeout
}
}

// Validate liveness probetype and port
Expand Down

0 comments on commit 796d5e2

Please sign in to comment.