ServiceClientTransportSettings.ConnectionLeaseTimeoutMilliseconds Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
How long, in milliseconds, a given cached TCP connection created by this client's HTTP layer will live before being closed. If this value is set to any negative value, the connection lease will be infinite. If this value is set to 0, then the TCP connection will close after each HTTP request and a new TCP connection will be opened upon the next request.
public int ConnectionLeaseTimeoutMilliseconds { get; set; }
member this.ConnectionLeaseTimeoutMilliseconds : int with get, set
Public Property ConnectionLeaseTimeoutMilliseconds As Integer
Property Value
Remarks
By closing cached TCP connections and opening a new one upon the next request, the underlying HTTP client has a chance to do a DNS lookup to validate that it will send the requests to the correct IP address. While it is atypical for a given IoT hub to change its IP address, it does happen when a given IoT hub fails over into a different region. Because of that, users who expect to failover their IoT hub at any point are advised to set this value to a value of 0 or greater. Larger values will make better use of caching to save network resources over time, but smaller values will make the client respond more quickly to failed over IoT hubs.
Applies to
Azure SDK for .NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기