A tool for load testing web services and applications

We will use Yandex.Tank. For this, we have created a template in VMware Cloud Director – Yandex Tank. It is a simple and easy to set up tool for load testing and performance analysis of web services and applications which can generate tens and hundreds of thousands of HTTP (HTTPS) requests per second using GET and POST methods.

For using it, you should do the following:

  1. Deploy a virtual machine using the "Yandex Tank" template from the VMware Cloud Director public directory. This is described in the article from our knowledge base. Select the template called "Yandex Tank". By default the template uses 2 CPUs, 1 GB RAM and 15 GB of disk capacity, on the Ubuntu Server04 OS. The network card of the virtual machine is in "Ip pool" mode, to get the address from the allocated network address pool.

Before starting the test you need to edit the configuration file, which is located at /opt/yandex_tank/load.yml. Open it with a suitable text editor, for example nano /opt/yandex_tank/load.yml. Here is the configuration file, with comments after the # symbol in the items that interest us:

overload:
  enabled: false # включить (true) отправку на яндекс сервис, для отображения отчета в графиках
  package: yandextank.plugins.DataUploader
  token_file: "/opt/yandex_tank/token.txt" # расположение файла с токеном от яндекс
phantom:
  address: exemple.com:443 # [адрес цели]:[порт цели]
  header_http: "1.1"
  ssl: false # включаем (true) если тестируем сайт с ssl защитой по https
  headers: # задаем эти параметры если тестируем сайт с ssl защитой по https
   - "[User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.45 Safari/537.36]"
   - Host:exemple.com
   - Connection:close
  uris: # перечисляем страницы которые необходимо тестировать
   - /
  load_profile:
   load_type: rps # указываем метод тестирования, rps - по количеству запросов в секунду
   schedule: line(1, 50, 30s) # начиная с одного обращения в секунду линейно увеличивая до 50 обращений в секунду в течение 1 минуты. Параметры теста можно изменять.
console:
   enabled: true # включить вывод процесса тестирования в консоль
telegraf:
   enabled: false

After editing the configuration file, start the application by specifying this file:

   yandex-tank -c /opt/yandex_tank/load.yml.

If the config file is configured correctly we will see the test result in the console, in the end of which we can understand how our web service (application, site) copes with the load.

Here is what you should pay attention to in the report:

Here are three main fields that we should pay attention to:

 

  1. Here is a brief summary of the test results: count is the total number of requests for the test (in our case 6911), net_e is network state errors (in our example there aren’t any), http_e - http state errors (also 0), avg ms - the average time spent on processing the request (4.1 ms).
  2. In the second field, we see a detailed report on network status codes and requests via http protocol. In our case, we see that 100% of http requests returned code 200 - successful request. There are no network status errors, which is also good.
  3. This table shows that 100% of requests is less than 31 ms, of which for example 50% less than 3.3 ms.

Our test showed very good results with 50 requests linearly increasing to 500 within 30 seconds. You have to understand that an increase in the number of requests will lead to an increase in processing time because the service not having time to process all the requests will create queues in which they will be delayed, and sometimes even drop out by timeout, in this case we will see in the net codes code 110.

 

Have you tried Virtual cloud servers by Cloud4Y? Not yet? 

Leave a request and get a 10-day free trial. 

 

Смотреть подробности   

 

  • 37 Users Found This Useful
Was this answer helpful?

Related Articles

Performance of enterprise web applications in Docker containers on VMware vSphere 6.5

Docker containers are becoming more and more popular as a deployment platform for enterprise...

Powered by WHMCompleteSolution