Azure Web Role "warm up" strategies [closed] Azure Web Role "warm up" strategies [closed] azure azure

Azure Web Role "warm up" strategies [closed]


We use a combination of a couple of those answers and it works perfectly well for us, they're very quick to change and test however, it seems to cover all bases.

public override bool OnStart(){    ServicePointManager.DefaultConnectionLimit = 12;    if(!RoleEnvironment.IsEmulated)    {        using(ServerManager serverManager = new ServerManager())        {            foreach (var app in serverManager.Sites.SelectMany(x => x.Applications))            {                app["preloadEnabled"] = true;            }            foreach (var appPool in serverManager.ApplicationPools)            {                    appPool.AutoStart = true;                    appPool["startMode"] = "AlwaysRunning";                    appPool.ProcessModel.IdleTimeout = TimeSpan.Zero;                    appPool.Recycling.PeriodicRestart.Time = TimeSpan.Zero;            }            serverManager.CommitChanges();        }    }    return base.OnStart();}


Have you considered using the Azure endpoint monitoring to both monitor and trigger your role to respond every 5 minutes? It's built into Azure and there's no code needed.

http://azure.microsoft.com/en-us/documentation/articles/web-sites-monitor/