Recoverable Network Protocol (RNP) and Redrive will add some overhead to the session. Disabling these features by setting TdConnectionStringBuilder.Recovery to Off
will eliminate any performance penalties introduced by Redrive and RNP.
To more effectively utilize recovery, asynchronous methods should be utilized for two reasons:
- Asynchronous methods do not contain internal timeouts, but reconnection requires a timeout. All commands executed asynchronously will automatically use the TdConnectionStringBuilder.RecoveryTimeout during reconnection. Synchronous commands will extend recovery conditionally based upon TdCommand.CommandTimeout and TdConnectionStringBuilder.RecoveryCommandTimeoutOverride.
- Utilizing asynchronous methods will more effectively manage background threads to re-establish connections. Synchronous methods may utilize the application's thread for up to 20 minutes during attempts to reconnect and may potentially consume many threads on an application server.