Horizontal scaling
You can scale services horizontally across hosts dynamically.
To scale services horizontally, change the maximum instances per host parameter (which specifies the maximum number of service instances allowed per host) to equal 1 in either the service profile or in the application template.
In the application template, set the numinstances: maxperhost value
to 1. For example:
serviceA:
type: IBM::ASC::Service
properties:
numinstances:
min: 1
max: 100
maxperhost: 1Now, when you scale the service from the cluster management console, the numinstances: max parameter is dynamically updated (without restarting the service), and EGO determines which service instances to terminate (if required) to satisfy the new numinstances: max value.
In the service profile, the same results occur when the
MaxInstancesPerHost parameter value is set to
1:
<sc:ServiceDefinition>
<sc:MinInstances> 1 </sc:MinInstances>
<sc:MaxInstances> 100 </sc:MaxInstances>
<sc:MaxInstancesPerHost> 1 </sc:MaxInstancesPerHost>
</sc:ServiceDefinition>