I have a small AngularJS web application that runs in kiosks in an intranet network. I've been tasked to make deployments without downtime and in an automated way that can be controlled remotely with a web interface. Since it's a small application, we do not have load balancers or similar setups. I've looked at two options,
Option 1: Download versions of the application in a folder and change the Virtual Directory's Physical Path to the folder path of a new version, this is achievable using Microsoft.Web.Administration library with the following code,
ServerManager sm = new ServerManager();
Site site = sm.Sites["Default Web Site"];
site.Applications[virtualDirectory].VirtualDirectories["/"].PhysicalPath = newPath;
sm.CommitChanges();
In this approach,
- How quickly will the switch be reflected?
- What are the chances that some of the kiosks still working with the older version of the application?
- Is there any chance for a downtime in between the short period of time the switch is made?
- Will any requests made to IIS in this period time return errors?
Option 2: Using IIS' URL Rewrite feature. Basically I'll be programmatically adding new rewrite rules to the application's web.config to redirect to a different subfolder which will be the newer version of the application.
In this approach,
- How quickly will the URL rewrite rule reflect and the rewrite begin?
- What are the chances that some of the kiosks still working with the older version of the application
- Is there any chance for a downtime in between the period of time when the rewrite rule is added to the web.config?
- Will any requests made to IIS in this period time return errors?
- Will there be any performance cost for the URL rewrite?
Kindly help me out. Are both of these approaches not suited for my task? Are there any other alternatives to this requirement?