Adding resources to Teracloud® Streams instances

You can assign resources to an instance statically when you create the instance or dynamically after the instance is created. The resources are allocated to the instance from the pool of resources in the domain.

About this task

By adding more than one resource to an instance, you increase the processing power and high availability of the instance. You can tag resources to run specific application or management services and to have standby services ready on multiple resources. These standby services can take over if a failure occurs on one of the resources. For more information, see Configuring high availability for Teracloud Streams enterprise domains, instances, and application repositories.

You can use static resources that are selected when you start the instance. To allocate specific Teracloud® Streams hosts to an instance, use the manual resource assignment option in the Streams Console or the --numresources option on streamtool commands. To automatically allocate Teracloud® Streams hosts when you start the instance, use the automatic resource assignment option in the Streams Console.
Tip: In general, using the automatic resource assignment option provides better allocation for high availability environments. When an automatically added resource fails, it is automatically replaced by another resource. When a manually added resource fails, the resource is not replaced.

You can also use dynamic resources that are added to an instance based on the job or processing element requirements. A dynamic resource is released from the instance when the instance is stopped or when the resource is no longer needed.

Teracloud® Streams provides tags that you can use to restrict access to a resource. This can be helpful if some resources have special capabilities, such as access to a private data source. For more information, see Using tags to restrict resources.

Procedure

  1. Create an instance.
    When you create the instance, you can optionally include resource specifications.
    Note: To dynamically allocate resources, you must set the associated properties when you create the instance. For more information, see Configuring an instance to use dynamic resource allocation.
  2. Optional if dynamic resource allocation is enabled: Add or change the resource specifications for the instance.
    1. Use the Streams Console to edit the instance and change its resource specifications. Alternatively, use the following streamtool commands: addresourcespec, chresourcespec, rmresourcespec, addhost, and rmhost.
    2. Optional: Configure resource restrictions.

Results

Static resources are allocated to the instance when it starts. If your instance has unfilled resource requests, resources are added to the instance whenever an appropriate resource becomes available in the domain. You do not need to stop and restart the instance.

If dynamic resource allocation is enabled, resources are acquired from the domain to support submitted jobs and are released when they are no longer needed.