@@ -67,16 +67,18 @@ type Config struct {
6767 EnableReadFromSecondaryAdvancedVisibility dynamicconfig.BoolPropertyFnWithNamespaceFilter
6868 ESIndexMaxResultWindow dynamicconfig.IntPropertyFn
6969
70- HistoryMaxPageSize dynamicconfig.IntPropertyFnWithNamespaceFilter
71- RPS dynamicconfig.IntPropertyFn
72- MaxNamespaceRPSPerInstance dynamicconfig.IntPropertyFnWithNamespaceFilter
73- MaxNamespaceBurstPerInstance dynamicconfig.IntPropertyFnWithNamespaceFilter
74- MaxNamespaceCountPerInstance dynamicconfig.IntPropertyFnWithNamespaceFilter
75- GlobalNamespaceRPS dynamicconfig.IntPropertyFnWithNamespaceFilter
76- MaxIDLengthLimit dynamicconfig.IntPropertyFn
77- EnableClientVersionCheck dynamicconfig.BoolPropertyFn
78- DisallowQuery dynamicconfig.BoolPropertyFnWithNamespaceFilter
79- ShutdownDrainDuration dynamicconfig.DurationPropertyFn
70+ HistoryMaxPageSize dynamicconfig.IntPropertyFnWithNamespaceFilter
71+ RPS dynamicconfig.IntPropertyFn
72+ MaxNamespaceRPSPerInstance dynamicconfig.IntPropertyFnWithNamespaceFilter
73+ MaxNamespaceBurstPerInstance dynamicconfig.IntPropertyFnWithNamespaceFilter
74+ MaxNamespaceCountPerInstance dynamicconfig.IntPropertyFnWithNamespaceFilter
75+ MaxNamespaceVisibilityRPSPerInstance dynamicconfig.IntPropertyFnWithNamespaceFilter
76+ MaxNamespaceVisibilityBurstPerInstance dynamicconfig.IntPropertyFnWithNamespaceFilter
77+ GlobalNamespaceRPS dynamicconfig.IntPropertyFnWithNamespaceFilter
78+ MaxIDLengthLimit dynamicconfig.IntPropertyFn
79+ EnableClientVersionCheck dynamicconfig.BoolPropertyFn
80+ DisallowQuery dynamicconfig.BoolPropertyFnWithNamespaceFilter
81+ ShutdownDrainDuration dynamicconfig.DurationPropertyFn
8082
8183 MaxBadBinaries dynamicconfig.IntPropertyFnWithNamespaceFilter
8284
@@ -153,6 +155,8 @@ func NewConfig(dc *dynamicconfig.Collection, numHistoryShards int32, esIndexName
153155 MaxNamespaceRPSPerInstance : dc .GetIntPropertyFilteredByNamespace (dynamicconfig .FrontendMaxNamespaceRPSPerInstance , 2400 ),
154156 MaxNamespaceBurstPerInstance : dc .GetIntPropertyFilteredByNamespace (dynamicconfig .FrontendMaxNamespaceBurstPerInstance , 4800 ),
155157 MaxNamespaceCountPerInstance : dc .GetIntPropertyFilteredByNamespace (dynamicconfig .FrontendMaxNamespaceCountPerInstance , 1200 ),
158+ MaxNamespaceVisibilityRPSPerInstance : dc .GetIntPropertyFilteredByNamespace (dynamicconfig .FrontendMaxNamespaceVisibilityRPSPerInstance , 10 ),
159+ MaxNamespaceVisibilityBurstPerInstance : dc .GetIntPropertyFilteredByNamespace (dynamicconfig .FrontendMaxNamespaceVisibilityBurstPerInstance , 10 ),
156160 GlobalNamespaceRPS : dc .GetIntPropertyFilteredByNamespace (dynamicconfig .FrontendGlobalNamespaceRPS , 0 ),
157161 MaxIDLengthLimit : dc .GetIntProperty (dynamicconfig .MaxIDLengthLimit , 1000 ),
158162 MaxBadBinaries : dc .GetIntPropertyFilteredByNamespace (dynamicconfig .FrontendMaxBadBinaries , namespace .MaxBadBinaries ),
@@ -310,12 +314,13 @@ func (s *Service) Stop() {
310314}
311315
312316func namespaceRPS (
313- config * Config ,
317+ perInstanceRPSFn dynamicconfig.IntPropertyFnWithNamespaceFilter ,
318+ globalRPSFn dynamicconfig.IntPropertyFnWithNamespaceFilter ,
314319 frontendResolver membership.ServiceResolver ,
315320 namespace string ,
316321) float64 {
317- hostRPS := float64 (config . MaxNamespaceRPSPerInstance (namespace ))
318- globalRPS := float64 (config . GlobalNamespaceRPS (namespace ))
322+ hostRPS := float64 (perInstanceRPSFn (namespace ))
323+ globalRPS := float64 (globalRPSFn (namespace ))
319324 hosts := float64 (numFrontendHosts (frontendResolver ))
320325
321326 rps := hostRPS + globalRPS * math .Exp ((1.0 - hosts )/ 8.0 )
0 commit comments