skip to main content
Hybrid Data Pipeline API reference : Management API : Connector API : Using Failover and Balancing Requests with an On-Premises Connector Group
  

Try Now
Using Failover and Balancing Requests with an On-Premises Connector Group
Users can define groups of On-Premises Connectors using the Connector API. When defining an On-Premises data source, a Connector Group ID can be specified as the Connector ID of the data source instead of specifying a Connector ID for a single connector. This allows you to use failover and balance requests among multiple On-Premises Connectors. For configuration details, see Configuring Failover and Balancing Requests with an On-Premises Connector Group.

Connection Failover

Connection time failover is supported for queries executed from the Hybrid Data Pipeline ODBC and JDBC drivers, and from the OData API, because users can now define groups of On-Premise Connectors. When defining an on-premise data source, a Connector Group ID can be specified as the Connector ID of the data source instead of specifying a Connector ID for a single connector. When a Group Connector ID is used for a data source and a connection is requested for that data source the connectivity service uses the first On-Premises Connector in the group to establish the connection.
If the connection succeeds, the application is successfully connected to the data source. If the connection fails, the connectivity service then uses the next On-Premises Connector in the group to attempt to connect to the data source. If that connection fails, the next connector in the group is used. This continues until a connection is successfully established or all of the On-Premises Connectors in the group have been tried and failed. In the latter case, an error is returned to the application.
Failover is also supported at execute time for a fetch operation. If a SELECT statement is executed using either driver, and a connection failure or connection timeout occurs during the execution of the statement, the driver triggers the failover sequence in an attempt to reconnect to the data source. If the connection is re-established, the SELECT statement is re-executed. Select failover is not supported if a query is executed through the OData API.

Balancing Requests

An On-Premises Connector group can be configured to balance requests across multiple connectors. By default, a connector group enabled to balance requests attempts to balance requests equally across the connectors in the connector group. Optionally, a weight can be assigned to one or more members of the group. This allows more traffic to be directed to a specific connector if needed. For example, if Connector1 is running on a faster server than Connector2, a higher number of requests can be sent to Connector1. A round-robin algorithm is used to support this method for balancing requests.