Re:A Universal I/O Abstraction for C++ (2020)
by secondcoming on Monday April 19, 2021 @07:20AM
(#26861424)
We actually changed from libcurl to ASIO because libcurl creates a thread for every request, and it didn't handle concurrency well (I forget the exact details but it would crash if you added a curl handle to a curl_multi session if that session was already in progess)
Our use case sends thousands of requests per second per machine.
There's also nghttp2_asio, built on nghttp2, which supports HTTP/2[2].
Overall I agree though that ASIO is a very complex and very low level, and it's a lot of work to use it well.
Sometimes it's easiest just to use libcurl.
[0] https://www.boost.org/doc/libs/1_76_0/libs/beast/doc/html/be...
[1] https://www.boost.org/doc/libs/1_70_0/libs/beast/example/web...
[2] http://nghttp2.org/documentation/libnghttp2_asio.html