feat(proxyd): make max batch size hard limit 1000 and default 100 (#7719)
* feat: make max batch size hard limit 1000 and default 100 * nit: rename const
This commit is contained in:
parent
9e1c96e9c5
commit
4e0100bbe9
@ -34,7 +34,8 @@ const (
|
||||
ContextKeyAuth = "authorization"
|
||||
ContextKeyReqID = "req_id"
|
||||
ContextKeyXForwardedFor = "x_forwarded_for"
|
||||
MaxBatchRPCCallsHardLimit = 100
|
||||
DefaultMaxBatchRPCCallsLimit = 100
|
||||
MaxBatchRPCCallsHardLimit = 1000
|
||||
cacheStatusHdr = "X-Proxyd-Cache-Status"
|
||||
defaultRPCTimeout = 10 * time.Second
|
||||
defaultBodySizeLimit = 256 * opt.KiB
|
||||
@ -108,7 +109,11 @@ func NewServer(
|
||||
maxUpstreamBatchSize = defaultMaxUpstreamBatchSize
|
||||
}
|
||||
|
||||
if maxBatchSize == 0 || maxBatchSize > MaxBatchRPCCallsHardLimit {
|
||||
if maxBatchSize == 0 {
|
||||
maxBatchSize = DefaultMaxBatchRPCCallsLimit
|
||||
}
|
||||
|
||||
if maxBatchSize > MaxBatchRPCCallsHardLimit {
|
||||
maxBatchSize = MaxBatchRPCCallsHardLimit
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user