Access log replay for load testing? Jmeter Pitfalls and Competitors

后端 未结 3 1326
旧时难觅i
旧时难觅i 2021-02-04 07:39

Context

We wish to use \"replay\" web server access logs to generate load tests. JMeter had come to mind as I\'d recently read blog posts about using jm

相关标签:
3条回答
  • 2021-02-04 08:14

    I will describe how do we solve this problem using our own LT tool called Yandex Tank It can handle simple access.log but only 'GET' requests, too. When there's a need to make other types of requests, we use other ammo formats (ammo is a file containing all the requests that we gonna send to our server). Example:

    342
    POST / HTTP/1.1^M
    Host: xxx.xxx.xxx.xxx:8080^M
    Connection: keep-alive^M
    Keep-Alive: 300^M
    Content-Type: multipart/form-data; boundary=AGHTUNG^M
    Content-Length: 1400^M
    Connection: Close^M
    ^M
    --AGHTUNG^M
    Content-Disposition: form-data; name="fp"; filename="fp_tank"^M
    Content-Type: application/octet-stream^M
    Content-Transfer-Encoding: binary^M
    ...
    --AGHTUNG--^M
    

    A number ('342') on the first line is the size of a following request. Request is in it's raw format. You could write a simple script in your favourite language that generates such ammo files from your access.log and then use it for load testing.

    Such ammo format makes it really flexible. For example, this code generates ammo from FCGI logs (POST bodies are encoded in Base64). But on the other hand you will need to handle sessions manually.

    0 讨论(0)
  • 2021-02-04 08:22

    JMeter + HTTP Raw Request + Raw Data Source for me works well

    0 讨论(0)
  • 2021-02-04 08:27

    You can easily replay access logs with POST data using ZebraTester. It has many plugins similar to JMeter and also ability to add inline scripts using which you can easily target POST payload, URLs, timestamps, etc. from the access logs. You can run load tests directly from the tool locally or copy the recorded script to the SaaS portal to run massive million virtual user load tests

    0 讨论(0)
提交回复
热议问题