Load testing - decreased number of concurrent users and low session times

167 Views Asked by At

I use tsung to do a load test. I recorded browser behavior with tsung recorder. I did not add anything to the xml file I saved with tsung-recorder.

XML:

    <session name='rec20200313-1147' probability='100'  type='ts_http'>
    <request><http url='https://www.example.com/' version='1.1' method='GET'>
    <http_header name='Accept' value='text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' />
    <http_header name='Accept-Encoding' value='gzip, deflate' />
    <http_header name='Accept-Language' value='en-US,en;q=0.5' /></http></request>

    <thinktime random='true' value='10'/>

    <request><http url='https://www.example.com/arama?aranan=example' version='1.1' method='GET'>
    <http_header name='Accept' value='text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' />
   <http_header name='Accept-Encoding' value='gzip, deflate' />
   <http_header name='Accept-Language' value='en-US,en;q=0.5' /></http></request>

   <thinktime random='true' value='17'/>

   <request>  <http url='/arama?search=loadtest&amp;siralama=1' version='1.1' method='GET'>
  <http_header name='Accept' value='text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' />
   <http_header name='Accept-Encoding' value='gzip, deflate' />
   <http_header name='Accept-Language' value='en-US,en;q=0.5' /></http></request>
   </session>

When I tried to do this test with 300 bots, the number of users was not more than 200,000. Also this number suddenly began to decrease

Example:

  • I started testing.
  • 20,000 (In 10 seconds)
  • 80,000 (Withing 40 seconds)
  • 170,000 ( 1 min)
  • 50,000 (over a minute)
  • 70,000
  • 100,000
  • 60,000
  • Test finished

I have tried many different scenarios.But I aimed to increase up to 1 million users. That's all I've observed on my side

Administrators who owners the application which I tested said:

  • There is no blocking.
  • Your session duration does not take more than 5 seconds.

The test is over. Afterwards, when logs were checked, they said that i got TCP RST response

I try to understand where the error is about this issue.

What did I do missing in tsung-recorder ? How can I emulate a real browser with tsung-recorder. Why did I get a TCP RST response? Is tsung a suitable tool for what i want to do. What's wrong.

Note: I was not successful when I wanted to make an http get attack.

1

There are 1 best solutions below

0
On

TCP Reset occurs when unexpected TCP packet arrives to the host.

One of the possible reasons is that the machine you're using as the load generator becomes overloaded so make sure to setup monitoring in order to check whether Tsung has enough headroom to operate in terms of CPU, RAM, Network and Disk IO.

If it happens that the machine where Tsung is running is overloaded - you will need to add more hosts and run Tsung in clustered mode

With regards to real browser simulation you might need to setup/maintain an unique session per virtual user, in the majority of cases it is being implemented via Cookies. Check out How to make JMeter behave more like a real browser article for general recommendations, all of them can be translated into Tsung.