diff --git a/pkg/cmd/server/server.go b/pkg/cmd/server/server.go index dcfe6e08fc..563e5ce208 100644 --- a/pkg/cmd/server/server.go +++ b/pkg/cmd/server/server.go @@ -239,6 +239,9 @@ func (c *Config) Complete(ctx context.Context) (RunnableServer, error) { enableGRPCHistogram() + specificConcurrencyLimits := c.DispatchConcurrencyLimits + concurrencyLimits := specificConcurrencyLimits.WithOverallDefaultLimit(c.GlobalDispatchConcurrencyLimit) + dispatcher := c.Dispatcher if dispatcher == nil { cc, err := c.DispatchCacheConfig.WithRevisionParameters( @@ -257,9 +260,6 @@ func (c *Config) Complete(ctx context.Context) (RunnableServer, error) { dispatchPresharedKey = c.PresharedSecureKey[0] } - specificConcurrencyLimits := c.DispatchConcurrencyLimits - concurrencyLimits := specificConcurrencyLimits.WithOverallDefaultLimit(c.GlobalDispatchConcurrencyLimit) - hashringConfigJSON, err := (&consistent.BalancerConfig{ ReplicationFactor: c.DispatchHashringReplicationFactor, Spread: c.DispatchHashringSpread, @@ -318,6 +318,7 @@ func (c *Config) Complete(ctx context.Context) (RunnableServer, error) { clusterdispatch.PrometheusSubsystem(c.DispatchClusterMetricsPrefix), clusterdispatch.Cache(cdcc), clusterdispatch.RemoteDispatchTimeout(c.DispatchUpstreamTimeout), + clusterdispatch.ConcurrencyLimits(concurrencyLimits), ) if err != nil { return nil, fmt.Errorf("failed to configure cluster dispatch: %w", err)