-
As developers, how to register the priority of the App in the throttler? What are all the different ways that the throttler handles Apps, and how do they work? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Program developers can call the If the app’s name is in the form of In addition, setting the lowPriority in the |
Beta Was this translation helpful? Give feedback.
Program developers can call the
func (throttler *Throttler) ThrottleApp(appName string, expireAt time.Time, ratio float64) (appThrottle *base.AppThrottle)
function to let the throttler randomly throttle theappName
according to theratio
before theexpireAt
time.If the app’s name is in the form of
"sub-appName1:sub-appName2:sub-appName3:....."
like"75ba763c_6c98_11ee_913d_da3720e3a51e:vreplication:online-ddl"
, then any sub-appName being throttled will cause the app to be throttled.In addition, setting the lowPriority in the
flags
parameter to true when callingfunc (throttler *Throttler) CheckByType(ctx context.Context, appName string, remoteAddr string, flags *CheckFlags, checkType Th…