3 ms·
Ask HN: What are the benefits of using Rust async HTTP clients?
Generally it seems like async only has a real benefit when there are many connections.
Is there a scenario where using an HTTP client implemented with Rust's async features gives a substantive performance benefit?
- halffullbrain 6y agoThat's correct. With many concurrent connections, you save memory (from thread stacks) and context swiches (since you don't need to switch thread to process each socket). If all you want is a single request (and you have wait for results to continue work), you don't gain anything by going async.
- sudeepj 6y ago> If all you want is a single request (and you have wait for results to continue work), you don't gain anything by going async This is true for HTTP version < 2 because of the head-of-line blocking. With HTTP 2 I think a single connection will see a better throughput if not massive increase.