Yandex Cloud
Search
Contact UsGet started
  • Blog
  • Pricing
  • Documentation
  • All Services
  • System Status
    • Featured
    • Infrastructure & Network
    • Data Platform
    • Containers
    • Developer tools
    • Serverless
    • Security
    • Monitoring & Resources
    • ML & AI
    • Business tools
  • All Solutions
    • By industry
    • By use case
    • Economics and Pricing
    • Security
    • Technical Support
    • Customer Stories
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
  • Blog
  • Pricing
  • Documentation
Yandex project
© 2025 Yandex.Cloud LLC
Tutorials
    • All tutorials
    • Enabling a blue-green and canary deployment of the web service versions
    • Automating image builds using Jenkins and Packer
    • Continuous deployment of containerized applications using GitLab
    • App testing with GitLab
    • Creating test VMs using GitLab CI
    • GitLab integration with Tracker
    • High-performance computing on preemptible VMs
    • Load testing a gRPC service
    • Fixed-load HTTPS testing with Phantom
    • Step-load HTTPS testing with Pandora
    • Scripted HTTP load testing with Pandora
    • Load testing using multiple agents
    • Running external agents for load testing
    • JMeter load testing
    • Getting statistics on queries to Object Storage objects using Query
    • Getting the number of queries to Object Storage objects
    • Invoking a load test from GitLab CI
    • Deploying GitLab Runner on a Compute Cloud virtual machine
    • Comparing load test results

In this article:

  • Getting started
  • Required paid resources
  • Set up your infrastructure
  • Create a service account
  • Configure your network
  • Configure the security group
  • Create test agents
  • Run the test
  • View the testing results
  • How to delete the resources you created
  1. Development and testing
  2. Load testing using multiple agents

Load testing using multiple agents

Written by
Yandex Cloud
Updated at May 26, 2025
  • Getting started
    • Required paid resources
  • Set up your infrastructure
    • Create a service account
    • Configure your network
    • Configure the security group
  • Create test agents
  • Run the test
  • View the testing results
  • How to delete the resources you created

You can use Load Testing to test your service with multiple agents.

You can use multiple agents for load testing when:

  • The test target includes multiple instances, and the total incoming and outgoing traffic from them does not exceed the capacity of one agent.
  • Requests to the test target require significant computing capacity.
  • Using a test target is much more effective than a load generator.

Agents launch and load the test target synchronously. Test results are available as cumulative and independent reports on each agent.

To run a load test using multiple agents:

  1. Get your cloud ready.
  2. Set up your infrastructure.
  3. Create a test agent.
  4. Run the test.
  5. View the testing results.

If you no longer need the resources you created, delete them.

Getting startedGetting started

Sign up in Yandex Cloud and create a billing account:

  1. Navigate to the management console and log in to Yandex Cloud or register a new account.
  2. On the Yandex Cloud Billing page, make sure you have a billing account linked and it has the ACTIVE or TRIAL_ACTIVE status. If you do not have a billing account, create one and link a cloud to it.

If you have an active billing account, you can navigate to the cloud page to create or select a folder for your infrastructure to operate in.

Learn more about clouds and folders.

Required paid resourcesRequired paid resources

If the agent is hosted on Yandex Cloud, you pay for computing resources (see Yandex Compute Cloud pricing).

At the Preview stage, Load Testing is free of charge.

Set up your infrastructureSet up your infrastructure

Create a service accountCreate a service account

  1. Create a service account named sa-loadtest in the folder where the agents will reside.
  2. Assign the loadtesting.generatorClient role to the service account.

Configure your networkConfigure your network

Set up a NAT gateway in the subnet to host the agents. This will allow the agents to access Load Testing.

Configure the security groupConfigure the security group

  1. For the agents, create a security group named agent-sg.
  2. Add rules:
    • Rule for outgoing HTTPS traffic to the Load Testing public API:

      • Port range: 443
      • Protocol: TCP
      • Destination name: CIDR
      • CIDR blocks: 0.0.0.0/0

      This will allow you to connect the agent to Load Testing and manage the tests using the interface and get the test results.

    • Rule for outgoing HTTP traffic when generating load to the test target:

      • Port range: 80
      • Protocol: TCP
      • Destination name: CIDR
      • CIDR blocks: 0.0.0.0/0

      This enables the agents to load the test target.

    • Rules for incoming SSH traffic:

      • Port range: 22
      • Protocol: TCP
      • Destination name: CIDR
      • CIDR blocks: 0.0.0.0/0

      This will allow you to connect to the agent over SSH and manage tests from the console or collect debugging information.

In this example, an external service named example.myservice.ru will be loaded. For more information about setting up security groups for testing the services running inside the cloud, see:

  • Configuring test agent security groups.
  • Configuring test target security groups.

Create test agentsCreate test agents

  1. If you do not have an SSH key pair yet, create one.

  2. Create the first agent:

    Management console
    1. In the management console, select the folder where you want to create the agent.

    2. In the list of services, select Load Testing.

    3. In the Agents tab, click Create agent.

    4. Enter a name for the agent, e.g., agent-008.

    5. Select an availability zone to host the agent.

    6. Under Agent:

      • Select the appropriate agent type.
      • Specify the subnet to host the agent. Make sure you created and set up a NAT gateway in the subnet.
      • If you can use security groups, select a preset agent security group.
    7. Under Access, specify the agent access credentials:

      • Select the sa-loadtest service account.

      • Under Login, enter the username.

        Alert

        Do not use root or other reserved usernames. To perform operations requiring root privileges, use the sudo command.

      • In the SSH key field, paste the contents of the public key file.

    8. Click Create.

    9. Wait until the VM instance is created. Make sure the agent status has changed to Ready for test.

      Note

      The agent creation process may stop at the Initializing connection status unless the following conditions are met:

      • The agent has a public IP address and access to loadtesting.api.cloud.yandex.net:443.
      • A NAT gateway is set up in the target subnet.
      • The service account assigned to the agent has the required roles.
  3. Follow the same steps to create the second agent named agent-009.

If you need to connect to the agents over SSH, assign to them a public IP address.

Run the testRun the test

Management console
  1. In the management console, select Load Testing.
  2. In the left-hand panel, select Tests.
  3. Click Create test.
  4. Under Configuration 1, specify the test parameters for the first agent:
    1. Agents: Select agent-008.

      In this example, the agents will have different test configurations. To use the same configuration, in the Agents field, select all the agents you need to use.

    2. Under Test settings:

      • Configuration method: Select Form.
      • Load generator: Select Pandora.
      • Target address: Enter the address of the service to test, example.myservice.ru.
      • Target port: Enter 80 (default port for the HTTP protocol).
      • Testing threads: Enter 1000.

      This means that the load generator can simultaneously process 1,000 operations: either create 1,000 connections or wait for 1,000 responses from the service at the same time. Learn more about testing threads.

      Warning

      Make sure the agent has access to example.myservice.ru:80.

      • In the Load type menu:

        • Select the RPS type.
        • Add a Load profile:
          • Profile 1: line
          • From: 1
          • To: 100
          • Duration: 60s
        • Add another Load profile:
          • Profile 2: const
          • Responses per second: 100
          • Duration: 300s

        This instructs the load generator to increase the load from 1 to 100 requests per second for the first 60 seconds, and then maintain a load of 100 requests per second for 5 minutes. Learn more about the load profile.

      • Request type: Specify URI as the type.

      • In the Attached files field, select Form. In the menu that opens:

        • In the Requests menu, add the following requests:
          • / index
          • /test?param1=1&param2=2 get_test

        The requests are tagged index and get_test. The load generator will repeat them alternately within the specified load profile.

      • In the Request headers menu, specify the following headers:

        • [Host: example.myservice.ru]

        • [Connection: Close]

          Please note that the Connection: Close header means that each connection will be closed following the request. This mode is heavier on the tested service and load generator. If you do not want the connections closed, set Keep-Alive.

      • Under Forced test termination time, specify the time after which the test will autostop, unless it is stopped for other reasons. Set it to be slightly greater than the expected test duration.

  5. Click Duplicate configuration. The test parameters will be copied to the Configuration 2 settings.
  6. Under Configuration 2, specify the test parameters for the second agent:
    1. Agents: Select agent-009.

    2. Under Test settings, change the test parameters.

      For example, in the Autostop menu, click Autostop and enter the following description:

      • Autostop type: INSTANCES
      • Limit: 90%
      • Window duration: 60s

      This criterion will stop the test if over 90% of the testing threads are busy for 60 seconds, which indicates a testing issue.

  7. Under Test information, specify the name, description, and number of the test version. This will make the reports easier to read.
  8. Click Create.

The configurations will be checked, and the agents will start loading the service. You can check the report on the Tests tab.

View the testing resultsView the testing results

Management console
  1. In the management console, select Load Testing.
  2. In the left-hand panel, go to the Tests tab.
  3. Select the test that you created earlier. Tests using multiple agents have the Multi label.
  4. To view cumulative results, go to the Test results tab.
  5. To view the test results for each agent individually:
    1. Navigate to the Overview tab.
    2. Select the agent under Tests.
    3. Navigate to the Test results tab.

How to delete the resources you createdHow to delete the resources you created

To stop paying for the resources you created, delete the testing agents.

Was the article helpful?

Previous
Scripted HTTP load testing with Pandora
Next
Running external agents for load testing
Yandex project
© 2025 Yandex.Cloud LLC