IIS 7 and Above
Application Request Routing (ARR)
ARR+NLB slow response on initial request(s)
Last post Oct 11, 2017 04:10 AM by Rovastar
Oct 10, 2017 02:16 PM|R. Brink|LINK
We have a serious issue on our ARR+NLB webfarm. Responding to the first request (the one that actually starts the application) is very slow.
More specific: Each webserver in the farm responds very slow to the first request for an application that was just started. It takes 60 seconds and up to respond to a simple MVC page.
Is there any logical explanation for why an initial request on an ARR+NLB webfarm takes much longer than on one of the webservers directly? I can't seem to find the cause of this. Anyone have any ideas/pointers?
Oct 10, 2017 02:31 PM|Rovastar|LINK
What setting do you have for the application pool for it? Idle time out?
By design IIS has to spin up a new worker process when one is not running.
Try leaving teh app pool always on. e.g. no idle timeout value
Oct 10, 2017 03:08 PM|R. Brink|LINK
We use the default settings for now. I do understand the apppool is recycled after a certain idle time. It is the proces of starting the apppool that is extremely slow. I know I could change the settings, but for comparison sake I'm not going to.
We are talking about a big machine, usually spinning up applications in a matter of seconds. This application doesn't do anything special compared to others during app start, afaik.
What I just did discover though is that a request for a simple HTML page as a first request on the cold apppool is actually very fast! So it must be something in the MVC pipeline that is slow, right?
Oct 11, 2017 04:09 AM|Yuk Ding|LINK
Asp.net application need to be initalizaed everytime the first request call the application. So that's why asp.net so slow but html so fast. So if you need to improve the performance, you could set application initalization:
As rovastar said, leave the application pool always on could improve the performance.
Oct 11, 2017 04:10 AM|Rovastar|LINK