question

abhisheksinghrana-6722 avatar image
0 Votes"
abhisheksinghrana-6722 asked BrandoZhang-MSFT commented

Calling Web Api's with multiple databases at regular intervals using a scheduler in C#

0


I am working on Dot Net 5 application where I have multiple web api's with different databases. So when I make 1st request to any of the API, the response time is huge(6-7 sec, because the connection object is getting created & connection being established) but the subsequent requests are fast as the connection object already exist.

Now, to overcome this scenario I am trying to implement a scheduler which will ping all the web api's with some dummy request at regular interval say 3 seconds so that the response time is reduced. I am using ADOMD.net for the connection with the databases.

I tried searching a lot over the google but I couldn't find any proper sources to depict the above mentioned problem. Can you all please provide me some insights and the steps to proceed with this problem?? Some examples would also be appreciated.

Thanks in advance :).

dotnet-csharpdotnet-aspnet-core-webapi
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@abhisheksinghrana-6722 Could you please tell me where you hosted your web api application on the IIS or windows service or else? Could you please tell me which database you have used in your application? I think we need to figure our which part caused the first request latency. The server need to start the application and this part takes some long time and the application connect to the database takes so long time.

0 Votes 0 ·

0 Answers