Skip to main content

Managing deployment groups

Creating deployment groups allows you to control which servers and Forwarding Agents in a Striim cluster will run specific applications and flows. For example, you could use this to ensure that a source is run on the same server as the file or process from which it reads data. The web UI includes Deploy and Undeploy commands in the flow editor.

The default deployment group, which is created automatically, contains all servers and Forwarding Agents in the cluster.

The agent deployment group may be created automatically as discussed in Configuring the Forwarding Agent.Configuring the Forwarding Agent

CREATE DG (deployment group)

CREATE DG <name> ("<node name>:",...)
  [ MINIMUM SERVERS <number of servers> ]
  [ LIMIT APPLICATIONS <maximum number of applications> ];

Node names begin with S or A to indicate server or Forwarding Agent, followed by the node's IP address with hyphens instead of periods. For example, a server with the IP address 192.168.1.12 would be named S192_168_1_12. Use the command LIST SERVERS; to return a list of nodes in the current cluster.

Note

Do not put servers and agents in the same group. See Using the Forwarding Agent for more information.Using the Striim Forwarding Agent

The following would create a two-server cluster named SourceData:

CREATE DG SourceData ("S192_168_1_12","S192_168_1_13");

Individual servers within a multi-server deployment group may be stopped and restarted without stopping applications. Striim will automatically reallocate resources as necessary.

To ensure that applications are not deployed to the group when some of its servers are offline, use MINIMUM SERVERS. For example, MINIMUM SERVERS 2 will allow deployment only when at least two servers are available, ensuring that failover is possible. If only one server is available, deployment will fail with a "not enough servers" error.

To prevent servers from being overloaded by applications after failover, use LIMIT APPLICATIONS.  For example, if you had a four-server group, LIMIT APPLICATIONS 4  would ensure that no server would ever run more than four applications. If the group was running ten applications deployed ON ONE and one server failed, all ten applications would keep running. If a second server failed, two of the applications would terminate.

ALTER DG (deployment group)

ALTER DG <name>
  [ { ADD | REMOVE } ("<node name>",...) ]
  [ MINIMUM SERVERS <number of servers> ]
  [ LIMIT APPLICATIONS <maximum number of applications> ];

Use ALTER DG to change the members or properties of an existing deployment group. For example, to add a third server to the group created by the example discussed in CREATE DG (deployment group):

ALTER DG SourceData ADD ("S192_168_1_14");

To make these changes take effect, redeploy the application(s). Until you redeploy:

  • Applications deployed ON ALL will not be deployed on a newly added server. 

  • Applications deployed to a removed server, deployed on fewer servers than a new MINIMUM SERVERS value, or that exceed a new LIMIT APPLICATIONS value will not be stopped or undeployed.

DEPLOY APPLICATION

DEPLOY APPLICATION <namespace>.<application name>
ON { ONE | ALL } IN <deployment group>
[ WITH <flow name> ON { ONE | ALL } IN <deployment group>,... ] ;

Note

A cache is loaded into memory when it is deployed, so deployment of an application or flow with a large cache may take some time.

With a single-server deployment group, you may use DEPLOY APPLICATION <application name>; without further options.

The following examples assume that you are currently using the application's namespace so it is not necessary to specify it:

DEPLOY APPLICATION <application name> ON ONE IN <deployment group>; will deploy the application on one server in the specified deployment group. Use ON ONE in a multi-server environment to deploy an application that has not been written to run on multiple servers. Striim will automatically deploy the application to the server with the fewest applications.

DEPLOY APPLICATION MyApp ON ALL IN Group1 WITH FlowX ON ALL IN Group2, FlowY ON ALL IN Group3; will deploy FlowX on all servers in deployment group Group2, FlowY on all servers in Group3, and any other flow in the application on all servers of Group1.

DEPLOY FLOW

DEPLOY FLOW <namespace>.<flow name> ON { ONE | ALL } IN <deployment group>;

Deploys a single flow. Typically you would use this after undeploying and dropping a flow to make changes without stopping the entire application.

UNDEPLOY

UNDEPLOY { APPLICATION | FLOW } { <namespace>.<application name> | <namespace>.<flow name> };

Undeploys a previously deployed application or flow.