Cloud Application Integration (On-Premises) : Administering CloudStreams : Virtual Services : Creating a New Virtual Service (REST) : The "In Sequence" Step (REST) : The "Routing Rule" Step (REST) : The "Load Balancing" Routing Rule Step (REST)
The "Load Balancing" Routing Rule Step (REST)
If you have a Web service that is hosted at two or more endpoints, you can use the Load Balancing option to distribute requests among the endpoints.
The requests are intelligently routed based on the "round-robin" execution strategy. The load for a service is balanced by directing requests to two or more services in a pool, until the optimum level is achieved. The application routes requests to services in the pool sequentially, starting from the first to the last service, without considering the individual performance of the services. After the requests have been forwarded to all the services in the pool, the first service is chosen for the next loop of forwarding.
Load-balanced endpoints also have automatic Failover capability. If a load-balanced endpoint is unavailable (for example, if a connection is refused), then that endpoint is marked as "down" for the number of seconds you specify in the Suspend Interval field (during which the endpoint will not be used for sending the request), and the next configured endpoint is tried. If all the configured load-balanced endpoints are down, then a SOAP fault is sent back to the client. After the suspension period expires, each endpoint marked will be available again to send the request.
To configure the "Routing Rule" step for "Load Balancing" routing (REST)
1. Open Software AG Designer and display the CloudStreams Development perspective by clicking Window > Open Perspective > Other > CloudStreams Development.
2. In the CloudStreams Governance view, expand your CloudStreams Governance project and double-click the virtual service name.
3. Expand In Sequence.
4. Click Routing Rule and complete the fields in the General page in the Properties view as follows.
Option
Description
Name
You can optionally change the step name to any other name. There are no naming restrictions.
Type
(Read-only field.) Routing Rule.
Protocol
(Read-only field.) HTTP.
Routing Type
Select Load Balancing.
Route To
The URLs of two or more services in a pool to which the requests will be routed. The application routes the requests to services in the pool sequentially, starting from the first to the last service without considering the individual performance of the services. After the requests have been forwarded to all the services in the pool, the first service is chosen for the next loop of forwarding.
To specify additional services, use the plus button next to the field to add rows.
Then, click the icon next to this field and complete the Configure Endpoint Properties dialog box as follows. These properties will apply to all the endpoints.
*HTTP Properties
*Connection Timeout: The time interval (in seconds) after which a connection attempt will timeout. If a value is not specified (or if the value 0 is specified), CloudStreams will use the default value specified in Integration Server.
*Read Timeout: The time interval (in seconds) after which a socket read attempt will timeout. If a value is not specified (or if the value 0 is specified), the default is 30 seconds.
*SSL Options: Optional. To enable SSL client authentication for the endpoint, you must specify values for both the Client Certificate Alias field and the IS Keystore Alias field. If you specify a value for only one of these fields, a deployment error will occur. You may leave both fields blank.
*Client Certificate Alias: The client's private key to be used for performing SSL client authentication.
*IS Keystore Alias: The keystore alias of the instance of Integration Server on which CloudStreams is running. This value (along with the value of Client Certificate Alias) will be used for performing SSL client authentication.
Suspend Interval
A numeric timeout value (in seconds) for a failed endpoint. Default: 30. When this timeout value expires, the system routes the execution of the virtual service to the next consecutive Web service endpoint specified in the Route To field.
HTTP Method
The HTTP method to pass to the native service.
Typically you want to pass each request to the native service with the same HTTP method that is contained in the request. For example, if a request contains a GET method, you allow the GET method to be passed to the native service. In this case, select the value CUSTOM, which is a context variable that contains the HTTP method that is contained in the request.
However, in other cases you might want to change the HTTP method of a request to a different HTTP method. In this case, you can specify the different method explicitly (by selecting the GET, POST, PUT or DELETE value), or you can specify the different method dynamically on a per-request basis. If you want to specify the method dynamically, select the CUSTOM option and then write an IS service to set the value of the context variable. For more information, see Changing the HTTP Method of a REST Virtual Service.
Use Credentials from Incoming Request
This is the default HTTP Authentication option. Authenticates requests based on the credentials specified in the HTTP header. CloudStreams passes the Authorization header present in the original client request to the native service.
Use Specific Credentials
Authenticates requests according to the values you specify in the User, Password and Domain fields.
Invoke Service Anonymously
Does not authenticate requests.
Use Existing HTTP Headers
Use the HTTP headers that are contained in the requests.
Customize HTTP Headers
Use the HTTP headers that you specify in the Name and Value columns on the tab. If you need to specify multiple headers, use the plus button to add rows.
Copyright © 2015- 2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product LogoContact Support   |   Community   |   Feedback