1 Reply Latest reply on May 30, 2014 5:01 PM by tdanner

    How many REST calls can I make at any given time?

    scottfraley

      I'm trying to write code to feed an internal monitoring tool we have here and so I've written code to spin up a Task (C# / .Net 4.5) for each of our, say 900-1200 monitored nodes/devices and query the Events table for each device. The problem I'm seeing so far is that many of the tasks are throwing A Task was cancelled exceptions and/or that the Task(s) have timed out after I .Wait() for them for FOUR minutes.

       

      So, can anyone tell me what the limit of concurrent connections are to the REST [/Query] API?

       

       

      Thanks,

      Scott

        • Re: How many REST calls can I make at any given time?
          tdanner

          I wrote a simple program using System.Net.Http.HttpClient and async/await to make 900 calls to /Query at the same time. They returned at a more or less steady rate starting about 1 second after launching and continuing until they had all returned. I expect that if I had used a slower query the total time would be longer.

           

          It's hard to tell exactly how many queries it was actually processing concurrently, because it accepted all 900 requests immediately but did not start 900 threads to service them.

           

          I recommend you group your requests into smaller batches and see how it performs.

          1 of 1 people found this helpful