Improvements from scale testing (#1812)
Poolmanager when tested at high load had some issues and this PR fixes one set of them which were found so far. Co-authored-by: Vishal <vishal-biyani@users.noreply.github.com>
This commit is contained in:
@@ -57,10 +57,11 @@ type HTTPTriggerSet struct {
|
||||
tsRoundTripperParams *tsRoundTripperParams
|
||||
isDebugEnv bool
|
||||
svcAddrUpdateThrottler *throttler.Throttler
|
||||
unTapServiceTimeout time.Duration
|
||||
}
|
||||
|
||||
func makeHTTPTriggerSet(logger *zap.Logger, fmap *functionServiceMap, fissionClient *crd.FissionClient,
|
||||
kubeClient *kubernetes.Clientset, executor *executorClient.Client, crdClient rest.Interface, params *tsRoundTripperParams, isDebugEnv bool, actionThrottler *throttler.Throttler) (*HTTPTriggerSet, k8sCache.Store, k8sCache.Store) {
|
||||
kubeClient *kubernetes.Clientset, executor *executorClient.Client, crdClient rest.Interface, params *tsRoundTripperParams, isDebugEnv bool, unTapServiceTimeout time.Duration, actionThrottler *throttler.Throttler) (*HTTPTriggerSet, k8sCache.Store, k8sCache.Store) {
|
||||
|
||||
httpTriggerSet := &HTTPTriggerSet{
|
||||
logger: logger.Named("http_trigger_set"),
|
||||
@@ -74,6 +75,7 @@ func makeHTTPTriggerSet(logger *zap.Logger, fmap *functionServiceMap, fissionCli
|
||||
tsRoundTripperParams: params,
|
||||
isDebugEnv: isDebugEnv,
|
||||
svcAddrUpdateThrottler: actionThrottler,
|
||||
unTapServiceTimeout: unTapServiceTimeout,
|
||||
}
|
||||
var tStore, fnStore k8sCache.Store
|
||||
var tController, fnController k8sCache.Controller
|
||||
@@ -148,6 +150,7 @@ func (ts *HTTPTriggerSet) getRouter(fnTimeoutMap map[types.UID]int) *mux.Router
|
||||
isDebugEnv: ts.isDebugEnv,
|
||||
svcAddrUpdateThrottler: ts.svcAddrUpdateThrottler,
|
||||
functionTimeoutMap: fnTimeoutMap,
|
||||
unTapServiceTimeout: ts.unTapServiceTimeout,
|
||||
}
|
||||
|
||||
// The functionHandler for HTTP trigger with fn reference type "FunctionReferenceTypeFunctionName",
|
||||
@@ -196,6 +199,7 @@ func (ts *HTTPTriggerSet) getRouter(fnTimeoutMap map[types.UID]int) *mux.Router
|
||||
isDebugEnv: ts.isDebugEnv,
|
||||
svcAddrUpdateThrottler: ts.svcAddrUpdateThrottler,
|
||||
functionTimeoutMap: fnTimeoutMap,
|
||||
unTapServiceTimeout: ts.unTapServiceTimeout,
|
||||
}
|
||||
muxRouter.HandleFunc(utils.UrlForFunction(fn.ObjectMeta.Name, fn.ObjectMeta.Namespace), fh.handler)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user