Introducing a new way to review your PRs.

Read the announcement

armadaproject / armada

A multi-cluster batch queuing system for high-throughput workloads on Kubernetes.

View on GitHub

20 documents · Updated Nov 23, 2026

docs / monitoring-and-load-tools

Monitoring and load tools

Binoculars and the load-testing tools give operators two views of Armada at run time. Binoculars exposes selected Kubernetes actions and job-pod logs through an authenticated service. Broadside measures Lookout database behavior under controlled load. armada-load-tester drives jobs through the Armada API and can observe their event-based progress.

Operational roles

Binoculars service

Binoculars is the Kubernetes-facing support service for job operations that need cluster access. Lookout uses its configured base URL to reach the service, while the service uses the caller identity and Kubernetes access rules to perform the requested operation.

Its public contract has two operations:

  • Job-pod logs: Fetches logs for a job pod and returns timestamped log lines. A request can select the job, pod number, namespace, start time, and Kubernetes log options.
  • Node cordon: Marks a named Kubernetes node as unschedulable. The action also applies configured labels, which can record the reason and the user.

The service limits returned logs to 2,000,000 bytes and does not follow a live stream. A missing pod is reported as a not-found result with a message that points to normal pod cleanup after job completion.

References: pkg/…/binoculars.proto• L11-48 internal/…/binoculars.go• L16-52 internal/…/logs.go• L21-93 internal/…/cordon.go• L26-68

Binoculars access and health

Binoculars serves gRPC and HTTP forms of its API. Its deployment also exposes a metrics port and health probes. Prometheus scraping is optional in the Helm chart, so the presence of a metrics endpoint does not by itself mean that a monitoring system collects it.

The node cordon path checks the caller's CordonNodes permission before it changes cluster state. The log path obtains a Kubernetes client for the caller, so log visibility follows the configured identity model. Treat the cordon operation as a control action rather than as a read-only observation.

References: internal/…/server.go• L17-52 deployment/…/service.yaml• L12-29 deployment/…/deployment.yaml• L45-90 deployment/…/servicemonitor.yaml• L1-20 internal/…/cordon.go• L48-67

Load-testing roles

Broadside workload

Broadside is a standalone test runner for the Lookout data path. It creates or connects to a configured database, loads historical job data, then runs job ingestion, user-like queries, and optional bulk actions at set rates. This makes it useful for comparing database behavior under a known workload rather than for measuring a live Armada cluster end to end.

The workload has three concurrent actors:

  • Ingester: Adds jobs and advances them through queue, lease, pending, running, and terminal states.
  • Querier: Runs GetJobs and GetJobGroups patterns. It also runs related job-spec and job-run detail queries when the parent query returns suitable jobs.
  • Action actor: Runs scheduled bulk reprioritisation and cancellation actions against queue and job-set data.

Broadside supports production-like PostgreSQL and ClickHouse paths, plus an in-memory path for smoke checks. The database choice changes the meaning of a result: an in-memory run checks the test framework, while a dedicated production-like database run is intended to show database performance.

References: internal/…/doc.go• L1-22 internal/…/doc.go• L1-14 internal/…/doc.go• L1-23 internal/…/doc.go• L1-5 internal/…/generate_schema.go• L25-40 cmd/…/README.md• L1-15

Broadside test lifecycle

The Broadside runner keeps setup effects separate from measured behavior. It prepares the database and historical data, starts the workload actors, allows an optional warmup period, resets metrics, and then measures until the test ends. It waits for active work to stop before cleanup and report creation.

The flow below shows the operational boundary and the main outputs.

flowchart LR
    C[ YAML test profile ] --> R[ Broadside runner ]
    R --> D[ Lookout database ]
    R --> I[ Ingestion load ]
    R --> Q[ Query load ]
    R --> A[ Scheduled bulk actions ]
    I --> M[ Metrics reports ]
    Q --> M
    A --> M
    M --> J[ Timestamped JSON result ]

The runner also writes progress logs during the test. A warmup period removes start-up effects such as cold caches from the final measurements, while an interrupted run reports its actual measured duration.

References: internal/…/runner.go• L21-50 internal/…/runner.go• L54-95 internal/…/runner.go• L106-192 cmd/…/main.go• L125-181 cmd/…/main.go• L205-269

Armada load tester

armada-load-tester is the cluster-facing submission tool. It reads a job submission profile, creates or reuses queues, submits jobs in parallel batches, and can watch the event stream for each job set. Unlike Broadside, it sends work through Armada's submit and event APIs, so it is suited to checking submission behavior and observing scheduler and executor progress in a running cluster.

The --watch option builds a current view from job events. The view tracks job state, pod state, assigned cluster, and maximum observed resource use. The optional --timeout stops the run and causes remaining jobs to be cancelled. With --checkSuccess, the command fails if not all specified jobs were submitted or if any submitted job is not terminal-success.

References: cmd/…/root.go• L17-24 cmd/…/loadtest.go• L20-33 cmd/…/loadtest.go• L36-100 pkg/…/load-test.go• L32-71 pkg/…/load-test.go• L226-292 pkg/…/types.go• L11-54 pkg/…/watch.go• L30-38

Metrics and cluster observations

Broadside result metrics

Broadside stores one structured result for each run. The result keeps the test metadata and configuration beside the measurements, so a latency value can be compared with the workload that produced it. The generated JSON schema is the validation contract for this result and includes the selected database type, workload settings, and the measured reports.

AreaMain observationsOperational use
IngestionBatch counts, failed batches, processed query count, backlog size, backlog wait time, and batch latencyShows whether the test runner or database can keep up with writes
QueriesCounts and failures by query type and filter pattern, plus average, P50, P95, P99, and maximum latencyShows user-query cost and tail latency for different Lookout views
Bulk actionsReprioritisation and cancellation counts, affected jobs, action latency percentiles, and errorsShows the cost of large job updates while other load runs

Broadside uses bounded histograms for latency and backlog observations. This preserves percentile and tail information without storing every sample. Query and action errors include their operation context and time, but the saved error lists have a configured limit.

References: internal/…/doc.go• L56-75 internal/…/ingester.go• L25-45 internal/…/querier.go• L14-36 internal/…/actor.go• L8-28 internal/…/output.go• L15-177 internal/…/generate_schema.go• L12-18

Armada event observations

The Armada load tester does not produce a database benchmark report. When event watching is enabled, it produces a live state summary and returns the final state view to the command. This view helps an operator see whether jobs are queued, leased, pending, running, succeeded, failed, or cancelled.

The event watcher follows a job set from the last received message and resumes after transport errors. It stops on context cancellation, a missing or forbidden job set, or when the requested jobs reach terminal states. A retryable job failure is treated as a return to the queue, so it does not look permanently failed before the next attempt.

References: pkg/…/load-test.go• L74-103 pkg/…/watch.go• L26-123 pkg/…/watch.go• L40-67 pkg/…/watch.go• L115-167 pkg/…/watch.go• L201-230

Tool selection

Choose the tool based on the system boundary that must be measured:

QuestionTool
Can a caller read a job pod's logs or cordon a node with the expected access rules?Binoculars
How does the Lookout database behave under repeatable ingestion, query, and bulk-update load?Broadside
How does a running Armada cluster accept many jobs and move them through event states?armada-load-tester

These tools complement each other. Broadside isolates Lookout database behavior. The Armada load tester exercises the API and cluster path. Binoculars supplies the pod and node view needed when a cluster run needs diagnosis or an operator action.

References: pkg/…/binoculars.proto• L12-48 internal/…/doc.go• L4-8 cmd/…/loadtest.go• L36-100 pkg/…/watch.go• L62-67

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the Binoculars API contract aligned across the protobuf service, HTTP routes, Lookout URL configuration, and the deployed gRPC and web ports.
  • Keep log-size and timestamp assumptions aligned between Kubernetes log retrieval and the returned LogLine contract.
  • Treat changes to Broadside result fields as a format change. Update the Go schema generator and the checked-in internal/…/schema.json together. Update any result visualisation or comparison tools that consume the schema.
  • Keep Broadside's configured workload rates and the report's metric groups aligned. A new actor or query path can otherwise run without appearing in the saved result.
  • Keep armada-load-tester success checks aligned with the event states treated as terminal by WatchContext.

Important failure modes

TriggerConsequenceGuard
A job pod is cleaned up before a Binoculars log requestThe request returns not found instead of logsRequest logs before pod cleanup or use the job event and cluster records to locate the failure
A caller lacks CordonNodes permissionThe node remains schedulable and the action returns permission deniedCheck the caller's permission mapping before using the control path
Broadside uses the in-memory backend for a performance claimResults describe the test framework rather than production database behaviorUse a dedicated production-like database for benchmarks
Broadside backlog reaches its configured limitThe runner can block, drop work, or report an error based on the configured strategyCompare backlog percentiles and peak size with the limit
A Broadside result changes without a matching schema updateConsumers can reject valid results or accept the wrong shapeRegenerate and validate schema.json after output changes
The load tester times out while jobs remain activeThe run cancels remaining jobs and success checks failSet a timeout that covers expected cluster completion time
Event transport closes during a watchState may stop advancing until the watcher reconnects; a long outage can leave the run incompleteReview watcher errors and the final state summary

Key files

FileWhy to read it
pkg/…/binoculars.protoDefines the Binoculars log and node-cordon contract
internal/…/server.goShows how Binoculars connects auth, Kubernetes access, and its API server
internal/…/logs.goDefines the log observation limits and not-found behavior
internal/…/cordon.goDefines the permission boundary and node state change
cmd/…/main.goShows Broadside configuration, result, cleanup, and interrupt flow
internal/…/runner.goShows the lifecycle that joins workload actors and reports
internal/…/output.goDefines the saved result contract and metric groups
internal/…/generate_schema.goDefines the source used to generate the Broadside result schema
internal/…/schema.jsonProvides the checked-in validation shape for Broadside result files
cmd/…/README.mdExplains how to read and compare Broadside result files
cmd/…/loadtest.goDefines the cluster load-test command and its operator checks
pkg/…/load-test.goShows submission, event watching, timeout, and cancellation behavior
pkg/…/watch.goDefines the job state view produced from cluster events

For the wider service map, see Operational services and tools. For command-line workflows, see Armadactl and CLI workflows. For deployment and configuration context, see Deployment and configuration.