Asynchronous Http Requests Submission

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Asynchronous Http Requests Submission

Nayak, Soumya R.
Hi All,

My requirement is concurrently 5 users need to submit http requests every 2 seconds asynchronously. So is it possible from JMeter?
If possible how can we capture the response times of the asynchronous requests submitted?

Regards,
Ranjan

******************************************************************************************
This message may contain confidential or proprietary information intended only for the use of the
addressee(s) named above or may contain information that is legally privileged. If you are
not the intended addressee, or the person responsible for delivering it to the intended addressee,
you are hereby notified that reading, disseminating, distributing or copying this message is strictly
prohibited. If you have received this message by mistake, please immediately notify us by
replying to the message and delete the original message and any copies immediately thereafter.

If you received this email as a commercial message and would like to opt out of future commercial
messages, please let us know and we will remove you from our distribution list.

Thank you.~
******************************************************************************************
FAFLD
Reply | Threaded
Open this post in threaded view
|

Re: Asynchronous Http Requests Submission

shettyd
Hi
it depends on what your intent is. In general a JMeter (HTTP) sampler will
wait for the response so it isnt asynchronous - However you can always use
something like a Java Sampler / JSR Sampler so that you can write java code
that can make the asynchronous request
Unless the asynchronous system that you are making the request too has a
way to let you know that its done , you cant capture the response time.

In some cases however people misunderstand the nature of what they are
trying to accomplish with what JMeter does and simpler solutions are
possible (e.g. AJAX requests that a browser may make are asynchronous from
the browsers perspective but not really from a HTTP perspective)

This has a pretty good description
https://www.blazemeter.com/blog/how-to-load-test-async-requests-with-jmeter

Since you havent provided details , its hard to say what might work for you

regards
deepak


On Thu, Nov 8, 2018 at 10:08 AM Nayak, Soumya R. <[hidden email]> wrote:

> Hi All,
>
> My requirement is concurrently 5 users need to submit http requests every
> 2 seconds asynchronously. So is it possible from JMeter?
> If possible how can we capture the response times of the asynchronous
> requests submitted?
>
> Regards,
> Ranjan
>
>
> ******************************************************************************************
> This message may contain confidential or proprietary information intended
> only for the use of the
> addressee(s) named above or may contain information that is legally
> privileged. If you are
> not the intended addressee, or the person responsible for delivering it to
> the intended addressee,
> you are hereby notified that reading, disseminating, distributing or
> copying this message is strictly
> prohibited. If you have received this message by mistake, please
> immediately notify us by
> replying to the message and delete the original message and any copies
> immediately thereafter.
>
> If you received this email as a commercial message and would like to opt
> out of future commercial
> messages, please let us know and we will remove you from our distribution
> list.
>
> Thank you.~
>
> ******************************************************************************************
> FAFLD
>
Reply | Threaded
Open this post in threaded view
|

Asynchronous Http Requests Submission

Nayak, Soumya R.
Hi Deepak,

The requirement is - performance of a server has to be tested when continuous http requests are coming. It is like 1 user has to submit 30 requests per minute. So we have to test with 5 concurrent users which they will submit total of 150 requests per minute (5 concurrent http requests every 2 seconds). So now what was happening after doing a sample run the average response time of each of the request is around of 8 seconds.
As JMeter waits for the response to come back and then trigger another request, so instead of completing the test in one minute , its taking 4 minutes.
So we thought of submitting 5 http requests every 2 seconds asynchronously. So that is where I was checking the possibility. If any sample code or script we can get will be great.
Based on the above also we were checking if we can capture the response time of the asynchronous requests.

Regards,
Ranjan

-----Original Message-----
From: Deepak Shetty <[hidden email]>
Sent: Friday, November 9, 2018 8:01 AM
To: JMeter Users List <[hidden email]>
Subject: Re: Asynchronous Http Requests Submission

Hi
it depends on what your intent is. In general a JMeter (HTTP) sampler will wait for the response so it isnt asynchronous - However you can always use something like a Java Sampler / JSR Sampler so that you can write java code that can make the asynchronous request Unless the asynchronous system that you are making the request too has a way to let you know that its done , you cant capture the response time.

In some cases however people misunderstand the nature of what they are trying to accomplish with what JMeter does and simpler solutions are possible (e.g. AJAX requests that a browser may make are asynchronous from the browsers perspective but not really from a HTTP perspective)

This has a pretty good description
https://www.blazemeter.com/blog/how-to-load-test-async-requests-with-jmeter

Since you havent provided details , its hard to say what might work for you

regards
deepak


On Thu, Nov 8, 2018 at 10:08 AM Nayak, Soumya R. <[hidden email]> wrote:

> Hi All,
>
> My requirement is concurrently 5 users need to submit http requests
> every
> 2 seconds asynchronously. So is it possible from JMeter?
> If possible how can we capture the response times of the asynchronous
> requests submitted?
>
> Regards,
> Ranjan
>
>
> **********************************************************************
> ******************** This message may contain confidential or
> proprietary information intended only for the use of the
> addressee(s) named above or may contain information that is legally
> privileged. If you are not the intended addressee, or the person
> responsible for delivering it to the intended addressee, you are
> hereby notified that reading, disseminating, distributing or copying
> this message is strictly prohibited. If you have received this message
> by mistake, please immediately notify us by replying to the message
> and delete the original message and any copies immediately thereafter.
>
> If you received this email as a commercial message and would like to
> opt out of future commercial messages, please let us know and we will
> remove you from our distribution list.
>
> Thank you.~
>
> **********************************************************************
> ********************
> FAFLD
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Asynchronous Http Requests Submission

shettyd
Hi

what you are describing is completely different. When you say a User has to
submit 30 requests per minute then it implies that either user is
submitting requests in parallel OR each request < 2 seconds. If your system
doesnt respond in 2 seconds then there is a problem right there (in your
case ~ 8 seconds) - its questionable what value you are getting by trying
to force the system to send the requests rather than first fixing the
response time of your system

Sometimes however you are trying to model the system receiving 150 requests
per minute - For this you estimate the number of users (or threads) in
JMeter given a guess of the response time of your application , add some
more threads to have a safety factor and then use throughput controller

You can also do somethiing similar byy using the ultimate threadgroup from
jmeter plugins

On Thu, Nov 8, 2018 at 6:48 PM Nayak, Soumya R. <[hidden email]> wrote:

> Hi Deepak,
>
> The requirement is - performance of a server has to be tested when
> continuous http requests are coming. It is like 1 user has to submit 30
> requests per minute. So we have to test with 5 concurrent users which they
> will submit total of 150 requests per minute (5 concurrent http requests
> every 2 seconds). So now what was happening after doing a sample run the
> average response time of each of the request is around of 8 seconds.
> As JMeter waits for the response to come back and then trigger another
> request, so instead of completing the test in one minute , its taking 4
> minutes.
> So we thought of submitting 5 http requests every 2 seconds
> asynchronously. So that is where I was checking the possibility. If any
> sample code or script we can get will be great.
> Based on the above also we were checking if we can capture the response
> time of the asynchronous requests.
>
> Regards,
> Ranjan
>
> -----Original Message-----
> From: Deepak Shetty <[hidden email]>
> Sent: Friday, November 9, 2018 8:01 AM
> To: JMeter Users List <[hidden email]>
> Subject: Re: Asynchronous Http Requests Submission
>
> Hi
> it depends on what your intent is. In general a JMeter (HTTP) sampler will
> wait for the response so it isnt asynchronous - However you can always use
> something like a Java Sampler / JSR Sampler so that you can write java code
> that can make the asynchronous request Unless the asynchronous system that
> you are making the request too has a way to let you know that its done ,
> you cant capture the response time.
>
> In some cases however people misunderstand the nature of what they are
> trying to accomplish with what JMeter does and simpler solutions are
> possible (e.g. AJAX requests that a browser may make are asynchronous from
> the browsers perspective but not really from a HTTP perspective)
>
> This has a pretty good description
> https://www.blazemeter.com/blog/how-to-load-test-async-requests-with-jmeter
>
> Since you havent provided details , its hard to say what might work for you
>
> regards
> deepak
>
>
> On Thu, Nov 8, 2018 at 10:08 AM Nayak, Soumya R. <[hidden email]>
> wrote:
>
> > Hi All,
> >
> > My requirement is concurrently 5 users need to submit http requests
> > every
> > 2 seconds asynchronously. So is it possible from JMeter?
> > If possible how can we capture the response times of the asynchronous
> > requests submitted?
> >
> > Regards,
> > Ranjan
> >
> >
> > **********************************************************************
> > ******************** This message may contain confidential or
> > proprietary information intended only for the use of the
> > addressee(s) named above or may contain information that is legally
> > privileged. If you are not the intended addressee, or the person
> > responsible for delivering it to the intended addressee, you are
> > hereby notified that reading, disseminating, distributing or copying
> > this message is strictly prohibited. If you have received this message
> > by mistake, please immediately notify us by replying to the message
> > and delete the original message and any copies immediately thereafter.
> >
> > If you received this email as a commercial message and would like to
> > opt out of future commercial messages, please let us know and we will
> > remove you from our distribution list.
> >
> > Thank you.~
> >
> > **********************************************************************
> > ********************
> > FAFLD
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Asynchronous Http Requests Submission

deicool
In reply to this post by Nayak, Soumya R.
As the average response time is 8 seconds for 5 users, I would start off by
adding more users and then check the response time. If the response time
increases beyond 8 seconds (say 12 sec), then this means there is some
problem at the server side (queueing is happening).

If the response time stays the same (8 sec), then it would mean the server
can handle more asynchronous request.

If your idea is to test with more request, then just increase the number of
concurrent users (this will send more request to the server and behave
similarly to that of more asynchronous request being send). So instead of 5
users, I would use 20 users.

Deepak
"The greatness of a nation can be judged by the way its animals are
treated. Please consider stopping the cruelty by becoming a Vegan"

+91 73500 12833
[hidden email]

Facebook: https://www.facebook.com/deicool
LinkedIn: www.linkedin.com/in/deicool

"Plant a Tree, Go Green"

Make In India : http://www.makeinindia.com/home


On Fri, Nov 9, 2018 at 8:18 AM Nayak, Soumya R. <[hidden email]> wrote:

> Hi Deepak,
>
> The requirement is - performance of a server has to be tested when
> continuous http requests are coming. It is like 1 user has to submit 30
> requests per minute. So we have to test with 5 concurrent users which they
> will submit total of 150 requests per minute (5 concurrent http requests
> every 2 seconds). So now what was happening after doing a sample run the
> average response time of each of the request is around of 8 seconds.
> As JMeter waits for the response to come back and then trigger another
> request, so instead of completing the test in one minute , its taking 4
> minutes.
> So we thought of submitting 5 http requests every 2 seconds
> asynchronously. So that is where I was checking the possibility. If any
> sample code or script we can get will be great.
> Based on the above also we were checking if we can capture the response
> time of the asynchronous requests.
>
> Regards,
> Ranjan
>
> -----Original Message-----
> From: Deepak Shetty <[hidden email]>
> Sent: Friday, November 9, 2018 8:01 AM
> To: JMeter Users List <[hidden email]>
> Subject: Re: Asynchronous Http Requests Submission
>
> Hi
> it depends on what your intent is. In general a JMeter (HTTP) sampler will
> wait for the response so it isnt asynchronous - However you can always use
> something like a Java Sampler / JSR Sampler so that you can write java code
> that can make the asynchronous request Unless the asynchronous system that
> you are making the request too has a way to let you know that its done ,
> you cant capture the response time.
>
> In some cases however people misunderstand the nature of what they are
> trying to accomplish with what JMeter does and simpler solutions are
> possible (e.g. AJAX requests that a browser may make are asynchronous from
> the browsers perspective but not really from a HTTP perspective)
>
> This has a pretty good description
> https://www.blazemeter.com/blog/how-to-load-test-async-requests-with-jmeter
>
> Since you havent provided details , its hard to say what might work for you
>
> regards
> deepak
>
>
> On Thu, Nov 8, 2018 at 10:08 AM Nayak, Soumya R. <[hidden email]>
> wrote:
>
> > Hi All,
> >
> > My requirement is concurrently 5 users need to submit http requests
> > every
> > 2 seconds asynchronously. So is it possible from JMeter?
> > If possible how can we capture the response times of the asynchronous
> > requests submitted?
> >
> > Regards,
> > Ranjan
> >
> >
> > **********************************************************************
> > ******************** This message may contain confidential or
> > proprietary information intended only for the use of the
> > addressee(s) named above or may contain information that is legally
> > privileged. If you are not the intended addressee, or the person
> > responsible for delivering it to the intended addressee, you are
> > hereby notified that reading, disseminating, distributing or copying
> > this message is strictly prohibited. If you have received this message
> > by mistake, please immediately notify us by replying to the message
> > and delete the original message and any copies immediately thereafter.
> >
> > If you received this email as a commercial message and would like to
> > opt out of future commercial messages, please let us know and we will
> > remove you from our distribution list.
> >
> > Thank you.~
> >
> > **********************************************************************
> > ********************
> > FAFLD
> >
>