Boost logo

Boost Users :

From: Niall Douglas (s_sourceforge_at_[hidden])
Date: 2020-11-25 17:39:24


On 25/11/2020 10:54, Dominique Devienne via Boost-users wrote:
> Hi. I'm writing a small interaction between:
> 1) a Boost.Beast-based HTTP server (based on http_server_async.cpp example)
> 2) a Boost.Beast-based HTTP client (based on http_client_sync.cpp example)
>
> When I log the time it takes to resolve the server address and connect
> to it, then issue my HTTP request, it takes over 1 second (Win10,
> VS2019, C++17, Release, localhost for both client and server):
>
> 2020-11-25T09:46:37.473936 Prologue in 0.001s
> 2020-11-25T09:46:37.482470 Resolved in 0.008s
> 2020-11-25T09:46:38.506180 Connected in 1.023s
> 2020-11-25T09:46:38.509607 OK: Authenticated; in 0.003s
>
> While the same on Linux (RH7.5) is just over 2ms:
>
> 2020-11-25T09:45:45.515926 Prologue in 0.000s
> 2020-11-25T09:45:45.517083 Resolved in 0.001s
> 2020-11-25T09:45:45.517550 Connected in 0.000s
> 2020-11-25T09:45:45.518010 OK: Authenticated; in 0.000s
>
> That's a huge difference! Almost 500x...

I can confirm that from libcurl wrapping ASIO, initiating a new HTTPS
connection takes almost the same time whether from Linux or Windows.
It's a lot faster than one second as well.

Is it possible that Windows is trying IPv6 first, but there is no IPv6
route?

Niall


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net