Other QoS Timeout Tuning

0 Likes

Back

In this article, we will briefly discuss a few other QoS timeout properties which you can use to fine tune the QoS requirement of your Client application.

Relative Connection Timeout

In some circumstances, you may want to limit the amount of time the Client method invocation can spent on establishing a connection to the Server. This duration does not include the amount of time needed to write the Request Message and read the Reply Message. You can achieved this timeout behavior by setting the QoS Relative Connection Timeout Policy.

For VBC Client, you can set the Relative Connection Timeout Policy using the property "vbroker.qos.defaultConnectTimeout". For VBJ Client, the equivalent property is "vbroker.orb.qos.connectionTimeout". The timeout value is specified in milliseconds. The default value of 0 means that the Client is given unlimited time to connect to the Server.

If the Client invocation fails to establish a connection to the Server within the specified timeout, then an exception is thrown. This issue may occur when the Server is unreachable due to network congestion/disruption or the Server is protected by a firewall. The Client application logic must catch the exception and handle it gracefully to prevent a crash.

The timeout specified with these two properties sets the RelativeConnectionTimeoutPolicy at the ORB Level policy. This means that all the invocations in the same ORB have the same connection timeout. If some invocations in your Client application need different connection timeout values, you must programmatically set the RelativeConnectionTimeoutPolicy at the Object or Thread Level policy using the appropriate CORBA APIs. The Object Level timeout setting has the highest precedence, followed by the Thread Level, the ORB Level and finally the property level setting has the lowest precedence.

Relative Request Timeout

You can also fine tune the amount of time the Client method invocation is allowed to spend on writing the Request Message to the connection. This duration does not include the amount of time needed to connect to the Server and read the Reply Message. You can achieved this timeout behavior by setting the QoS Relative Request Timeout Policy.

For VBC Client, you can set the Relative Request Timeout Policy using the property "vbroker.qos.defaultRRQTimeout". There is no equivalent property for VBJ Client, so you must set VBJ's Request Timeout Policy programmatically. The timeout value is specified in milliseconds. The default value of 0 means that the Client has unlimited time to write the Request Message to the connection.

If Client invocation fails to write the Request Message to the connection within the specified timeout, then an exception is thrown. The delay may be attributed to heavy load, network congestion/disruption which can cause the socket buffer to be full. The Client application logic must catch the exception and handle it gracefully to prevent a crash.

The timeout specified with this property sets the RelativeRequestTimeoutPolicy at the ORB Level policy. This means that all the invocations in the same ORB have the same request timeout. If some invocations in your Client application need different request timeout values, you must programmatically set the RelativeRequestTimeoutPolicy at the Object or Thread Level policy using the appropriate CORBA APIs. The Object Level timeout setting has the highest precedence, followed by the Thread Level, the ORB Level and finally the property level setting has the lowest precedence.

For VBJ, the "vbroker.orb.tcpTimeout" behavior will override/disable the Relative Request Timeout Policy if both type of timeouts are set together. So to avoid confusion, you should not set these two types of timeout policies together.

Back

Labels:

How To-Best Practice
Comment List
Anonymous
Related Discussions
Recommended