Documentation ¶
Overview ¶
Package scaling provides the autoscaling capability for Numaflow.
A workqueue is implemented in this package to watch vertices in the cluster, calculate the desired replica number for each of them periodically, and patch the vertex spec.
Function StartWatching() and StopWatching() are also provided in the package, so that vertices can be added into and removed from the workqueue.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func KeyOfVertex ¶
KeyOfVertex returns the unique key of a vertex
Types ¶
type Option ¶
type Option func(*options)
func WithTaskInterval ¶
func WithWorkers ¶
type Scaler ¶
type Scaler struct {
// contains filtered or unexported fields
}
func (*Scaler) Start ¶
Start function starts the autoscaling worker group. Each worker keeps picking up scaling tasks (which contains vertex keys) to calculate the desired replicas, and patch the vertex spec with the new replica number if needed.
func (*Scaler) StartWatching ¶
StartWatching put a key (namespace/name) into the Scaler
func (*Scaler) StopWatching ¶
StopWatching stops autoscaling on the key (namespace/name)