Is it possible to initialize the IIS Web Garden enforcement process?

We have an ASP.Net web application running on IIS Web-Garden that is configured to allocate up to four processes. In our web application, the first user to enter the site causes all cached items to load. Since we work in Web-Garden IIS, in the end, each of the four Web-Garden processes ultimately requires up to four first users. This cache creation takes 30-40 seconds, we tried to do it faster, but it is unlikely to be improved.

This is unacceptable, we were instructed to quickly make a site for everyone (without waiting for the cache to initialize). I would like to use a solution that crawls the site to preheat the cache. The problem is that the Web-Garden feature seems like a black box - you cannot control when IIS decides to load this 2nd, 3rd or 4th process when the next HTTP request hits.

It seems to me that this is a common problem, but finding a solution has yielded few results. My question is, is there a way through HTTP headers or some other constructor to give IIS a hint that you want to load, or at least direct to processing 2,3,4, etc.?

+3
source share
3 answers

Microsoft, IIS 6. IIS 7.5 ASP.Net 4.0, , . "preloadProvider". ( !).

http://forums.iis.net/p/1158476/1907392.aspx

, , , theapplicationHost.config:

<sites>

  <site name="MySite" id="1">

    <application path="/"

         preloadEnabled="true"

         preloadProvider="PrewarmMyCache" >

        <!--  Additional content -->

    </application>

  </site>

</sites>



<!-- Additional content -->



<preloadProviders>

     <add name="PrewarmMyCache"

         type="MyNamespace.CustomInitialization, MyLibrary" />

</preloadProviders>

IIS 7.5 , IIS 7.5 applicationHost.config , - . , , IIS7.5 ASP.NET 4.0 , HTTP-. , ASP.NET , preloadProvider ( ) . , IProcessHostPreloadClient, :

public class CustomInitialization :  System.Web.Hosting.IProcessHostPreloadClient

{

    public void Preload(string[]  parameters)

    {

        // Perform initialization.

    }

}

, Preload , ASP.NET . IIS 7.5 ASP.NET 4.0 HTTP-. , , , HTTP-.

+6

, - -. , /, , , - "" , .

, IIS , . URL- , , , - URL-, . , , .

+2

Microsoft , , . IIS 7.5 , , , .

, , , , , . , , , . IIS 8.0, , .

For more information, you can read my answer to a similar question in How to heat up an ASP.NET MVC application on IIS 7.5?

0
source

Source: https://habr.com/ru/post/1710528/


All Articles