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

abhishek singh rana 1 Reputation point
2021-09-17T07:51:08.59+00:00

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 :).

ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,397 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,641 questions
{count} votes