skip to main content
Hybrid Data Pipeline API reference : Management API : Connector API : Configure Round-Robin Request Balancing for an On-Premises Connector Group
  

Try Now
Configure Round-Robin Request Balancing for an On-Premises Connector Group

Purpose

Specify the On-Premises Connectors in a connector group, and define a weight for each.
Note: A connector can be used in only one group, and only once in that group. Each member connector must already be registered to the owner.

URL

https://<myserver>:<port>/api/mgmt/connectors/<group-connector>

Method

PUT

URL Parameters

<myserver> is the hostname or IP address of the machine hosting the Hybrid Data Pipeline server for a standalone installation, or the machine hosting the load balancer for a load balancer installation. For a standalone installation, <port> is the port number specified as the Server Access Port during installation. For a load balancer installation, <port> must be either 80 for http or 443 for https. Whenever port 80 or 443 are used, it is not necessary to include the port number in the URL.
<group-connector> is a unique value associated with the On-Premises Connector. The value is returned using the <base>/connectors/ GET request.

Request Payload Parameters

Parameter
Data Type
Description
Usage
Valid Values
connectionTimeout
String
The amount of time, in seconds, that the connectivity service waits for a connection to be established before timing out the connection request.
Optional
0 | x where x is a positive integer that represents a number of seconds.
If set to 0, the connectivity service does not time out a connection request. If set to x, the connectivity service waits for the specified number of seconds before giving up on the current connection attempt and attempting to establish a connection through the next connector in the group. If all of the connectors in the group are tried without establishing a connection, control is returned to the application and a timeout error is generated.
The default is 15.
retryDelay
String
When a connection attempt through a particular connector fails, that connector is temporarily disabled in the group to stop connection attempts to a connector that has failed.
The value specified for retryDelay indicates the number of seconds the connectivity service considers the connector disabled. The connectivity service does not make any connection attempts. After the retryDelay period has expired, the connector is automatically re-enabled and connection attempts are sent to that connector again.
If all of the connectors in a group become disabled at the same time, the connectivity service attempts a connection to each connector in the group instead of suspending all connection attempts until the retryDelay has expired.
Optional
0 | x where x is a positive integer that represents a number of seconds.
If set to 0, the connectivity service does not delay between retries. If set to x, the connectivity service waits between connection retry attempts the specified number of seconds.
The default is 120.
loadBalancing
String
Specifies whether to balance requests across multiple On-Premises Connectors in a connector group.
Optional
If set to Round Robin, a round-robin algorithm is used to handle traffic among a group of On-Premises Connectors.
members [memberID,sequence,weight]
Array [String,int,int]
Specifies the connector ID of each On-Premise Connector in the group, the sequence in which each On-Premise Connector will be tried, and the weight to be applied to the connector.
Required
memberID is the Connector ID of the On-Premises Connector. It must not be the Connector ID of an On-Premises Connector Group. Nested groups are not supported.
sequence, for non-load-balanced connector groups, is the relative order in which the On-Premise Connector is tried. The value of the sequence property for each member object must be unique. Duplicate sequence values are not supported and will generate an error response.
weight, for load-balanced connector groups, sets the load for each Connector, with a higher number indicating the relative load directed to the given Connector. For example, if a load-balanced connector group contains connectors A, B and C with weights of 3, 2 and 1 respectively, then for every 6 connections three would go to A, two to B and 1 to C. Moreover, weights do not have to be relative to 1. Rather, they are relative to the other weights in the group. For example, if a group has three connectors with weights 3, 3 and 4, then thirty percent of the requests will go to the first connector, thirty percent will go to the second connector, and forty percent will go to the third connector. The default value is 1.
Note: weight is optional. For non-load-balanced connector groups, weight is ignored.

Sample Request Payload

This request defines the order in which the On-Premises Connectors are tried when load balancing is enabled. In this example, we have three Connectors with weights (relative performance settings) of 3, 2 and 1. For every six connections, three will go to the Connector with weight=3, two will go to the Connector with weight=2, and one to the Connector with weight=1. If a connection attempt fails, different Connectors will be tried until either a connection succeeds or all Connectors have failed to connect.

{
"owner": "Rick",
"label": "DevGroup1",
"connectorGroup": {
"connectionTimeout": "15",
"retryDelay": "120",
"loadBalancing": "Round Robin",
"members": [
{
"memberID": "00000000-0000-0000-0011-000000000010",
"sequence": 3,
"weight": 1
},
{
"memberID": "00021111-0011-0011-0022-000000222200",
"sequence": 2,
"weight": 2
},
{
"memberID": "00031313-0011-0011-0033-000000333300",
"sequence": 1,
"weight": 3
}
]
},
"authUser": [
"Joe",
"Fred",
"Tom"
]
}

Response Definition

The response has the following format:
{
"connectorID": "<group-connector-id>",
"owner": "owner",
"label": "<label>",
"connectorGroup": {
"connectionTimeout": 15,
"retryDelay": 120,
"loadBalancing": "Round Robin",
"members": [
{
"memberID": <"memberID">,
"sequence": 3,
"weight": 1
},
{
"memberID": <"memberID">,
"sequence": 2,
"weight": 2
},
{
"memberID": <"memberID">,
"sequence": 1,
"weight": 3
}
]
},
"authUser": [
<"user">,
<"user">,
<"user">
]
}

Sample Server Response

After sending in the payload, on success, the user Rick receives a response with the preceding information plus the newly generated ConnectorID, and is assigned as the owner.

{
"connectorID": "12345678-90ab-cdef-ghij-kl123pqrstuv",
"owner": "Rick",
"label": "DevGroup1",
"connectorGroup": {
"connectionTimeout": 15,
"retryDelay": 120,
"loadBalancing": "Round Robin",
"members": [
{
"memberID": "00000000-0000-0000-0011-000000000010",
"sequence": 3,
"weight": 1
},
{
"memberID": "00021111-0011-0011-0022-000000222200",
"sequence": 2,
"weight": 2
},
{
"memberID": "00031313-0011-0011-0033-000000333300",
"sequence": 1,
"weight": 3
}
]
},
"authUser": [
"Joe",
"Fred",
"Tom"
]
}

Authentication

Basic Authentication using Login ID and Password.

Authorization

Any active Hybrid Data Pipeline user

Related Topics

*Create a Connector Group
*Configuring Failover and Balancing Requests with an On-Premises Connector Group