Hi,
We are implementing a function that uses the MIP SDK to log in to XProtect from our tracking management device (10.xxx.yyy.12) to the video management server (10.zzz.www.71), and would like to confirm the time required for the login process.
[Observed Behavior]
sddownload.zip (2.7 KB)
When logging in to XProtect using the MIP SDK, the time required for the process to complete is inconsistent. In some cases, it takes approximately 12 seconds on average, while in other cases it completes in approximately 0.8 seconds.
Please note that no certificate for HTTPS communication is configured in our environment. Therefore, the HTTPS connection fails and the login completes by falling back to HTTP. We understand this as a known limitation.
[Investigation]
We collected logs from the tracking management device and packet captures from the video management server, and compared the breakdown of the processing time.
Log for a slow case (approximately 12 seconds)
2026/10/22 11:02:05.038 [Start]Login
2026/10/22 11:02:17.788 [End]Login(return:True)
Log for a fast case (approximately 0.8 seconds)
2026/10/22 11:38:09.206 [Start]Login
2026/10/22 11:38:09.992 [End]Login(return:True)
Based on the packet captures, we divided the processing time into the following phases and compared the two cases.
Phase Slow case (approximately 12 seconds) Fast case (approximately 0.8 seconds)
① TCP connection (443) to receipt of TLS Server Hello
Approximately 34 ms
Approximately 23 ms
② After receipt of TLS Server Hello until the client initiates the next action
Approximately 4.97 seconds (no response)
Approximately 59 ms
③ HTTPS socket close processing
Client sends FIN → server returns ACK only
Server immediately sends RST
④ After HTTPS close until fallback to HTTP (port 80) begins
Approximately 7.03 seconds (no response)
Approximately 8 ms
⑤ Communication for token acquisition, etc. over HTTP (port 80)
Approximately 0.83 seconds
Approximately 0.66 seconds
Total
Approximately 12.75 seconds
Approximately 0.79 seconds
As shown above, most of the difference (②: approximately 4.9 seconds and ④: approximately 7.0 seconds) is caused by periods during which there is no response from the client (MIP SDK) after the TLS handshake has completed.
In the fast case, immediately after receiving the TLS Server Hello, the client sends Application Data (presumed to be a TLS Alert related to a certificate validation error, etc.), and the server immediately returns an RST. We believe this allows the client to fall back to HTTP immediately without waiting.
In contrast, in the slow case, the client does not respond for approximately five seconds after receiving the TLS Server Hello. Furthermore, even after the socket is closed, it takes approximately seven seconds before the client initiates the next connection (switching to HTTP).
[Question ①: Client-Side (MIP SDK) Wait / Timeout Behavior]
When certificate validation fails after the TLS handshake has completed, does the client have internal timeout processing such as the following?
Wait time (timeout value) after receiving the TLS Server Hello until the client determines that certificate validation has failed
Retry interval / wait time between giving up on the HTTPS connection and falling back to HTTP
If these timeout values are configurable, we would like to confirm the recommended values and how they can be changed.
[Question ②: Difference in Server-Side TLS Termination Behavior]
Although the certificate is not configured in either case, we have observed the following differences in the server-side connection termination behavior after the TLS handshake.
Slow case:
The server returns only an ACK in response to the client’s FIN (no RST is sent)
Fast case:
The server immediately sends an RST after the certificate validation error is detected
Could you please advise whether there are any known factors that could cause this difference in behavior, such as the implementation of server-side TLS termination, the OS/socket state, or system load?
Also, if there is any configuration or implementation that would allow the server to consistently return an RST at an early stage, we believe this could significantly reduce the client-side wait time. Please advise if there is any way to achieve this.
[Environment]
XProtect version: XProtect Corporate 2025R2
MIP SDK version: MIP-SDK2025R2
OS: Windows 11 LTSC
Language / Framework: C# / .NET Framework 4.8
[Reproducibility]
The processing time (approximately 12 seconds / approximately 0.8 seconds) occurs randomly, but the fast case occurs approximately once in every 10 attempts.
Attachments:
映像ビューア起動時間調査_抜粋.csv (packet capture for the slow case)
映像ビューア起動時間調査2.csv (packet capture for the fast case)
We have attached the logs for your review as well.
Thanks,
Best Regards,
NVS Technical Support