HTTP Client

The HTTP Client resource template represents an outgoing HTTP connection.

General

The General section has the following fields.

Field Description
Package The name of the package
Name The name to be displayed as the label for the resource
Description A short description of the shared resource

HTTP Client

This section has the following fields.

Field Literal Value/Module Property? Description
Implementation Library No

Specifies the implementation library to be used:

  • Apache Commons(Supported by HTTP and SOAP): must be used for SOAP binding.
  • Apache HttpComponents(Supported by HTTP and REST): must be used for REST binding, when the Invoke REST API activity needs to be used.

The default is Apache Commons(Supported by HTTP and SOAP).

Note: The HTTP palette activities work with both Apache Commons and Apache HttpComponents.
Disable Connection Pooling Yes Indicates whether to use the single or multi-threaded connection manager.

The default value is False.

Maximum Total Connections Yes Specifies the maximum number of concurrent, active HTTP connections allowed by the resource instance to be opened with the target service. This property is enabled only if connection pooling is enabled (the Disable Connection Pooling parameter is unchecked).

The default value is 200. For applications that create many long-lived connections, increase the value of this parameter.

Idle Connection Timeout(ms) Yes Keep-alive time (in milliseconds) for idle HTTP connection in the Persistent Connection Pool.
Maximum Total Connections Per Host/Route Yes Specifies the maximum number of concurrent, active HTTP connections allowed by the resource instance to the same host or route. This property is enabled only if connection pooling is enabled (the Disable Connection Pooling parameter is unchecked).
Note: This number cannot be greater than Maximum Total Connections. Every connection created here also counts into Maximum Total Connections.

The default value is 20.

Stale Check Yes Selecting this check box determines whether the stale connection check is to be used. Disabling the stale connection check can result in slight performance improvement at the risk of getting an I/O error, when executing a request over a connection that has been closed at the server side.
Default Host Yes The name of the host that accepts the incoming requests.

For machines that have only one network card, the default value localhost specifies the current machine. For machines with more than one network card, this field specifies the host name of the card used to accept the incoming HTTP requests.

The default is localhost.

Default Port Yes The port number on which to invoke outgoing HTTP requests.

The default is 80.

Service Discovery Configuration
Enable Service Discovery No Check this checkbox to enable service discovery.
Service Name Yes The service name to be discovered on Eureka or Consul.
Enable Caching Yes When enabled, services are discovered only from the local cache instead of accessing the Eureka or Consul servers.
Enable Loadbalancing Yes If enabled, service instances are invoked in a round-robin fashion. If not enabled, the first cached service instance is always invoked irrespective of the number of service instances.
Thread Pool No Specifies a queue of threads available to run a queue of tasks.

Thread pools are used to improve performance when executing large numbers of asynchronous tasks by reducing per task invocation overhead, provide a means of bounding, and managing the resources consumed when executing a collection of tasks.

You can optionally create this client thread pool to route messages to the target service. The thread pool resource can be created by either selecting a thread pool resource template or creating a new one. See Thread Pool for more information.

Advanced

This section has the following fields.

Field Literal Value/Module Property? Description
Socket Timeout Yes Specifies the number of milliseconds to wait for data before the connection is severed.

The value 0 is interpreted as an infinite timeout and is used when no socket timeout is set in the HTTP method parameters.

Connection Timeout Yes Specifies the number of milliseconds to wait while a connection is being established.

The value 0 is interpreted as no timeout.

Accept Redirect Yes Indicates whether the HTTP method should automatically follow HTTP redirects.

This option is used when client connection receives the redirect responses from server like Moved Permanently, Moved Temporarily, Temporary Redirect and so on.

The default value is False.

Retry Count Yes Specifies the maximum number of retry attempts for connecting to the server if an exception occurs.

The default value is 3.

Use Single Cookie Header Yes Select this check box if multiple name/value pairs must be sent in a single non-repeating Cookie header element for outgoing HTTP requests.

The default value is False.

Use Non-Preemptive Authentication Yes Select this check box if you want to use non-preemptive authentication.
Log Request/Response Time Yes Select this check box to log the time required for sending and receiving the HTTP response in the Send HTTP Request activity.
HTTP Proxy No Specifies the HTTP proxy server to be used to gain access outside of a firewall. The Proxy Configuration shared configuration resource specifies the configuration of the proxy server. See Proxy Configuration for more information.

Circuit Breaker Configuration

Field Literal Value/Module Property? Description
Enable Circuit Breaker No Select Enable Circuit Breaker to configure properties for Hystrix configuration.

The default value is False.

Command Name Yes The specific Hystrix command.

The command name should be unique for each HTTP Connector shared resource.

Command Properties
Execution Isolation Strategy Yes

The isolation strategy used, THREAD, executes on a separate thread and concurrent requests are limited by the number of threads in the thread-pool.

Metrics Rolling Window (ms) Yes The duration of the statistical rolling window, in milliseconds.

This is the duration for which Hystrix retains metrics for the circuit breaker to use and for publishing.

The value should be such that Metrics Rolling Window (ms) % Metrics Rolling Window Buckets = 0

Circuit Breaker Request Volume Threshold Yes

The minimum number of requests in a rolling window that will enable tripping the circuit.

This controls how many requests have to occur in a rolling window for the circuit to consider tripping.

The default value is 20.

Metrics Rolling Window Buckets The number of buckets that the rolling statistical window is divided into.

The value should be such that Metrics Rolling Window (ms) % Metrics Rolling Window Buckets = 0

Circuit Breaker Error Threshold Percentage Yes

The error percentage at or above which the circuit should trip and start short-circuiting requests.

The default value is 50.

Request Log Enabled Yes Indicates whether the Hystrix command execution and events should be logged.

The default value is Yes.

Circuit Breaker Sleep Window (ms) Yes This property sets the amount of time, after tripping the circuit, to reject requests before allowing attempts again to determine if the circuit should again be closed.

The default value is 5000.

Execution Timeout Enabled No Specifies whether the Hystrix command execution should have a timeout.

The default value is Yes.

Execution Timeout (ms) Yes The time, in milliseconds, after which the caller will timeout and stop the command execution.

The default value 1000.

Thread Pool Properties
Core Size Yes The size of the core thread pool.

Default Value 10.

Max Queue Size Yes The maximum size of the queue.

Default value -1.

Queue Size Rejection Threshold Yes The queue size rejection threshold.

This property is not applicable if Max Queue Size is set to -1.

Default Value is 5.

Keep Alive Time (minutes) Yes The keep alive time, in minutes.

Default value 1.

Execution Thread Interrupt on Timeout Yes Specifies whether the Hystrix command execution should be interrupted when a timeout occurs.

The default value is Yes.

Security

Security can include any combination of the following characteristics:
Field Description
Authentication To be included when the messages must be authenticated. Authentication can be performed with user names and passwords.

Identity Provider : Provides username and password credentials encapsulated in an identity provider resource. Selecting this check box activates the Identity Provider field.

Note: You can enforce authentication on requests by selecting the Authentication check box, or by associating the Basic Credential Mapping policy with REST or HTTP activities. If you choose to use the policy, ensure the Authentication check box on the HTTP Client resource is not selected.
Kerberos Authentication

Selecting this check box will enable Kerberos Authentication.

Kerberos Authentication requires a few additional configurations. See section "Kerberos Authentication Configuration", for more information on these configurations.

Note: Supported only for Apache HttpComponents(Supported by HTTP and REST).
Username Enter the Active Directory username to be used for the Kerberos authentication.

This field is enabled only when the Kerberos Authentication field is selected.

Password Enter the password for the specified username.

This field is enabled only when the Kerberos Authentication field is selected.

Default Confidentiality To be included when encrypting or decrypting messages.
Selecting this check box will enable the SSL with default configuration. For details, refer to SSL Client Configuration.
Note: If you select Default Confidentiality, there is no need to create a shared resource. SSL is enabled with Default Configuration. If custom configurations for SSL are required, select Confidentiality. When using Default Confidentiality ensure that the correct root certificates are present at the <TIBCO_HOME>\tibcojre64\1.8.0\lib\security\cacerts trust store.
Confidentiality To be included when encrypting or decrypting messages.

Selecting this check box displays the SSL Client Configuration field. For details, refer to SSL Client Configuration.

Kerberos Authentication Configuration

The krb5.conf file and login.conf file are present under the config folder at TIBCO Home/bw/6.3/config.

Configure the files as specified below:

  • login.conf : It is recommended that no changes are made to the login.conffile.
  • krb5.conf : Configure the following values according to the Kerberos environment:
    • libdefaults
    • realms
    • domain_realm