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 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
    • Migrating load testing results from OverLoad
    • 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 load testing from GitLab CI
    • Comparing load test results
    • Deploying GitLab Runner on a Compute Cloud virtual machine

In this article:

  • Getting started
  • Required paid resources
  • Prepare the infrastructure
  • Create a service account
  • Configure a network
  • Configure the security group.
  • Create test agents
  • Run a 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 7, 2025
  • Getting started
    • Required paid resources
  • Prepare the infrastructure
    • Create a service account
    • Configure a network
    • Configure the security group.
  • Create test agents
  • Run a test
  • View the testing results
  • How to delete the resources you created

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

Load testing using multiple agents is used when:

  • The testing target includes multiple instances, and the total inbound and outgoing traffic from them does not exceed the capacity of one agent.
  • The requests sent to the testing target require large computing capacity.
  • Using a testing target is much more effective than a load generator.

Agents start and apply the load on the testing target synchronously. The testing results are available as generalized and independent reports on each agent.

To run the load testing using multiple agents:

  1. Prepare your cloud.
  2. Prepare your infrastructure.
  3. Create a test agent.
  4. Run a test.
  5. View the testing results.

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

Getting 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 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.

Prepare the infrastructure

Create a service account

  1. Create a service account named sa-loadtest in the folder where you are going to place agents.
  2. Assign the service account the loadtesting.generatorClient role.

Configure a 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 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 apply the load on the testing 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, the load will be applied to an external service named example.myservice.ru. 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 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 your agent.

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

    3. In the Agents tab, click Create agent.

    4. Give your agent a name, e.g., agent-008.

    5. Select an availability zone to place the agent in.

    6. Under Agent:

      • Select the appropriate agent type.
      • Specify the subnet to place the agent in. Make sure you created and set up a NAT gateway in the subnet.
      • If security groups are available to you, select a security group preset for the agent.
    7. Under Access, specify the information required to access the agent:

      • Select the sa-loadtest service account.

      • Enter the username in the Login field.

        Alert

        Do not use root or other names reserved by the operating system. To perform operations that require superuser permissions, use the sudo command.

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

    8. Click Create.

    9. Wait for the VM instance to be created. Make sure the agent status changes 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 access to loadtesting.api.cloud.yandex.net:443 and is assigned a public IP address.
      • A NAT gateway is set up in the target subnet.
      • The service account assigned to the agent has the required roles.
  3. 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 a 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 the agent-008 agent.

      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: Set to 80 (default port for the HTTP protocol).
      • Testing threads: 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. You can learn more about testing pipelines here.

      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 marked with the index and get_test tags. The load generator will repeat them within a given 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 each connection is terminated after making a request. This mode is heavier on the tested service and load generator. If you do not need to close connections, set Keep-Alive.

      • Under Forced test termination time, specify the time to autostop the test unless it is stopped for other reasons. The parameter value should be slightly greater than the expected duration of the test.

  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 the agent-009 agent.

    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 means a test will be stopped if 90% of testing threads are used 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 readable.
  8. Click Create.

Once you are done, the configurations will be verified and the agents will start loading the application being tested. You can view the report on the Tests tab.

View 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 with multiple agents have the Multi label.
  4. To view generalized results, go to the Test results tab.
  5. To view the test results for each agent individually:
    1. Go to Overview.
    2. Select an appropriate agent under Tests.
    3. Go to Test results.

How 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
Migrating load testing results from OverLoad
Yandex project
© 2025 Yandex.Cloud LLC