Increase default concurrency (#1980)

Increase the default concurrency to 500 from 5 set in the function. Usually, it is good to error on the higher side and if needed, users can always fine-tune it to their needs.
This commit is contained in:
Rahul Bhati
2021-04-06 14:52:14 +05:30
committed by GitHub
parent 25acd7fd16
commit 1cd8f4d4f7
5 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -351,7 +351,7 @@ type (
IdleTimeout *int `json:"idletimeout,omitempty"`
// Maximum number of pods to be specialized which will serve requests
// This is optional. If not specified default value will be taken as 5
// This is optional. If not specified default value will be taken as 500
Concurrency int `json:"concurrency,omitempty"`
// RequestsPerPod indicates the maximum number of concurrent requests that can be served by a specialized pod
+1 -1
View File
@@ -47,7 +47,7 @@ var (
},
"concurrency": {
Type: "integer",
Description: "Concurrency specifies the maximum number of pods that can be specialized concurrently to serve requests.\n This is optional. If not specified default value will be taken as 5",
Description: "Concurrency specifies the maximum number of pods that can be specialized concurrently to serve requests.\n This is optional. If not specified default value will be taken as 500",
},
"requestsPerPod": {
Type: "integer",
+1 -1
View File
@@ -59,7 +59,7 @@ func (executor *Executor) getServiceForFunctionAPI(w http.ResponseWriter, r *htt
if t == fv1.ExecutorTypePoolmgr {
concurrency := fn.Spec.Concurrency
if concurrency == 0 {
concurrency = 5
concurrency = 500
}
requestsPerpod := fn.Spec.RequestsPerPod
if requestsPerpod == 0 {
+1 -1
View File
@@ -41,7 +41,7 @@ import (
const (
DEFAULT_MIN_SCALE = 1
DEFAULT_TARGET_CPU_PERCENTAGE = 80
DEFAULT_CONCURRENCY = 5
DEFAULT_CONCURRENCY = 500
)
type CreateSubCommand struct {
+1 -1
View File
@@ -110,7 +110,7 @@ var (
FnTestHeader = Flag{Type: StringSlice, Name: flagkey.FnTestHeader, Short: "H", Usage: "Request headers"}
FnTestQuery = Flag{Type: StringSlice, Name: flagkey.FnTestQuery, Short: "q", Usage: "Request query parameters: -q key1=value1 -q key2=value2"}
FnIdleTimeout = Flag{Type: Int, Name: flagkey.FnIdleTimeout, Usage: "The length of time (in seconds) that a function is idle before pod(s) are eligible for recycling", DefaultValue: 120}
FnConcurrency = Flag{Type: Int, Name: flagkey.FnConcurrency, Aliases: []string{"con"}, Usage: "Maximum number of pods specialized concurrently to serve requests", DefaultValue: 5}
FnConcurrency = Flag{Type: Int, Name: flagkey.FnConcurrency, Aliases: []string{"con"}, Usage: "Maximum number of pods specialized concurrently to serve requests", DefaultValue: 500}
FnRequestsPerPod = Flag{Type: Int, Name: flagkey.FnRequestsPerPod, Aliases: []string{"rpp"}, Usage: "Maximum number of concurrent requests that can be served by a specialized pod", DefaultValue: 1}
HtName = Flag{Type: String, Name: flagkey.HtName, Usage: "HTTP trigger name"}