Scaling a service

Scale a service when you want to increase or decrease the number of service instances to adjust load during peak and low periods.

Before you begin

  • You must be a cluster administrator or have the Services Manage permission to scale a service.
  • The service must be in the DEFINED, STARTED, or ALLOCATING state.

About this task

When you scale a service, you change the maximum number of instances of the service that is defined in the service profile's MaxInstances parameter. To scale a service on each host, you must change the MaxInstancesPerHost parameter. (The MinInstances parameter specifies the minimum number of service instances that must run for the service to be considered started.)

If the allocation is higher than the new number of maximum instances, the service controller scales down the service. If the allocation is lower than the new number of maximum instances, the service controller attempts to start additional service instances.

For example, say you want 12 instances of a service to run on 4 hosts; you must then set MaxInstances to 12 and MaxInstancesPerHost to 3. With this configuration, the service controller starts 3 services on each available host, up to a total of 12. If only 3 hosts are available, only 9 instances are started. If 5 hosts are available, the service controller on one host allocates slots of all 5 hosts up to a maximum of 3 slots on any one host.

Procedure

While you can usually scale a service from the cluster management console, you might need to scale a service manually from the command line if you stopped the WEBGUI service or you cannot access the console.

  • Scale a service from the cluster management console:
    1. From the cluster management console, select System & Services > EGO Services > Service Profiles.
    2. Locate the service you want to scale. Ensure that the service is in DEFINED, STARTED, or ALLOCATING state.
    3. From the Actions list, click Open Profile.
    4. In the sc:ServiceDefinition section, set the sc:MaxInstances parameter to a value higher than 1. If you want to scale the service on the same host, set sc:MaxInstancesPerHost to a value higher than 1.
    5. Click Save and confirm your changes.
    6. From the service's Actions list, click Start to start the service again.
  • Scale a service manually:
    1. Run egosh service view to see the current status of your services. If the service you want to scale is in DEFINED, STARTED, or ALLOCATING state, proceed to the next step.
    2. Run egosh service config -s service_name -M maximum_instances, where:
      • service_name is the name of the service you want to scale.
      • maximum_instances is the maximum number of service instances that can run concurrently.

Results

Your service is scaled up or down based on the allocation.