1

I have an Azure App Service that host a WCF service, this service consume a DB that is in Azure SQL Database.

Those WCF Services were installed in the past in a dedicated machine but because we are migrating to Azure we need to make sure that the selected App Service Plan and Instance for Azure SQL Database are enough for handling the normal load we have.

What I want to do is to create a Winform app, then reference the Azure WCF services and them implement call to just 10 methods (will choose the high load ones), and then create lets say 0 to 50 threads that can run simultaneously and execute inside randomly the 10 methods.

For example:

Thread n (Simulates Client #n) Will run in sequence randomly the 10 methods

  • GetData1 method wait to finish then
  • GetData2 method wait to finish then
  • GetData3 method wait to finish then
  • GetData..10 method wait to finish.

So all threads has to run at the same time but the methods could be different so for Thread 1 maybe the first method to run is GetData4, for Thread 2 the first method to run could be GetData10, and so on.

And I have to log elapsed milliseconds that took each method on each thread to run. This way I would know that If I run 10 clients, I can see that maybe the response is all good, but If I run 25 maybe the response will have a bad delay and that will force me to scale up the App Service Plan and DB.

Any clue on where to start or a code sample that can help on this?

Dimitre Novatchev
  • 240,661
  • 26
  • 293
  • 431
VAAA
  • 14,531
  • 28
  • 130
  • 253
  • 2
    A) Get some load testing software, or B) write `async` calls for each web service method, and then write a routine that given an integer N, skips to the Nth call, calls the appropriate method using `await`. Between each call, it checks a flag to see if it's time to quit. If not, it continues to the next. When you get to the end, loop back to #1. Call the method many times using `Parallel.ForEach` – Flydog57 Mar 12 '20 at 01:19
  • Use a tool like SOAP UI –  Mar 12 '20 at 01:43
  • Maybe you can ask this question in the [coyote] tag: https://stackoverflow.com/questions/tagged/coyote .Read more about the Coyote framework here: https://stackoverflow.com/tags/coyote/info – Dimitre Novatchev Mar 26 '20 at 18:40
  • See also https://stackoverflow.com/questions/3814993/multiple-concurrent-wcf-calls-from-single-client-to-service – Chris Mar 30 '20 at 20:24

0 Answers0