locked
Web Api first response is slow RRS feed

  • Question

  • User-234441352 posted
    Hi,
    I have developed a service using web api.

    Service doesn't have much logic but still it is taking sometimes 7 or sometimes 19 seconds to return a first request response at daily new morning. After first request, it takes 1 or 2 seconds.
    What should I do to improve more performance in it.

    And what other best practices can be used for services?
    Saturday, July 27, 2019 1:27 PM

Answers

  • User1120430333 posted

    Like snyother ASP.NET Web solution, if it's not used frquently and sits idle, then the program is taken out of scope and must be put back into scope. There is the KeepAlive, and you you can ping the service parodically to keep the services in scope.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, July 27, 2019 2:54 PM
  • User1120430333 posted

    if you using EF, then it's cold vs warm start.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, July 28, 2019 5:17 PM

All replies

  • User1120430333 posted

    Like snyother ASP.NET Web solution, if it's not used frquently and sits idle, then the program is taken out of scope and must be put back into scope. There is the KeepAlive, and you you can ping the service parodically to keep the services in scope.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Saturday, July 27, 2019 2:54 PM
  • User-234441352 posted

    thank you

    what other practices i can use for increasing the service response time?

    Saturday, July 27, 2019 6:43 PM
  • User1120430333 posted

    if you using EF, then it's cold vs warm start.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Sunday, July 28, 2019 5:17 PM