0

I have developed a RESTful api that I deployed on Azure Web App. While performing the load test using JMeter, I see that the response time is huge i.e ~18secs. This response time appalls me because the endpoint I have exposed only receives a ~1-2KB of text data and enqueues it to azure service bus queue.

I have researched and found the following:

  1. Azure Web App and Queue needs to be in the same region. Yes they are
  2. Size of the VM matters. Mine is S3 Large
  3. Software Design needs to be good/optimized. Controller only enqueues, no other operations

For load testing, I have provisioned a VM instance in the same region as the Azure Web App to minimize the latency. The enqueue statement takes time in the order of milliseconds, so I wonder what is taking the extra seconds while the serivce is in load?

My code creates a single instance of QueueClient which I reuse for all requests. The code is just the following two lines inside an ApiController

ServiceBusManager.GetQueueWriter().Enqueue(data); //data is no more than ~1KB 
return Request.CreateResponse(HttpStatusCode.OK, "Data enqueued");
0
  1. Make sure your Azure WM instances are not overloaded in terms of CPU, RAM, Disk and Network. You can do it using either Azure Diagnostics Extension or JMeter PerfMon Plugin
  2. Make sure you're following JMeter Best Practices
  3. Try increasing the load gradually, this way you will be able to correlate increasing number of virtual users with increasing response time and will be able to state when performance starts degrading.
  4. Run your test with profiler tool telemetry (i.e. connect YourKit or dotTrace) - this way you will be able to tell where does your application spend that much time.
  • Thanks Dmitri. CPU and RAM utilization is minimum and not overloaded. As stated in the question, the code is not using any heavy objects and its just two lines of code in the controller. – Sarmad Feb 19 '18 at 14:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.