Scaling Up Down SF - artisticcheese/artisticcheesecontainer GitHub Wiki

##Scaling SF instances You can specify number of instances of your application you want to have deployed via parameter called "InstanceCount". By default it's set to -1 which means application will be deployed to all available hosts.
You can limit number of deployment of this application by modifying this value and redeploying an application. In this case make sure "upgrade" is not being checked when you deploy application since you are changing number of hosts for your application which is set once during initial deployment. Change InstanceCount to 2 and deploy application, notice that it's now hosted only on 2 out of 3 servers

<Parameters>
  <Parameter Name="PI_InstanceCount" DefaultValue="2" />
</Parameters>

SF will automatically also increase/decrease/move instances between servers during reboot etc. Right now Application2 in my case hosted on Host2 and Host3. If I reboot Host3 then SF will move application to Host1 since SF is configured to always have 2 instances of application running. Another advantage of using containers in general is ability to run them side by side with older version which can become pretty usefull during application upgrades.
Go to applications nodes in SF and choose your application. In my case it's Application2Type. You will see all versions of applications you ever deployed to your cluster. You can remove them but more importangly you can instantiate older versions of application as well by clicking "Create App Instance".
Create a very first version of the app which still have a bug in displaying PI number. You can change application name to differentiate from current production version of the app. I chose "OldPIVersion". You will see now 2 versions of your application listed and as you remember original version had "-1" setup as far as number of instances is concerned and you will see this application being deployed to all 3 container hosts.

⚠️ **GitHub.com Fallback** ⚠️