First request always slow Asp Net Core API

  • Thread starter Thread starter JARH000
  • Start date Start date
J

JARH000

Guest
Hi,

I have a WEB API with some GET operations, the problem is each time I deploy to production, first request from each method is always slow compared to the following ones.

Example

http://localhost/api/getversion delay 1346 ms +/- firts time

http://localhost/api/getversion delay 70ms next times



Over internet there is a lot of questions about this, but no answer that work.

Reducing initial request latency by pre-building services in a startup task in ASP.NET Core

Application first call webservice is too slow

.net core slow upon first request · Issue #1276 · aspnet/KestrelHttpServer


I hope someone can explain the problem and help me to solve it. My API have a lot of operations Get, Post and each time I deploy there is a delay in invoking first time those methods. Some method may delay 6s and next requests 1s is a big difference.

Thanks

Continue reading...
 
Back
Top