5

Is there any best practice or recommendation around applicationIntialization?

  1. Should we use this?
  2. What is the best way to warm up or improve start up time of CMS and CD website after swap deployment slot?
  3. Any recommendation or best practice?
  4. Pros and cons if any?
  5. Suggestion Warmup around prefetch cache after app pool recycle or changes to production?
5

I can give some input regarding App Initialization in general on Azure App Service:

  1. During slot swap, you don’t want your 'preprod' to be activated into production (swap) without having been warmed up beforehand. Using AppInit the swapping operation will only occur once the load balancer received an HTTP Response from the init module. (Note this response can be anything, also a 404 or 500 so take that into account). If you are using Swap with Preview and running smoke tests or UI tests on that slot before swapping then the appinit will have less impact.

  2. During scale up: in Web apps, scale up of an App Service Plan means the Web App is moved onto new machines. These are going through cold start. Again using the AppInit the scale up will only take place through the DNS load balancer once a response has been received from the module.

  3. During scale out: when a new machine is added to the App Service plan, you’d want the requests to be distributed to the new machine as well, but only after cold start. App Init will also have effect here as the new machine will only be added to the load balancer after going through the appinit. In all cases, ongoing requests to the production slot, or to the smaller scale app will be gracefully completed, and new requests will end up on the new slot/machine).

See also this article: http://ruslany.net/2015/09/how-to-warm-up-azure-web-app-during-deployment-slots-swap/

  • Thanks ,This is helpful.With above explanation I understand that, during scale up the app init is pretty straight forward as there is only increase in resources whereas in scale out it require more smarts to ensure warmup is initiated across all the VMs. – Santosh Poojari Apr 19 '17 at 2:59
  • Actually I want to be sure I explain this correctly: – Katrien De Graeve Apr 20 '17 at 15:32
  • 1
    Scale out: add machines indeed it requires the warm-up and AppInit makes sure new machine is not added to the pool until warmup is finished (until AppInit module gets a response from the provided URIs) – Katrien De Graeve Apr 20 '17 at 17:54
  • 1
    Scale up: also in this case you actually are landing on complete new machines. In App Service, when you scale UP an App Service Plan, your apps are moved from a size x (S1 for example) machine to a size y (S2 for example) machine. While requests keep running on the old machine size, the load balancer will direct new requests to the new machine as soon as AppInit returns. So the concept is pretty similar. This is because ASPs run on pools of machines from a certain size. To scale up it's not the machine that gets new resources, it's the web app that moves out to a new pool of machines. – Katrien De Graeve Apr 20 '17 at 17:54
1

Currently there is no official Sitecore recommendation on this. Also applications can be different and require different settings.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.