High Availability

Product: PowerShell Universal
Version: 1.5.0

I’m curious what the general thoughts are on High Availability configurations for PowerShell Universal. We’ve got a project and I think the Universal Automation is a prime tool for it, but we would want to be in a HA stance for it.

1 Like

It’s something we’re thinking about but not there yet. With the on-disk database, it’s a little hard to have a good HA story. It’s possible to do some sort of monitoring with AppInsights and then manual fail over but it’s certainly not built in at the moment.

Our first step is to introduce an MS SQL persistence layer and then we can more easily work towards a much better HA story.

If there’s anything specific you have in mind beyond fail over for the agent running jobs, I’m all ears.

So I’ve spent the day pondering and playing with this a bit. You store the Repo and Database as locations in appsettings.json, so this can be workable to some extent.

I stood up a second test box and the appsettings.json back to my main test box housing the PSU install. I was able to disable the Universal service on my main and start it up on my secondary and it’s identical.

You could theoretically house the files in central place, or do storage replication. You would need a third box to play witness that could keep the services on both boxes honest. I actually know someone at work who has done something similar, so I might bend his ear on it. In my case, the final bit would be DNS entry flipping from one server to the other.

Thought I would put another post up on this.

I ended up setting up Failover cluster and DFS replication between my two lab servers. While I didn’t take it the extra step to setup a 3rd for a proper quorum, I can successfully flip between the two servers for the PowerShell Universal service. It stops it on one then starts it on the other when you shift it, while also maintaining DFS replication of the folders I setup, the programdata\universalautomation folder and the folder where I housed my dashboard files as well. Works like a champ.

As a follow-up to this, I would be curious how you see this from a licensing standpoint. I’m only running the service on one system at a time, and I’m replicating the DB and files with the license data across servers. Would you expect an end user to have 2 licenses?

Thanks for the information. That’s really helpful. This might be something to include in the documentation!

From a license standpoint, since you’re only running one system at a time, you’ll only need one license.