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
GetJobsandGetJobGroupspatterns. 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.
| Area | Main observations | Operational use |
|---|---|---|
| Ingestion | Batch counts, failed batches, processed query count, backlog size, backlog wait time, and batch latency | Shows whether the test runner or database can keep up with writes |
| Queries | Counts and failures by query type and filter pattern, plus average, P50, P95, P99, and maximum latency | Shows user-query cost and tail latency for different Lookout views |
| Bulk actions | Reprioritisation and cancellation counts, affected jobs, action latency percentiles, and errors | Shows 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:
| Question | Tool |
|---|---|
| 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
LogLinecontract. - 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-testersuccess checks aligned with the event states treated as terminal byWatchContext.
Important failure modes
| Trigger | Consequence | Guard |
|---|---|---|
| A job pod is cleaned up before a Binoculars log request | The request returns not found instead of logs | Request logs before pod cleanup or use the job event and cluster records to locate the failure |
A caller lacks CordonNodes permission | The node remains schedulable and the action returns permission denied | Check the caller's permission mapping before using the control path |
| Broadside uses the in-memory backend for a performance claim | Results describe the test framework rather than production database behavior | Use a dedicated production-like database for benchmarks |
| Broadside backlog reaches its configured limit | The runner can block, drop work, or report an error based on the configured strategy | Compare backlog percentiles and peak size with the limit |
| A Broadside result changes without a matching schema update | Consumers can reject valid results or accept the wrong shape | Regenerate and validate schema.json after output changes |
| The load tester times out while jobs remain active | The run cancels remaining jobs and success checks fail | Set a timeout that covers expected cluster completion time |
| Event transport closes during a watch | State may stop advancing until the watcher reconnects; a long outage can leave the run incomplete | Review watcher errors and the final state summary |
Key files
| File | Why to read it |
|---|---|
| pkg/…/binoculars.proto | Defines the Binoculars log and node-cordon contract |
| internal/…/server.go | Shows how Binoculars connects auth, Kubernetes access, and its API server |
| internal/…/logs.go | Defines the log observation limits and not-found behavior |
| internal/…/cordon.go | Defines the permission boundary and node state change |
| cmd/…/main.go | Shows Broadside configuration, result, cleanup, and interrupt flow |
| internal/…/runner.go | Shows the lifecycle that joins workload actors and reports |
| internal/…/output.go | Defines the saved result contract and metric groups |
| internal/…/generate_schema.go | Defines the source used to generate the Broadside result schema |
| internal/…/schema.json | Provides the checked-in validation shape for Broadside result files |
| cmd/…/README.md | Explains how to read and compare Broadside result files |
| cmd/…/loadtest.go | Defines the cluster load-test command and its operator checks |
| pkg/…/load-test.go | Shows submission, event watching, timeout, and cancellation behavior |
| pkg/…/watch.go | Defines 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.