Correct way of updating a RemoteAPP application with NGEN
Asked Answered
A

2

18

We have a Windows2008R2 RemoteAPP .NET 4.5 application NGEN-ed on the RDS server, with approx. 300 concurrent users for the 3-host NLB cluster.

The application is under active development and the RemoteAPP deployed assemblies need to be updated (i.e. replaced with new ones) quite often.

How we currently do this is as follows:

  1. Rename files to be changed on the RemoteAPP server, with users connected to it (OS will not allow files to be overwritten if they are loaded),
  2. Write new files instead of old ones,
  3. NGEN install new assemblies (without first uninstalling old ones!),
  4. Notify users (via app itself) that the app version has changed and it needs to be restarted,
  5. Gradually allow users to restart the app at their pace (simmultaneous app restart would result in increased disk and CPU load, hurting the server performance). And so for all hosts in the cluster.

After this, the server would occasionally Blue-Screen-Crash with the Microsoft-Windows-Kernel-Power EventID 41 critical error - and I highly blame our update practice to be responsible for it.

Hence the question: what is the recommended way of updating a RemoteAPP application and NGEN-ing new assemblies without having to terminate processes accessing old assemblies (i.e. allow users to continue and restart when they feel like).

Thank you.

Ardellaardelle answered 21/11, 2012 at 15:54 Comment(4)
Did You find a reasonable answer to this ?Aruabea
Would it be possible to implement a hyper-V solution? new version could be deployed to a shadow instance and ip address reassigned once its ready to go live. if you separate front and back end it'd be a pretty minimal load too...Mastery
No, I was not able to find a reasonable answer to this question. Instead, we stopped NGEN-ing the assemblies and increased system resources. the blue screen error hasn't appeared since.Ardellaardelle
I would perhaps see your problem as a design issue rather than a technical one. You are trying to create a dynamically updating app with zero downtime with operations that affect the state of a windows process. (changing dll's , NGEN'ing which requires that the process state is stopped.) etc. Your "always up" application should load assemblies dynamically, and have an option to "reload" them when its running. This way you deploy a set of assemblies, NGEN them and finally ask the application to reload which does the trickWithin
F
1

I recommend speeding your web apps using the new "Application Initialization Module for IIS 7.5" and "Application Initialization" is built into IIS 8 instead of ngen.

Microsoft's website claims: IIS Application Initialization for IIS 7.5 enables website administrators to improve the responsiveness of their Web sites by loading the Web applications before the first request arrives.

Reference: http://weblog.west-wind.com/posts/2013/Oct/02/Use-IIS-Application-Initialization-for-keeping-ASPNET-Apps-alive

Fluorinate answered 24/4, 2014 at 22:34 Comment(0)
M
0

You could use a starter application which is published via RemoteApp. The starter would, in turn, start the latest version of the application.

Ex: have a registry key which is the path to the latest version of your application

  1. Add a new folder C:\Program Files\myApp\1.0.26\
  2. ngen the new assemblies
  3. Update registry key to point to new folder
  4. Launcher, when run, starts the new version of the application
  5. Optionally, remove the old version when it is no longer in use

RemoteApp points to C:\Program Files\myApp\startApp.exe

startApp.exe starts 1.0.26\theApp.exe

Maiolica answered 28/1, 2014 at 0:15 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.