This repository was archived by the owner on Feb 18, 2021. It is now read-only.
File tree 2 files changed +20
-0
lines changed
2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -456,6 +456,7 @@ function onRemoteConfigUpdate(changedKeys, forceUpdate) {
456
456
self . updateCircuitShorts ( hasChanged , forceUpdate ) ;
457
457
self . updateCircuitCodeNames ( hasChanged , forceUpdate ) ;
458
458
self . updateRateLimitingEnabled ( hasChanged , forceUpdate ) ;
459
+ self . updateDefaultServiceRpsLimit ( hasChanged , forceUpdate ) ;
459
460
self . updateTotalRpsLimit ( hasChanged , forceUpdate ) ;
460
461
self . updateExemptServices ( hasChanged , forceUpdate ) ;
461
462
self . updateRpsLimitForServiceName ( hasChanged , forceUpdate ) ;
@@ -636,6 +637,14 @@ ApplicationClients.prototype.updatePartialAffinityEnabled = function updateParti
636
637
}
637
638
} ;
638
639
640
+ ApplicationClients . prototype . updateDefaultServiceRpsLimit = function updateDefaultServiceRpsLimit ( hasChanged , forceUpdate ) {
641
+ var self = this ;
642
+ if ( forceUpdate || hasChanged [ 'ratelimiting.defaultServiceRpsLimit' ] ) {
643
+ var limit = self . remoteConfig . get ( 'ratelimiting.defaultServiceRpsLimit' , 0 ) ;
644
+ self . serviceProxy . rateLimiter . updateDefaultServiceRpsLimit ( limit ) ;
645
+ }
646
+ } ;
647
+
639
648
ApplicationClients . prototype . updateTotalRpsLimit = function updateTotalRpsLimit ( hasChanged , forceUpdate ) {
640
649
var self = this ;
641
650
if ( forceUpdate || hasChanged [ 'rateLimiting.totalRpsLimit' ] ) {
Original file line number Diff line number Diff line change @@ -310,6 +310,17 @@ function updateServiceLimit(serviceName, limit) {
310
310
}
311
311
} ;
312
312
313
+ RateLimiter . prototype . updateDefaultServiceRpsLimit =
314
+ function updateDefaultServiceRpsLimit ( limit ) {
315
+ var self = this ;
316
+
317
+ if ( limit === 0 ) {
318
+ self . defaultServiceRpsLimit = DEFAULT_SERVICE_RPS_LIMIT ;
319
+ } else {
320
+ self . defaultServiceRpsLimit = limit ;
321
+ }
322
+ } ;
323
+
313
324
RateLimiter . prototype . updateTotalLimit =
314
325
function updateTotalLimit ( limit ) {
315
326
var self = this ;
You can’t perform that action at this time.
0 commit comments