Search code examples
amazon-web-servicesamazon-ec2jmeterperformance-testingjmeter-plugins

Jmeter execution decrease the number of request on AWS upon adding HTTP Cache Manager


Hello can anyone help me how to simulate this scenario

Currently I have Constant Throughput Timer = 60 and per minute I'm able to generate 6000 request per minute without cache manager. upon adding cache manager I noticed the request went down to 1,500 request per minute upon checking on AWS Cloudwatch. but If I run locally using debug sampler I'm able to generate 6,000 request per minute. do you have any idea about this problem. Your response is highly appreciated. Thank you so much

-I want to achieve 6000 request per minute

-Randomized user_id (I have 10,000 pool of user_id)

-But only 1 cache for entire execution is this possible?

-I'm currently using GET Method here's my sample payload

/test/?user_id=${user_id}&query_type=existing_user

Jmeter Screenshot run locally with Cache Manager as Debug Sample Processor not actually request since I cannot invoke locally, I can only access via EC2 Instance:

Jmeter result

AWS Result Before Adding HTTP Cache Manager -(If you sum up Cache Hit and Miss you will get roughly 6000 request) enter image description here

AWS Result After adding HTTP Cache Manager: enter image description here


Solution

  • This is exactly how HTTP Cache Manager should work, it tells JMeter to respect Cache-Control headers hence JMeter sends HEAD request and checks if the page has changed since last visit and if it hasn't - the actual request is not being made. This is an essential part of configuring JMeter to behave like a real browser

    If you're not happy with the behaviour or it doesn't match your load pattern you can tick "Clear cache each iteration" box in the HTTP Cache Manager:

    enter image description here

    Or alternatively untick Same user on each iteration box in the Thread Group:

    enter image description here