I'm having an issue where the first request to my ASP.net API is slow.
So it's not the first user to make a request, it's the first request from any device to the server that's slow. Once the first request by that device has been made then the rest of the requests from that device are quick for the rest of the day up until the next day. Once it's the new day then again that devices first request is slow.
I don't think it's the server sleeping because like I said above it's the first request from every device.
Just to give an example for clarity.
If I go on my computer and make a request to the API it's going to be slow for my first request. If another person next to me makes a request to the same API his/her first request will also be slow even though I made a request first (basically waking up the server).
Another thing is that this happens when I test the API on my local machine too. The first request is about 18s then if I restart it on my local then once again the first request is slow.
Does anyone have any ideas as to what's happening?
.Net Framework 4.6.1 We use Azure too.