Harness-Managed Infrastructure
Run load tests on Kubernetes infrastructure that Harness provisions and manages, without installing an agent or connecting your own cluster
Harness-managed infrastructure runs your load test on Kubernetes infrastructure that Harness provisions, operates, and cleans up for you. You do not install a chaos agent, connect a cluster, or onboard a service before your first run. Select the option when you create a load test, then click Run.
What you will learn from this topic
When to use it: How Harness-managed infrastructure compares with self-hosted infrastructure.
How to use it: Create and run a load test on Harness-managed infrastructure.
What to expect: How Harness prepares the infrastructure, what it creates in your project, and when it cleans up.
Limits: The quotas that apply to Harness-managed runs and what to do when a run reaches one.
Before you begin
Load Testing enabled: Load Testing is behind a feature flag (
CHAOS_LOAD_TESTING_ENABLED). Go to Get started with Load Testing to create your first load test.Harness-managed infrastructure enabled: The option appears in the Load Test Studio only when it is enabled for your account.
Reachable target: An application endpoint that accepts traffic from a Harness-hosted Kubernetes cluster.
Choose between managed and self-hosted infrastructure
Every load test runs on one of two kinds of infrastructure. You select the kind on the Overview tab of the Load Test Studio, under Execution Environment > Infrastructure.
Harness-managed infrastructure
Harness provisions and manages Kubernetes infrastructure for your project.
Nothing. Harness prepares the infrastructure on the first run.
Getting started quickly, and testing endpoints that are reachable from outside your network.
Self-hosted infrastructure
You connect a Kubernetes cluster or Linux VM to Harness through a chaos agent.
A chaos infrastructure, an environment, and an onboarded service.
Testing private endpoints, running on Linux VMs, and controlling where the load comes from.
Harness-managed infrastructure always runs on Kubernetes, so the Python, JavaScript, and Java engines are all available. Go to Load testing key concepts to compare the Kubernetes and Linux VM target types for self-hosted infrastructure.
Create a load test on Harness-managed infrastructure
Harness-managed infrastructure is the default for a new load test when it is enabled for your account. The following steps create a test and run it.
Select Harness-managed infrastructure
On the Overview tab, enter a Name for the test. Under Execution Environment, select the Harness-managed infrastructure card if it is not already selected.

When Harness-managed infrastructure is selected, the Studio hides the Target Type, Load Test Infrastructure, and Services fields. Harness chooses the infrastructure, and the test does not need an onboarded service.
Select an engine and configure the test
Select a Load Test Engine, then click Next. On the Test Configuration tab, define the workload and the Load Configuration exactly as you would for self-hosted infrastructure. Keep the Users, Duration, and Worker Count within the limits for Harness-managed runs.
Go to Create a Load Test to configure the Python, JavaScript, or Java engine.
Watch Harness prepare the infrastructure
Before the load starts, the run page shows a Preparing infrastructure panel in place of the charts. A progress ring shows how far preparation has gone, and the panel moves through three steps:
Connecting execution agent: Harness connects the execution agent that runs load tests for your account.
Preparing project environment: Harness creates the environment and infrastructure that your project uses for load tests.
Ready to run: The infrastructure is ready. The load test starts automatically.

How long preparation takes depends on whether your project already has infrastructure that is ready:
First run, or first run after 24 hours without use: Preparation takes a few minutes, because Harness sets up the infrastructure for your project.
Later runs: The infrastructure is already ready, so the load test starts almost immediately.
If you click Stop while Harness prepares the infrastructure, the run moves to Stopped. Harness does not tear down the infrastructure, so the next run can use it.
Review the run
When preparation finishes, the panel is replaced by the run metrics. The Load Test Infrastructure field shows Harness Chaos Sandbox, the infrastructure that Harness manages for your project.

From here, the run behaves like any other load test. Go to Analyze Load Test Results to read the metrics, endpoint statistics, and threshold outcomes.
When a run fails during preparation, the panel title changes to Infrastructure preparation failed and the page shows the error code and message at the top. Go to Troubleshooting to resolve the error.
What Harness creates in your project
On the first run in a project, Harness creates the resources it needs in that project. Each resource uses the identifier harness_chaos_sandbox:
Environment: An environment named Harness Chaos Sandbox.
Kubernetes connector: The connector that points at the Harness-hosted cluster.
Infrastructure definition: The infrastructure definition in that environment.
Chaos infrastructure: The infrastructure that load tests run on.

Harness owns these resources. You cannot modify or delete the chaos infrastructure; Harness rejects the change with the message this infrastructure is managed by Harness and cannot be modified or deleted. Do not edit or delete the environment, connector, or infrastructure definition either, because Harness-managed runs in the project depend on them.
The Harness Chaos Sandbox environment does not appear in the environment pickers for chaos experiments. It exists only to run load tests.
Idle cleanup
When no load test uses the project's Harness-managed infrastructure for 24 hours, Harness tears the infrastructure down. The Harness Chaos Sandbox environment stays in your project. The next run prepares the infrastructure again, which takes a few minutes.
Limits
Harness applies the following limits to Harness-managed infrastructure. When a run reaches a limit, Harness does not start it. The run fails with the error code E2019: MANAGED_INFRA_LIMIT_REACHED and a message that names the limit.
Virtual users per run
5,000
Lower Users, then run the test again.
Run duration
10,000 seconds
Shorten Duration, then run the test again.
Workers per run
20
Lower Worker Count, then run the test again.
Concurrent runs per project
5
Wait for a run in the project to finish, or stop one.
Concurrent runs per account
20
Wait for a run in the account to finish, or stop one.
Total workers across an account's active runs
100
Wait for a run to finish, or use fewer workers.
Projects per account
10
Each project that has Harness-managed infrastructure counts toward this limit. A project stops counting after idle cleanup tears down its infrastructure.
Infrastructure preparation timeout
900 seconds
A run that is still preparing after 15 minutes fails with E2021. Run the test again.
Idle cleanup
24 hours
Not a quota. Harness tears down unused infrastructure after this time.
Harness also caps overall capacity for Harness-managed infrastructure: up to 50 accounts can use it, and each Harness-hosted cluster serves up to 200 projects. When no cluster has room for your project, the run fails with E2017.
Limitations
The following scenarios are not supported on Harness-managed infrastructure.
Troubleshooting
Next steps
You can now run load tests without connecting infrastructure of your own.
Create a Load Test: Configure the Python, JavaScript, or Java engine for your workload.
Run in a Pipeline: Run a load test as a step in a Harness pipeline.
Analyze Load Test Results: Interpret the metrics and threshold outcomes of a run.
Last updated
Was this helpful?
