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:
@@ -351,7 +351,7 @@ type (
|
|||||||
IdleTimeout *int `json:"idletimeout,omitempty"`
|
IdleTimeout *int `json:"idletimeout,omitempty"`
|
||||||
|
|
||||||
// Maximum number of pods to be specialized which will serve requests
|
// 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"`
|
Concurrency int `json:"concurrency,omitempty"`
|
||||||
|
|
||||||
// RequestsPerPod indicates the maximum number of concurrent requests that can be served by a specialized pod
|
// RequestsPerPod indicates the maximum number of concurrent requests that can be served by a specialized pod
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ var (
|
|||||||
},
|
},
|
||||||
"concurrency": {
|
"concurrency": {
|
||||||
Type: "integer",
|
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": {
|
"requestsPerPod": {
|
||||||
Type: "integer",
|
Type: "integer",
|
||||||
|
|||||||
+1
-1
@@ -59,7 +59,7 @@ func (executor *Executor) getServiceForFunctionAPI(w http.ResponseWriter, r *htt
|
|||||||
if t == fv1.ExecutorTypePoolmgr {
|
if t == fv1.ExecutorTypePoolmgr {
|
||||||
concurrency := fn.Spec.Concurrency
|
concurrency := fn.Spec.Concurrency
|
||||||
if concurrency == 0 {
|
if concurrency == 0 {
|
||||||
concurrency = 5
|
concurrency = 500
|
||||||
}
|
}
|
||||||
requestsPerpod := fn.Spec.RequestsPerPod
|
requestsPerpod := fn.Spec.RequestsPerPod
|
||||||
if requestsPerpod == 0 {
|
if requestsPerpod == 0 {
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import (
|
|||||||
const (
|
const (
|
||||||
DEFAULT_MIN_SCALE = 1
|
DEFAULT_MIN_SCALE = 1
|
||||||
DEFAULT_TARGET_CPU_PERCENTAGE = 80
|
DEFAULT_TARGET_CPU_PERCENTAGE = 80
|
||||||
DEFAULT_CONCURRENCY = 5
|
DEFAULT_CONCURRENCY = 500
|
||||||
)
|
)
|
||||||
|
|
||||||
type CreateSubCommand struct {
|
type CreateSubCommand struct {
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ var (
|
|||||||
FnTestHeader = Flag{Type: StringSlice, Name: flagkey.FnTestHeader, Short: "H", Usage: "Request headers"}
|
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"}
|
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}
|
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}
|
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"}
|
HtName = Flag{Type: String, Name: flagkey.HtName, Usage: "HTTP trigger name"}
|
||||||
|
|||||||
Reference in New Issue
Block a user