Search code examples
c#asynchronousparallel-processingstress-testing

Multiple Simultaneous API calls in C#


I am trying to stress test my Endpoint which works with dapper that calls procedure and has a lot of validation. Idea is to know how it can handle like 1000 API calls that was sent at the same time.

Note that it is Get Endpoint

Any idea?

I tried using thread pool, but it would not run 1000 of them at the same time, also I thought about Task but it was same here, also for loop is not option with tasks or anything else, because there still will be the time difference between each method run.


Solution

  • I would suggest using dedicated load testing tools like K6 or Bombardier. You run all your infrastructure including the service/system you are tryng to test locally or in cloud and then run the load testing tools against your service.

    PS: Bombardier might be easier if you just have to make quick HTTPGET endpoint calls