Skip to content

Commit

Permalink
cmapisrv-mock: configure bootstrap QPS to speed-up initial synch
Browse files Browse the repository at this point in the history
Configure by default higher rate limiter settings during the bootstrap
phase, to speed it up as no watchers are active yet at that point.

Signed-off-by: Marco Iorio <[email protected]>
  • Loading branch information
giorio94 committed Jul 4, 2024
1 parent 40e2511 commit d683edd
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ spec:
- --random-svc-ip6={{ .Values.config.randomSvcIP6 }}
- --kvstore-opt=etcd.config=/var/lib/cilium/etcd-config.yaml
- --kvstore-opt=etcd.qps={{ .Values.config.etcdQPS }}
- --kvstore-opt=etcd.bootstrapQps={{ .Values.config.etcdBootstrapQPS }}
- --kvstore-opt=etcd.maxInflight={{ .Values.config.etcdMaxInflight }}
- --prometheus-serve-addr=:9999
ports:
Expand Down
1 change: 1 addition & 0 deletions cmapisrv-mock/deploy/cmapisrv-mock/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ config:

# Global etcd rate limiting settings.
etcdQPS: 1000
etcdBootstrapQPS: 10000
etcdMaxInflight: 100

podAnnotations: {}
Expand Down
6 changes: 5 additions & 1 deletion cmapisrv-mock/internal/mocker/cells.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@ var Cell = cell.Module(

kvstore.Cell(kvstore.EtcdBackendName),
heartbeat.Cell,
cell.Provide(func() *kvstore.ExtraOptions { return nil }),
cell.Provide(func(ss syncstate.SyncState) *kvstore.ExtraOptions {
return &kvstore.ExtraOptions{
BootstrapComplete: ss.WaitChannel(),
}
}),
store.Cell,

cmhealth.HealthAPIServerCell,
Expand Down

0 comments on commit d683edd

Please sign in to comment.