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
    • Cloud credits to scale your IT product
    • Gateway to Russia
    • Cloud for Startups
    • Education and Science
    • Yandex Cloud Partner program
  • Blog
  • Pricing
  • Documentation
© 2025 Direct Cursus Technology L.L.C.
Yandex Load Testing
  • Getting started
    • All guides
    • Creating a test agent
    • Configuring test agent security groups
    • Configuring test target security groups
    • Creating a test with data from a bucket
    • Exporting test reports
    • Collecting user requests using Dispatcher
    • Creating and configuring a regression dashboard
    • Checking regression metrics for exceeded thresholds
    • Saving test artifacts to Object Storage
    • Viewing operations with resources
  • Access management
  • Pricing policy
  • Terraform reference
  • Audit Trails events
  • Release notes

In this article:

  • Getting started
  • Collecting requests
  1. Step-by-step guides
  2. Collecting user requests using Dispatcher

Preparing test data using the dispatcher tool

Written by
Yandex Cloud
Updated at January 20, 2025
  • Getting started
  • Collecting requests

dispatcher is designed for collecting user requests and saving them to data files which are used for subsequent load testing.

This tool works as a proxy: it redirects HTTP requests to the target server and returns the server's responses back to the client. If a proxied request completes successfully with a 2xx HTTP status code, it is saved to data files which are then used for load testing. dispatcher allows configuring rules and amount of data to save using special flags.

Getting startedGetting started

  1. Install Go 1.22 or higher:

    wget https://go.dev/dl/go1.22.2.linux-amd64.tar.gz
    tar -C /usr/local -xzf go1.22.2.linux-amd64.tar.gz
    export PATH=$PATH:/usr/local/go/bin
    
  2. Install Git using the following command:

    sudo apt install git
    

Collecting requestsCollecting requests

  1. Clone the GitHub repository and go to the yc-load-testing-dispatcher folder:

    git clone https://github.com/yandex-cloud-examples/yc-load-testing-dispatcher.git
    cd yc-load-testing-dispatcher
    
  2. Run dispatcher with the relevant flags:

    go run dispatcher.go -target '<target_address>' -port <port> -ssl -noproxy -saveall -nostatic
    

    Where:

    • target: Address of the service for which requests are proxied and saved.
    • port: Port used to run the server. The default port is 8888.
    • ssl: Enables proxying requests via a secure HTTPS connection.
    • noproxy: Determines whether to save requests without proxying them.
    • saveall: Allows saving all requests regardless of the HTTP status code of the response to the proxied request.
    • nostatic: Allows disregarding saving requests for static content, such as CSS, JS, JPEG, JPG, PNG, GIF, ICO, SVG, WOFF, and WOFF2.

    Example of running:

    go run dispatcher.go -target 'yandex.ru' -port 8080 -nostatic
    

    Result:

    Dispatcher listens to your requests
    

    After running, send all requests for load testing to localhost:8080. You can also open the localhost:8080 page in your browser to load the website specified in the target flag.

    All requests are written in series immediately after receiving the response. Therefore, the order of requests running in parallel may differ from the one in the final file.

    Result:

    The payload is written to a raw.payload file
    The payload is written to a httpjson.payload file
    The payload is written to a uri.payload file
    The payload is written to a uripost.payload file
    

    After completing all the requests you need, press Ctrl + C to close dispatcher.

    Warning

    You should avoid closing it before you get all the responses, as the test data may not be written yet.

    Requests are saved to the following files:

    • uri.payload for URI requests
    • uripost.payload for URIPOST requests
    • raw.payload for RAW requests
    • httpjson.payload for HTTP_JSON requests

Was the article helpful?

Previous
Exporting test reports
Next
Creating and configuring a regression dashboard
© 2025 Direct Cursus Technology L.L.C.