mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-21 14:19:49 +08:00
lbagent: tunable tune.http.maxhdr
This commit is contained in:
@@ -104,6 +104,7 @@ type SLoadbalancerAgentParamsHaproxy struct {
|
||||
LogHttp bool
|
||||
LogTcp bool
|
||||
LogNormal bool
|
||||
TuneHttpMaxhdr int
|
||||
}
|
||||
|
||||
type SLoadbalancerAgentParamsTelegraf struct {
|
||||
@@ -196,6 +197,12 @@ func (p *SLoadbalancerAgentParamsHaproxy) Validate(data *jsonutils.JSONDict) err
|
||||
// This is a limit imposed by haproxy and arch word size
|
||||
p.GlobalNbthread = 64
|
||||
}
|
||||
if p.TuneHttpMaxhdr < 0 {
|
||||
p.TuneHttpMaxhdr = 0
|
||||
}
|
||||
if p.TuneHttpMaxhdr > 32767 {
|
||||
p.TuneHttpMaxhdr = 32767
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -761,6 +768,7 @@ global
|
||||
maxconn 20480
|
||||
tune.ssl.default-dh-param 2048
|
||||
{{- println }}
|
||||
{{- if .haproxy.tune_http_maxhdr }} tune.http.maxhdr {{ println .haproxy.tune_http_maxhdr }} {{- end }}
|
||||
{{- if .haproxy.global_stats_socket }} {{ println .haproxy.global_stats_socket }} {{- end }}
|
||||
{{- if .haproxy.global_nbthread }} nbthread {{ println .haproxy.global_nbthread }} {{- end }}
|
||||
{{- if .haproxy.global_log }} {{ println .haproxy.global_log }} {{- end }}
|
||||
|
||||
@@ -234,6 +234,7 @@ type LoadbalancerAgentParamsHaproxy struct {
|
||||
LogHttp bool
|
||||
LogTcp bool
|
||||
LogNormal bool
|
||||
TuneHttpMaxhdr int
|
||||
}
|
||||
|
||||
type LoadbalancerAgentParamsTelegraf struct {
|
||||
|
||||
@@ -43,6 +43,7 @@ type LoadbalancerAgentParamsOptions struct {
|
||||
HaproxyLogHttp string `choices:"true|false"`
|
||||
HaproxyLogTcp string `choices:"true|false"`
|
||||
HaproxyLogNormal string `choices:"true|false"`
|
||||
HaproxyTuneHttpMaxhdr *int `help:"max number of http headers allowed"`
|
||||
|
||||
TelegrafInfluxDbOutputUrl string
|
||||
TelegrafInfluxDbOutputName string
|
||||
|
||||
Reference in New Issue
Block a user