0

I have a Restful service. A GET service. I find that the first time this service is called it takes roughly 3000mSecs. However, subsequent retries it returns in 400mSecs.

The GET call may or may not be fetching/returning the same data from a db. And the database has 20-30 rows. So I dont imagine it to impact time taken to fetch. Data returned by the service is never cached in the code. So, each time, when a call is made, data is fetched from the db and returned.

And after a few hours the Rest service again takes 3000mSecs and immediate next calls return much quicker. The service runs from an entity core webapp build using ASP MVC .net C# over IIS on a remote AWS cloud

Any thoughts on why the delays first time ? and how it can be reduced or avoided ? Some pointers would help please

NRB
  • 95
  • 1
  • 7
  • There are plenty of questions about this, for example: https://stackoverflow.com/q/13386471/5311735 – Evk Oct 19 '20 at 10:56
  • Thanks for this. I have tried some of the methods suggested here. I still face some delays and I cannot understand why. I will find more logs/reasons and come back. – NRB Oct 20 '20 at 09:56

0 Answers0