-
Notifications
You must be signed in to change notification settings - Fork 564
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Long ssl handshake latencies #321
Comments
@fantix any ideas? |
For a bit more background about SSL handshake - it takes several network round trips to finish. I'm curious how you measured the latency of SSL handshake? Some sample code would be great. I would guess it included the time waiting for clients to respond. So for e.g. mobile devices with the cellular network, it may make sense when the connectivity is unstable.
I would recommend using a development version of uvloop, add additional logging/statistics in
|
Thank you @fantix. I did not actually measure specifically the ssl handshake but trusted the logs that uvloop produces when asyncio debug logging is enabled. The graph is an extract of 10k debug log events over a 24-hour period. I'm not sure of the accuracy of this, but it does correlate with higher latencies in my application.
Can you elaborate on what you mean by this? My assumption is that the number produced by the logging represents the complete handshake operation.
Thanks for this, would you have any pointers to documentation or code where I can start from? |
This is another area where monitoring APIs (#322) can potentially help us. |
Yes. As I mentioned:
This means, before an SSL connection is fully established, several TCP
Please see: |
Closing due to inactivity. Please feel free to reopen if you have further questions. |
This is more of a question than an issue report. How can I debug SSL handshake latencies? Occasionally the handshakes take hundreds of milliseconds, which seems a little bit unreasonable. I am running an aiohttp server which exposes an API, the load is very small, something like 10-20rps load-balanced on 3 instances of the application. Are there any configuration parameters that I can tune? I am not very familiar with the asyncio-internals in python.
Some random examples from logs
Here's 10k measurements from the past 24 hours

PYTHONASYNCIODEBUG
in env?:The text was updated successfully, but these errors were encountered: