@@ -239,6 +239,9 @@ func (c *Config) Complete(ctx context.Context) (RunnableServer, error) {
239
239
240
240
enableGRPCHistogram ()
241
241
242
+ specificConcurrencyLimits := c .DispatchConcurrencyLimits
243
+ concurrencyLimits := specificConcurrencyLimits .WithOverallDefaultLimit (c .GlobalDispatchConcurrencyLimit )
244
+
242
245
dispatcher := c .Dispatcher
243
246
if dispatcher == nil {
244
247
cc , err := c .DispatchCacheConfig .WithRevisionParameters (
@@ -257,9 +260,6 @@ func (c *Config) Complete(ctx context.Context) (RunnableServer, error) {
257
260
dispatchPresharedKey = c .PresharedSecureKey [0 ]
258
261
}
259
262
260
- specificConcurrencyLimits := c .DispatchConcurrencyLimits
261
- concurrencyLimits := specificConcurrencyLimits .WithOverallDefaultLimit (c .GlobalDispatchConcurrencyLimit )
262
-
263
263
hashringConfigJSON , err := (& consistent.BalancerConfig {
264
264
ReplicationFactor : c .DispatchHashringReplicationFactor ,
265
265
Spread : c .DispatchHashringSpread ,
@@ -318,6 +318,7 @@ func (c *Config) Complete(ctx context.Context) (RunnableServer, error) {
318
318
clusterdispatch .PrometheusSubsystem (c .DispatchClusterMetricsPrefix ),
319
319
clusterdispatch .Cache (cdcc ),
320
320
clusterdispatch .RemoteDispatchTimeout (c .DispatchUpstreamTimeout ),
321
+ clusterdispatch .ConcurrencyLimits (concurrencyLimits ),
321
322
)
322
323
if err != nil {
323
324
return nil , fmt .Errorf ("failed to configure cluster dispatch: %w" , err )
0 commit comments