Skip to content

Commit

Permalink
Merge pull request #17 from substratusai/configurable-global-concurrency
Browse files Browse the repository at this point in the history
configurable global concurrency default
  • Loading branch information
nstogner authored Nov 8, 2023
2 parents e7fb99d + c5f7e59 commit b336066
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,16 @@ func run() error {
var metricsAddr string
var enableLeaderElection bool
var probeAddr string
var concurrencyPerReplica int
var maxQueueSize int

flag.StringVar(&metricsAddr, "metrics-bind-address", ":8082", "The address the metric endpoint binds to.")
flag.StringVar(&probeAddr, "health-probe-bind-address", ":8081", "The address the probe endpoint binds to.")
flag.BoolVar(&enableLeaderElection, "leader-elect", false,
"Enable leader election for controller manager. "+
"Enabling this will ensure there is only one active controller manager.")
flag.IntVar(&concurrencyPerReplica, "concurrency", 100, "the number of simultaneous requests that can be processed by each replica")
flag.IntVar(&maxQueueSize, "max-queue-size", 60000, "the maximum size of the queue that holds requests")
opts := zap.Options{
Development: true,
}
Expand Down Expand Up @@ -75,7 +80,7 @@ func run() error {
return fmt.Errorf("starting manager: %w", err)
}

fifo := NewFIFOQueueManager(100, 60000)
fifo := NewFIFOQueueManager(concurrencyPerReplica, maxQueueSize)

endpoints, err := NewEndpointsManager(mgr)
if err != nil {
Expand Down

0 comments on commit b336066

Please sign in to comment.