Skip to main content

Scaling Horizontally

Scale the agent to meet the needs of your applications

Architecture

The agent is a logical grouping of two components, Controllers and Workers that scale independently.

The Controller is responsible for the following tasks:

  • Registration of itself against the Superblocks server
  • Orchestrating the execution of a workflow
  • Scheduled Job reconciliation
  • Managing a fleet of workers
  • Reporting diagnostics and metrics to the Superblocks server
  • Exposing metrics via Prometheus
  • Serving an HTTP API

The Worker is responsible for the following tasks:

  • Discovering the desired state of the controller fleet from the Superblocks server.
  • Registration of itself against controllers
  • Managing a fleet of controllers
  • Reporting diagnostics and metrics to the Superblocks server
  • Exposing metrics via Prometheus
  • Executing steps
  • Controlling global concurrency

For more info on these components, see the repositories linked here.

Scaling

The controller and worker components scale on different criteria. For a production deployment, it is recommended that you deploy at least three controllers and three workers across different availability zones.

Controller scaling criteria are:

  • CPU and memory usage
  • Back pressure on scheduled job reconciliation

Worker scaling criteria are:

  • Step back pressure for workers with a global concurrency of one
  • Average active steps for workers with no concurrency set